CFx SDK Documentation 2024 SP0
|
#include <TfVariant.h>
Public Types | |
enum | Type { kGUID = OdVariant::kNextType , kEmpty , kDEPRECARED0 , kDbStubPtr , kRxObjectWeakPtr , kTuple , kNextType } |
Public Types inherited from OdVariant | |
enum | Type { kVoid = 0x0000 , kString = 0x0001 , kBool = 0x0002 , kInt8 = 0x0003 , kUInt8 = 0x0003 , kInt16 = 0x0004 , kUInt16 = 0x0004 , kInt32 = 0x0005 , kUInt32 = 0x0005 , kInt64 = 0x0006 , kUInt64 = 0x0006 , kDouble = 0x0007 , kWString = 0x0008 , kAnsiString = 0x0008 , kRxObjectPtr = 0x0009 , kNextType = 0x000A , kByRef = 0x0040 , kArray = 0x0080 } |
Static Public Member Functions | |
static const OdVariant::TypeFactory * | typeFactory (int type) |
static Type | kVariantArray (OdUInt16 nDims, OdUInt32 itemType) |
static Type | kVariantArray (OdUInt16 nDims, OdTfVariant::Type itemType) |
static Type | kVariantArray (OdUInt32 itemType) |
static Type | kVariantArray (OdTfVariant::Type type) |
static Type | getItemType (OdTfVariant::Type type) |
static OdUInt16 | getDimsCount (OdTfVariant::Type type) |
static OdTfVariant | empty () |
Static Public Member Functions inherited from OdVariant | |
static const TypeFactory * | typeFactory (int type) |
Protected Member Functions | |
void | setVarType (int newType, int &type, void *data) |
void | makeEmpty () |
Protected Member Functions inherited from OdVariant | |
void * | data () const |
virtual void | setVarType (int newType, int &type, void *data) |
Additional Inherited Members | |
Protected Attributes inherited from OdVariant | |
int | m_type |
union { | |
OdUInt8 uint8 [nOdVariantDataSize] | |
double dbl | |
void * ptr | |
} | m_uData |
A class that implements an extension of the <exref target="https://docs.opendesign.com/tkernel/OdVariant.html">OdVariant</exref> class that can be used as an universal storage of typified data. Corresponding C++ library: Od_Tf <group OdTf_Classes>
Definition at line 53 of file TfVariant.h.
enum OdTfVariant::Type |
Data types for Tf variant objects. <group OdTf_Types>
Enumerator | |
---|---|
kGUID | |
kEmpty | |
kDEPRECARED0 | |
kDbStubPtr | |
kRxObjectWeakPtr | |
kTuple | |
kNextType |
Definition at line 67 of file TfVariant.h.
OdTfVariant::OdTfVariant | ( | ) |
Creates an empty Tf variant object.
OdTfVariant::OdTfVariant | ( | const OdVariant & | value | ) |
OdTfVariant::OdTfVariant | ( | const OdTfVariant & | value | ) |
Creates a new Tf variant object that is a copy of another Tf variant object (copy constructor).
value | [in] An OdTfVariant object that is copied to a created Tf variant object. |
OdTfVariant::OdTfVariant | ( | const OdGUID & | value | ) |
Creates a new Tf variant object with a specified GUID.
value | [in] A GUID value. |
OdTfVariant::OdTfVariant | ( | const OdTfVariantTuple & | value | ) |
Creates a new tuple of Tf variant objects from an existing variant object tuple.
value | [in] An original variant object tuple that is copied to the created one. |
OdTfVariant::OdTfVariant | ( | OdTfVariant::Type | type, |
const OdTfVariantArray & | value | ||
) |
Creates a new array of Tf variant objects of a specified data type from an existing array.
type | [in] A data type. |
value | [in] An original variant object array that is copied to the created one. |
OdTfVariant::OdTfVariant | ( | OdDbStub *const | value | ) |
Creates a new Tf variant object from a specified raw data stub.
value | [in] A pointer to a raw stub. |
|
virtual |
Destroys the variant object.
OdTfVariantArray & OdTfVariant::asVariantArray | ( | ) |
Retrieves the current variant data as a variant array.
OdTfVariantTuple & OdTfVariant::asVariantTuple | ( | ) |
Retrieves the current variant data as a variant tuple.
|
static |
Creates a new Tf variant object with an empty value. The created variant object has the OdTfVriantType::kEmpty type.
OdDbStub * OdTfVariant::getDbStubPtr | ( | ) | const |
Retrieves the current raw data stub associated with the variant object.
|
static |
Retrieves the dimension quantity for a specified data type.
type | [in] A data type. |
const OdGUID & OdTfVariant::getGUID | ( | ) | const |
Retrieves the current GUID of the variant object.
|
static |
Retrieves the data type of an element of a multi-dimensional array defined with its data type.
type | [in] A data type that represents a multi-dimensional array. |
OdRxObject * OdTfVariant::getRxObjectWeakPtr | ( | ) | const |
Retrieves the weak pointer to an OdRxObject class instance associated with the variant object.
const OdTfVariantArray & OdTfVariant::getVariantArray | ( | ) | const |
Retrieves the current array of variant values from the object.
const OdTfVariantTuple & OdTfVariant::getVariantTuple | ( | ) | const |
Retrieves the current tuple of variant values from the object.
bool OdTfVariant::isEmpty | ( | ) | const |
Retrieves whether the variant object is empty.
bool OdTfVariant::isVariantArray | ( | ) | const |
Retrieves whether the variant object is an instance of a variant array.
|
static |
Dynamically generates a variant data type that represents an array of values with a specified data type.
itemType | [in] A data type. |
|
static |
Dynamically generates a variant data type that represents a multi-dimensional array of values with a specified data type.
nDims | [in] A quantity of the array's dimensions. |
itemType | [in] A data type. |
Dynamically generates a variant data type that represents a multi-dimensional array of values with a specified data type.
nDims | [in] A quantity of the array's dimensions. |
itemType | [in] A data type. |
Dynamically generates a variant data type that represents an array of values with a specified data type.
itemType | [in] A data type. |
|
protected |
OdTfVariant & OdTfVariant::operator= | ( | const OdTfVariant & | value | ) |
The assignment operator for two OdTfVariant objects.
value | [in] A right operand of the assignment operation. |
OdTfVariant & OdTfVariant::setDbStubPtr | ( | OdDbStub *const | value | ) |
Sets a new raw data stub for the variant object.
value | [in] A new pointer to the stub. |
OdTfVariant & OdTfVariant::setGUID | ( | const OdGUID & | value | ) |
Sets a new GUID for the variant object.
value | [in] A new GUID value. |
OdTfVariant & OdTfVariant::setRxObjectWeakPtr | ( | OdRxObject *const | value | ) |
Sets a new weak pointer to the OdRxObject class instance associated with the variant object.
value | [in] A pointer to the OdRxObject class instance. |
OdTfVariant & OdTfVariant::setVariantArray | ( | OdTfVariant::Type | type, |
const OdTfVariantArray & | value | ||
) |
Sets a new data type and variant values array for the variant object.
type | [in] A new data type value. |
value | [in] A new values array. |
OdTfVariant & OdTfVariant::setVariantTuple | ( | const OdTfVariantTuple & | value | ) |
Sets a new variant value tuple for the variant object.
value | [in] A new values tuple. |
Reimplemented from OdVariant.
|
static |
Creates a factory (if it was not created previously) for variant objects of a specified data type.
type | [in] A data type of objects that are created by the factory. |