#include <AssignableT.h>
Public Member Functions | |
virtual AssignableT< AR > & | operator= (const AR &)=0 |
Assign an AR System C API structure to this class. | |
virtual | operator const AR * () const =0 |
return an AR System C API structure with all of the data contained in this class | |
Protected Member Functions | |
AR & | getShallowARStruct () const |
Returns a pointer to memory that a class implementation can fill in with AR System structure values. |
This is arguably the main class in the library. Every object representing an AR System C API structure extends this class. This ensures that every class implements two operations. First, an assignment operator so that the contents of the C structure can be completely copied and contained inside the class. Second, a const operator such that the class can return a const pointer to a C API structure containing the definition.
AssignableT aids in the implementation of the cast method by providing memory that can be used to return a representation of the object. Note that the memory in this member (shallowARStruct) is shallow meaning any pointers in it point to memory owned by another object. The caller is never to modify the returned object, including freeing its memory. This is why the cast returns a const pointer, even though the AR System API does not implement const. For this reason, you will see the Server implementation frequently make use of an additional const_cast to pass the members to the AR System API. Hopefully in the future the AR System API will properly implement const.
|
return an AR System C API structure with all of the data contained in this class Note that this cast return a const pointer. Use this operation by calling static_cast<const AR *>(obj), where AR is the AR System C API structure needed. Note that the AR System C API functions do not support const, so an additional const_cast will be needed to pass such a structure to the API. The Server class does this for you, and you will never need to worry about this unless you are interacting with legacy code, or calling AR System API calls directly from your code. |
|
Assign an AR System C API structure to this class. The structure is copied in its entirety, with no dependence on the C API structure once the operation is complete. Implemented in rtl::Diary, rtl::Field, rtl::ListT< ARLIST, ARSTRUCT, OBJ >, rtl::MapT< ARLIST, ARSTRUCT, OBJ, KEYTYPE, VALUETYPE >, rtl::StatusHistory, rtl::Value, rtl::VectorT< ARLIST, ARSTRUCT, OBJ >, rtl::ListT< ARStatusList, ARStatusStruct, class Status >, rtl::ListT< ARFuncCurrencyList, ARFuncCurrencyStruct, class FuncCurrency >, rtl::ListT< ARCoordList, ARCoordStruct, Coordinate >, and rtl::MapT< ARDisplayInstanceList, ARDisplayInstanceStruct, class DisplayInstance, ARInternalId, PropMap >. |