A generic container for any DOF Data Value. More...
Modules | |
DOFValueArray | |
A DOF Array Data Value. | |
DOFValueStructure | |
A DOF Structure Data Value. | |
Typedefs | |
typedef struct DOFValue_t * | DOFValue |
A container for any value. | |
Functions | |
void | DOFValue_Destroy (DOFValue self) |
Destroy the given value. | |
void | DOFValueList_Destroy (uint16 valuesCount, DOFValue values[]) |
Destroy the given array of values. | |
DOFValue | DOFValue_Copy (const DOFValue self) |
Create a new copy of an existing DOFValue. | |
DOFType | DOFValue_GetDOFType (const DOFValue self) |
Retrieve the DOFType represented within the DOFValue. | |
boolean | DOFValue_IsCompatibleWith (DOFValue value, DOFType type) |
Determine if a value's type is compatible with another type. | |
uint32 | DOFValue_GetMarshalSize (const DOFValue self, const DOFType type) |
Get the number of bytes required in a buffer to marshal a DOFValue. | |
uint32 | DOFValue_Marshal (const DOFValue self, const DOFType type, uint32 length, uint8 *buffer) |
Marshal a DOFValue into an existing buffer. | |
DOFValue | DOFValueInt8_Create (int8 val) |
Create a new DOFValue to hold a single value of type int8. | |
int8 | DOFValueInt8_Get (const DOFValue self) |
Create the native int8 from the contents of the specified DOFValue. | |
DOFValue | DOFValueInt16_Create (int16 val) |
Create a new DOFValue to hold a single value of type int16. | |
int16 | DOFValueInt16_Get (const DOFValue self) |
Create the native int16 from the contents of the specified DOFValue. | |
DOFValue | DOFValueInt32_Create (int32 val) |
Create a new DOFValue to hold a single value of type int32. | |
int32 | DOFValueInt32_Get (const DOFValue self) |
Create the native int32 from the contents of the specified DOFValue. | |
DOFValue | DOFValueInt64_Create (int64 val) |
Create a new DOFValue to hold a single value of type int64. | |
int64 | DOFValueInt64_Get (const DOFValue self) |
Create the native int64 from the contents of the specified DOFValue. | |
DOFValue | DOFValueUInt8_Create (uint8 val) |
Create a new DOFValue to hold a single value of type uint8. | |
uint8 | DOFValueUInt8_Get (const DOFValue self) |
Create the native uint8 from the contents of the specified DOFValue. | |
DOFValue | DOFValueUInt16_Create (uint16 val) |
Create a new DOFValue to hold a single value of type uint16. | |
uint16 | DOFValueUInt16_Get (const DOFValue self) |
Create the native uint16 from the contents of the specified DOFValue. | |
DOFValue | DOFValueUInt32_Create (uint32 val) |
Create a new DOFValue to hold a single value of type uint32. | |
uint32 | DOFValueUInt32_Get (const DOFValue self) |
Create the native uint32 from the contents of the specified DOFValue. | |
DOFValue | DOFValueUInt64_Create (uint64 val) |
Create a new DOFValue to hold a single value of type uint64. | |
uint64 | DOFValueUInt64_Get (const DOFValue self) |
Create the native uint64 from the contents of the specified DOFValue. | |
DOFValue | DOFValueFloat32_Create (float32 val) |
Create a new DOFValue to hold a single value of type float32. | |
float32 | DOFValueFloat32_Get (const DOFValue self) |
Create the native float32 from the contents of the specified DOFValue. | |
DOFValue | DOFValueFloat64_Create (float64 val) |
Create a new DOFValue to hold a single value of type float64. | |
float64 | DOFValueFloat64_Get (const DOFValue self) |
Create the native float64 from the contents of the specified DOFValue. | |
DOFValue | DOFValueBoolean_Create (boolean val) |
Create a new DOFValue to hold a single value of type boolean. | |
boolean | DOFValueBoolean_Get (const DOFValue self) |
Create the native boolean from the contents of the specified DOFValue. | |
DOFValue | DOFValueDateTime_Create (DateTime val) |
Create a new DOFValue to hold a single value of type DateTime. | |
DateTime | DOFValueDateTime_Get (const DOFValue self) |
Create the native DateTime from the contents of the specified DOFValue. | |
DOFValue | DOFValueGUID_Create (GUID val) |
Create a new DOFValue to hold a single value of type GUID. | |
GUID | DOFValueGUID_Get (const DOFValue self) |
Create the native GUID from the contents of the specified DOFValue. | |
DOFValue | DOFValueInterfaceID_Create (const DOFInterfaceID val) |
Create a new DOFValue to hold a single value of type DOFInterfaceID. | |
DOFInterfaceID | DOFValueInterfaceID_Extract (const DOFValue self) |
Create a new DOFInterfaceID from the contents of the specified DOFValue. | |
DOFInterfaceID | DOFValueInterfaceID_Get (const DOFValue self) |
Report the encapsulated DOFInterfaceID data without allocation. | |
DOFValue | DOFValueObjectID_Create (const DOFObjectID val) |
Create a new DOFValue to hold a single value of type DOFObjectID. | |
DOFObjectID | DOFValueObjectID_Extract (const DOFValue self) |
Create a new DOFObjectID from the contents of the specified DOFValue. | |
DOFObjectID | DOFValueObjectID_Get (const DOFValue self) |
Report the encapsulated DOFObjectID data without allocation. | |
DOFValue | DOFValueBLOB_Create (uint32 blobSize, const uint8 *val) |
Create a new DOFValue to hold a single value of type BLOB (uint8 *). | |
uint8 * | DOFValueBLOB_Extract (const DOFValue self) |
Create a new BLOB (uint8 *) from the contents of the specified DOFValue. | |
const uint8 * | DOFValueBLOB_Get (const DOFValue self) |
Report the encapsulated BLOB (uint8 *) data without allocation. | |
uint32 | DOFValueBLOB_GetSize (const DOFValue self) |
Report the size of the encapsulated BLOB (uint8 *). | |
DOFValue | DOFValueString_Create (uint16 encoding, uint32 strLength, const char *val) |
Create a new DOFValue to hold a single value of type Fixed-Encoding String. | |
char * | DOFValueString_Extract (const DOFValue self) |
Create a new Fixed-Encoding String from the contents of the specified DOFValue. | |
const char * | DOFValueString_Get (const DOFValue self) |
Report the encapsulated Fixed-Encoding String data without allocation. | |
DOFValue | DOFValueString_Create_Buffer (uint16 encoding, uint32 strLength, uint32 bufferSize, const uint8 *val) |
Create a new DOFValue to hold a single value of type Fixed-Encoding String. | |
uint8 * | DOFValueString_ExtractBuffer (const DOFValue self) |
Create a new Fixed-Encoding String from the contents of the specified DOFValue. | |
const uint8 * | DOFValueString_GetBuffer (const DOFValue self) |
Report the encapsulated Fixed-Encoding String data without allocation. | |
uint32 | DOFValueString_GetBufferSize (const DOFValue self) |
Report the size of the encapsulated Fixed-Encoding String. | |
Primitive Types | |
Primitive types typically map to primitive types in a language, such as integers and floating point numbers. Other Primitive types in DOF include GUIDs, Object IDs, Interface IDs, and BLOBs. Primitive DOFValues are created with a specific value, and remain immutable (they cannot change) for their lifetime. Each primitive class also defines a DOFType that describes the type. All primitive types are able to construct a DOFType. Most primitive types also have a predefined, static DOFType that can be used; the remainder require additional information, and do not easily lend themselves to a predefined type. | |
DOFType | DOFVALUEINT8_TYPE |
Pre-defined 8-bit signed Integer DOFType. | |
DOFType | DOFVALUEINT16_TYPE |
Pre-defined 16-bit signed Integer DOFType. | |
DOFType | DOFVALUEINT32_TYPE |
Pre-defined 32-bit signed Integer DOFType. | |
DOFType | DOFVALUEINT64_TYPE |
Pre-defined 64-bit signed Integer DOFType. | |
DOFType | DOFVALUEUINT8_TYPE |
Pre-defined 8-bit unsigned Integer DOFType. | |
DOFType | DOFVALUEUINT16_TYPE |
Pre-defined 16-bit unsigned Integer DOFType. | |
DOFType | DOFVALUEUINT32_TYPE |
Pre-defined 32-bit unsigned Integer DOFType. | |
DOFType | DOFVALUEUINT64_TYPE |
Pre-defined 64-bit unsigned Integer DOFType. | |
DOFType | DOFVALUEFLOAT32_TYPE |
Pre-defined 32-bit Floating Point DOFType. | |
DOFType | DOFVALUEFLOAT64_TYPE |
Pre-defined 64-bit Floating Point DOFType. | |
DOFType | DOFVALUEDATETIME_TYPE |
Pre-defined Date-Time DOFType. | |
DOFType | DOFVALUEBOOLEAN_TYPE |
Pre-defined Boolean DOFType. | |
DOFType | DOFVALUEINTERFACEID_TYPE |
Pre-defined DOFInterfaceID DOFType. | |
DOFType | DOFVALUEOBJECTID_TYPE |
Pre-defined DOFObjectID DOFType. | |
DOFType | DOFVALUEGUID_TYPE |
Pre-defined GUID DOFType. | |
DOFType | DOFValueInt8Type_Create (void) |
Create a new 8-bit Signed Integer Type. | |
DOFType | DOFValueInt16Type_Create (void) |
Create a new 16-bit Signed Integer Type. | |
DOFType | DOFValueInt32Type_Create (void) |
Create a new 32-bit Signed Integer Type. | |
DOFType | DOFValueInt64Type_Create (void) |
Create a new 64-bit Signed Integer Type. | |
DOFType | DOFValueUInt8Type_Create (void) |
Create a new 8-bit Unsigned Integer Type. | |
DOFType | DOFValueUInt16Type_Create (void) |
Create a new 16-bit Unsigned Integer Type. | |
DOFType | DOFValueUInt32Type_Create (void) |
Create a new 32-bit Unsigned Integer Type. | |
DOFType | DOFValueUInt64Type_Create (void) |
Create a new 64-bit Unsigned Integer Type. | |
DOFType | DOFValueFloat32Type_Create (void) |
Create a new 32-bit Floating-Point Type. | |
DOFType | DOFValueFloat64Type_Create (void) |
Create a new 64-bit Floating-Point Type. | |
DOFType | DOFValueDateTimeType_Create (void) |
Create a new Date-Time Type. | |
DOFType | DOFValueBooleanType_Create (void) |
Create a new Boolean Type. | |
DOFType | DOFValueGUIDType_Create (void) |
Create a new GUID Type. | |
DOFType | DOFValueInterfaceIDType_Create (void) |
Create a new Interface ID Type. | |
DOFType | DOFValueObjectIDType_Create (void) |
Create a new Object ID Type. | |
DOFType | DOFValueStringType_Create (uint16 encoding, uint32 length) |
Create a new String Type. | |
DOFType | DOFValueBLOBType_Create (uint32 minLength, uint32 maxLength) |
Create a new BLOB Type. | |
#define | DOFVALUESTRING_UNKNOWN |
Unknown encoding. | |
#define | DOFVALUESTRING_US_ASCII |
US-ASCII encoding. | |
#define | DOFVALUESTRING_UTF_8 |
UTF-8 encoding. | |
A generic container for any DOF Data Value.
This is the base class for any constructed value, including DOFValueArray and DOFValueStructure, and is used as the value for a properties and as parameters for methods, events, and exceptions.
Each individual datatype is effectively broken into its own class, with a constructor and accessor methods specific to that class. Because the C language does not support type inheritance, the constructors and accessor methods use only the generic DOFValue type. Care should be taken when utilizing these methods so that only methods that apply to the specific type are used for that type (for example, an application should not attempt to get the string length of a UInt8).
There are three main groups of values: primitive types, arrays, and structures. Primitive types contain a single value, and generally match native and/or common C language types, such as integers and strings. Arrays contain 0 or more elements of a single type. Structures contain 0 or more fields, each of a specific type. The types contained by arrays and structures can be any type (including other arrays and structures).