Implementation
The Rendezvous C++ API consists of a thin wrapper around the C API.
Wrapper Architecture
It features a lightweight object model, in which C++ objects refer to C objects using a pointer or handle.
General Case
In general, C++ constructors declare typed variables and create hollow objects. In contrast, create methods make hollow objects operational, by creating a corresponding C object, and storing its handle in the C++ object.
Similarly, C++ destroy methods destroy the corresponding C object—however, although they invalidate the C++ object, they do not free its storage. In contrast, C++ destructors first call the corresponding destroy method, and then destroy the C++ object, reclaiming its storage.
Data Objects
Data objects (messages, message fields, and datetime objects) present exceptions to these rules. C++ data objects have constructors and destructors, but not create and destroy methods.
Message constructors declare typed variables, but do not allocate storage; the first operation on a message variable creates a C++ object.
Datetime and field objects are identical to the corresponding C structs. Their constructors declare typed variables and allocate struct storage.
Uncaught C++ Exceptions
The Rendezvous C library (within the C++ wrapper) does not support uncaught C++ exceptions. Throwing uncaught exceptions through Rendezvous C library code can leave Rendezvous code in undefined states.
Application callback methods in your C++ programs must ensure that they catch all exceptions thrown within their code (and exceptions thrown within application program code that they call). Such callback methods include TibrvMsgCallback::onMsg(), TibrvEventOnComplete::onComplete(), and others.