Data Structures


The C language API makes a number of IPC data structures accessible from user-written programs. These structures are defined (typedefed) in <rtworks/ipc.h>:

typedef struct T_IPC_MT_STRUCT T_IPC_MT_STRUCT, *T_IPC_MT; 
typedef struct T_IPC_MSG_STRUCT T_IPC_MSG_STRUCT, *T_IPC_MSG; 
typedef struct T_IPC_MSG_FIELD_STRUCT T_IPC_MSG_FIELD_STRUCT, 
                 *T_IPC_MSG_FIELD; 
typedef struct T_IPC_MSG_FILE_STRUCT T_IPC_MSG_FILE_STRUCT, 
                 *T_IPC_MSG_FILE; 
typedef struct T_IPC_CONN_STRUCT T_IPC_CONN_STRUCT, *T_IPC_CONN; 

These structure definitions are incomplete, in the sense that none of the fields in the structure are defined. This is one way of creating an opaque data type in C. Pointers to these structures cannot be dereferenced to look at the data where they are pointing. These pointers are only manipulated through access functions, which provide binary compatibility that protects you from changes to the underlying data structures from one version of SmartSockets to the next.

The C++ classes for the most part eliminate the need for direct manipulation of these IPC data structures. For example, C++ programs may replace the T_IPC_MT class with the TipcMt class, and the T_IPC_MSG class with the TipcMsg class. However, on some occasions, most notably at object construction time and in callback functions, the C++ class library requires data structure manipulation. The example code fragments in the previous chapters and in the manual pages later in this chapter are a good source for learning these exception cases and how to treat them in C++.


TIBCO SmartSockets™ cxxipc Class Library
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com