This library provides many new features not included in the cxxipc
library, including the SmartSockets namespace, use of native type names, improved exception and callback handling, wrappers for utilities functions, and support for multiple RTserver connections.
The C++ class library uses the SmartSockets namespace to simplify class names. If there are conflicts between the SmartSockets C++ library and another library, prefix SmartSockets class names with SmartSockets::. For example, TipcConn can also be written as SmartSockets::TipcConn.
This is a mapping of SmartSockets types to native C++ types:
Type
|
Declared as:
|
---|---|
T_INT1
|
int1
|
T_UINT1
|
uint1
|
T_INT2
|
int2
|
T_UINT2
|
uint2
|
T_INT4
|
int4
|
T_UINT4
|
uint4
|
T_INT8
|
int8
|
T_REAL4
|
real4
|
T_REAL8
|
real8
|
T_REAL16
|
real16
|
Wherever possible, these names are also changed:
The Exception class is used to categorize errors. The C++ class library explicitly declares which exceptions are thrown from each class. The exception hierarchy follows the main classes in the class hierarchy. For example, exceptions generated from methods in the TipcMt class throw TipcMtException exceptions. See Exception Handling for more information on the Exception class.
The C++ class library uses the const
indicator for all methods that do not modify the contents of an object. For example, methods that received a literal string in the cxxipc
library now receive const char *
.
Callback objects can now be passed as parameters into registration methods. If registration is successful, the registration method returns a pointer to the callback class and a template parameter showing the type of callback used. The callback classes are:
The C++ class library includes support for some Tut* functions from the C API. These methods are in four new classes:
The classes and their methods, with their corresponding C API functions, are shown in Table 1.
The C++ class library supports multiple connections, allowing an RTclient to connect to multiple RTservers. Multiple connections are supported by TipcSrv class, in conjunction with these methods and classes:
Extension data from RTclients, which is data created within an RTclient, can be monitored by another RTclient with the TipcMonExt* or TipcSrvMonExt* APIs. The RTserver is not involved in generating this kind of monitoring information.
The C++ class library has the same advantages and limitations as the SmartSockets multiple connections API. Some SmartSockets commands, such as connect
, disconnect
, subscribe
, and unsubscribe
, cannot be used with C++.
TIBCO SmartSockets™ C++ User’s Guide Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |