Tagged data consists of a code and a value. A code named a group code defines the type of data
and operations with the data. A value defines the content of the data. Tagged data can store a Boolean value,
double value, (ascii, wide)-string value, (8, 16, 32, 64)-bit integer value, (two, three)-dimensional point,
(two, three)-dimensional vector, object name, object ID, handle, color, binary chunk, or a selection set
The OdResBuf class is a resbuf-object that represents the interface for accessing tagged
data and manipulating its properties. The OdResBuf class implements an instance of tagged data named
aresbuf-instance as a structure of three elements:
Group code as an integer value
Data value as a union of the OdResBuf::Data type
Smart pointer to the next instance in a sequence of tagged data
The OdResBufPtr class is the typified smart pointer to the resbuf-object and is used for storing
and passing references to tagged data and linking them in dynamic sequence. The OdResBuf::ValueType
enumerator declares the symbolic notation for all supported group codes for tagged data.
The OdResBuf class is derived from the OdRxObject class and inherits the base interface for
adjusting the reference counting functionality. An instance of this class must have an implementation of
the numRefs(), addRef(), and release() virtual methods. The OdResBuf class has a static pseudo-constructor
that creates an instance and implements its pure virtual methods. The new instance gets the kRtNone data type
by default which specifies undefined data. The smart pointer is NULL by default.
Tagged data is programmatically organized into a dynamically linked sequence of instances named a
resbuf-sequence. Each instance of the sequence stores the data type, data value of the
corresponding type, and smart pointer to the next instance. The smart pointer of each instance in the
sequence stores the address of the next instance. The last instance stores NULL, which signals the
end of the sequence.
The C++ platform uses tagged data for the following (each using its own range of group codes):
XData (extended data) technology — Allows attaching and storing data of external
applications together with objects of a database.
XRecord (extension record) technology — Allows attaching and storing of any data
together with objects using dictionaries attached to the object.
DXF technology — Allows representing the properties of objects as a sequence of
tagged data.
System variables — Allows the getting and setting of system variables.