CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
OdTfObject Class Referenceabstract

#include <TfObject.h>

Inheritance diagram for OdTfObject:
OdGiDrawable OdRxObject OdTfDatabase

Public Types

typedef OdTfPropertiesContainer::size_type PropertyIndexType
 
typedef OdTfVariantArray::size_type ItemIndexType
 
- Public Types inherited from OdGiDrawable
enum  SetAttributesFlags {
  kDrawableNone = 0 , kDrawableIsAnEntity = 1 , kDrawableUsesNesting = 2 , kDrawableIsCompoundObject = 4 ,
  kDrawableViewIndependentViewportDraw = 8 , kDrawableIsInvisible = 16 , kDrawableHasAttributes = 32 , kDrawableRegenTypeDependantGeometry = 64 ,
  kDrawableIsDimension = (kDrawableIsAnEntity + kDrawableIsCompoundObject + 128) , kDrawableRegenDraw = 256 , kDrawableStandardDisplaySingleLOD = 512 , kDrawableShadedDisplaySingleLOD = 1024 ,
  kDrawableViewDependentViewportDraw = 2048 , kDrawableBlockDependentViewportDraw = 4096 , kDrawableIsExternalReference = 8192 , kDrawableNotPlottable = 16384 ,
  kDrawableNotAllowLCS = 32768 , kDrawableMergeControlOff = 65536 , kLastFlag = kDrawableMergeControlOff
}
 
enum  DrawableType {
  kGeometry = 0 , kDistantLight = 1 , kPointLight = 2 , kSpotLight = 3 ,
  kAmbientLight , kSolidBackground , kGradientBackground , kImageBackground ,
  kGroundPlaneBackground , kViewport , kWebLight , kSkyBackground ,
  kImageBasedLightingBackground , kEnvironmentBackground = 16 , kCustomBackground
}
 

Public Member Functions

virtual const OdTfObjectgetOwner () const =0
 
virtual OdResult getProperty (const OdTfProperty *pPI, OdTfVariant &value, const ItemIndexType arrayIndex=-1) const =0
 
virtual OdResult setProperty (const OdTfProperty *pPI, const OdTfVariant &value, const ItemIndexType arrayIndex=-1)=0
 
virtual OdResult getProperty (const OdString &name, OdTfVariant &value, const ItemIndexType arrayIndex=-1, const OdTfClass *pClass=NULL) const =0
 
virtual OdResult setProperty (const OdString &name, const OdTfVariant &value, const ItemIndexType arrayIndex=-1, const OdTfClass *pClass=NULL)=0
 
virtual OdResult getProperty (const PropertyIndexType propertyIndex, OdTfVariant &value, const ItemIndexType arrayIndex=-1) const =0
 
virtual OdResult setProperty (const PropertyIndexType propertyIndex, const OdTfVariant &value, const ItemIndexType arrayIndex=-1)=0
 
- Public Member Functions inherited from OdGiDrawable
 ODRX_DECLARE_MEMBERS (OdGiDrawable)
 
virtual DrawableType drawableType () const
 
ODRX_SEALED_VIRTUAL OdUInt32 setAttributes (OdGiDrawableTraits *pTraits) const ODRX_FINAL
 
ODRX_SEALED_VIRTUAL bool worldDraw (OdGiWorldDraw *pWd) const ODRX_FINAL
 
ODRX_SEALED_VIRTUAL void viewportDraw (OdGiViewportDraw *pVd) const ODRX_FINAL
 
virtual bool isPersistent () const =0
 
virtual OdDbStub * id () const =0
 
virtual void setGsNode (OdGsCache *pGsNode)=0
 
virtual OdGsCachegsNode () const =0
 
ODRX_SEALED_VIRTUAL OdUInt32 viewportDrawLogicalFlags (OdGiViewportDraw *pVd) const ODRX_FINAL
 
virtual OdResult getGeomExtents (OdGeExtents3d &extents) const
 
ODRX_SEALED_VIRTUAL OdUInt32 regenSupportFlags () const ODRX_FINAL
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 
static void rxInit ()
 
static void rxUninit ()
 
- Protected Member Functions inherited from OdGiDrawable
 OdGiDrawable ()
 
virtual OdUInt32 subSetAttributes (OdGiDrawableTraits *traits) const =0
 
virtual bool subWorldDraw (OdGiWorldDraw *wd) const =0
 
virtual void subViewportDraw (OdGiViewportDraw *vd) const =0
 
virtual OdUInt32 subViewportDrawLogicalFlags (OdGiViewportDraw *vd) const
 
virtual OdUInt32 subRegenSupportFlags () const
 

Detailed Description

An abstract interface class that provides functionality for storing information about an object, allows
to get an access to the internal object's data (properties) and process different events triggered within the object through adding reactor objects for it. This class is an extension for the <exref target="https://docs.opendesign.com/tkernel/OdRxObject.html">OdRxObject class</exref>.

Corresponding C++ library: Od_Tf <group OdTf_Classes>

See also
<exref target="https://docs.opendesign.com/tkernel/rtti.html">Run-Time Type Identification</exref> topics in ODA Kernel SDK documentation. <exref target="https://docs.opendesign.com/tbim/tbim_tf.html">Working with the Tf Interface</exref> topics in ODA BimRv SDK documentation.

Definition at line 431 of file TfObject.h.

Member Typedef Documentation

◆ ItemIndexType

A data type that represents an item index. <group OdTf_Types>

Definition at line 448 of file TfObject.h.

◆ PropertyIndexType

A data type that represents a property index. <group OdTf_Types>

Definition at line 442 of file TfObject.h.

Member Function Documentation

◆ getOwner()

virtual const OdTfObject * OdTfObject::getOwner ( ) const
pure virtual

Retrieves the object's owner object.

Returns
Returns a pointer to the object's owner represented as an instance of the OdTfObject class.

◆ getProperty() [1/3]

virtual OdResult OdTfObject::getProperty ( const OdString & name,
OdTfVariant & value,
const ItemIndexType arrayIndex = -1,
const OdTfClass * pClass = NULL ) const
pure virtual

Retrieves the object's property value.

Parameters
name[in] A string that represents the property name.
value[out] A placeholder for the property value.
arrayIndex[in] An index of the value from the array property to be set, if the property is an array.
pClass[in] A pointer to the class object that owns the property.
Returns
Returns the result of retrieving the property's value.
Remarks
The method searches for a property object with the specified name in the array of class properties. If the property is an array and the arrayIndex parameter is specified, the method stores the value at the arrayIndex position in the value output parameter. If the property is not an array, the value of the found property object is stored in the value output parameter. If the pointer to the owner object is NULL, the method searches for the property in the hierarchy of the object's parent classes until the property with the specified name is found. If the pointer to the owner object is not NULL, the method searches for the property in the properties of the object that is specified with the pointer passed in the pClass parameter. The found property value is stored in the value output parameter. If the property value was successfully returned to a calling subroutine, the method returns the eOk value; otherwise it returns an appropriate error code (for example, if the property index or value index is not correct or any other error occurs). The method returns the eAmbiguousOutput value if there is more than one property with the specified name in the pClass owner object. In this case the first found property's value is returned.

◆ getProperty() [2/3]

virtual OdResult OdTfObject::getProperty ( const OdTfProperty * pPI,
OdTfVariant & value,
const ItemIndexType arrayIndex = -1 ) const
pure virtual

Retrieves the object's property value.

Parameters
pPI[in] A pointer to the property object that has the value to be retrieved.
value[out] A placeholder for the property value.
arrayIndex[in] An index of the value from the array property to be set, if the property is an array.
Returns
Returns the result of retrieving the property's value.
Remarks
If the property specified with the pPI pointer is an array and the arrayIndex parameter is specified, the method stores the value at the arrayIndex position in the value output parameter. If the property is not an array, the value of the property object is stored in the value output parameter. If the property value was successfully returned to a calling subroutine, the method returns the eOk value; otherwise it returns an appropriate error code (for example, if the pointer to the property is invalid, the value index is not correct, or any other error occurs).

◆ getProperty() [3/3]

virtual OdResult OdTfObject::getProperty ( const PropertyIndexType propertyIndex,
OdTfVariant & value,
const ItemIndexType arrayIndex = -1 ) const
pure virtual

Retrieves the object's property value.

Parameters
propertyIndex[in] An index of the property in the class field array.
value[out] A placeholder for the property value.
arrayIndex[in] An index of the retrieved value from the array property, if the property is an array.
Returns
Returns the result of retrieving the property's value.
Remarks
The method searches for a property object allocated at the propertyIndex position in the array of class properties. If the property is an array and the arrayIndex parameter is specified, the method stores the value at the arrayIndex position in the value output parameter. If the property is not an array, the value of the found property object is stored in the value output parameter. If the property value was successfully returned to a calling subroutine, the method returns the eOk value; otherwise it returns an appropriate error code (for example, if the property index or value index is not correct or if any other error occurs).

◆ setProperty() [1/3]

virtual OdResult OdTfObject::setProperty ( const OdString & name,
const OdTfVariant & value,
const ItemIndexType arrayIndex = -1,
const OdTfClass * pClass = NULL )
pure virtual

Sets a new value for the object's property.

Parameters
name[in] A string that represents the property name.
value[in] A new property value.
arrayIndex[in] An index of the value from the array property to be set, if the property is an array.
pClass[in] A pointer to the class object that owns the property.
Returns
Returns the result of setting the property's value.
Remarks
The method searches for a property object with the specified name in the array of class properties. If the property is an array and the arrayIndex parameter is specified, the method sets the new value at the arrayIndex position in the property array. If the property is not an array, the value of the found property object is replaced with the new value.

If the pointer to the owner object is NULL, the method searches for the property in the hierarchy of the object's parent classes until the property with the specified name is found. If the pointer to the owner object is not NULL, the method searches for the property in the properties of the object that is specified with the pointer passed in the pClass parameter. If the property was found, the method modifies it with the new value. If the property value was successfully set, the method returns the eOk value; otherwise it returns an appropriate error code (for example, if the property index or value index is not correct or if any other error occurs). The method returns the eAmbiguousOutput value if there is more than one property with the specified name in the pClass owner object. In this case the first found property's value is modified.

◆ setProperty() [2/3]

virtual OdResult OdTfObject::setProperty ( const OdTfProperty * pPI,
const OdTfVariant & value,
const ItemIndexType arrayIndex = -1 )
pure virtual

Sets a new value for the object's property.

Parameters
pPI[in] A pointer to the property object that has the value to be set.
value[in] A new property value.
arrayIndex[in] An index of the value from the array property to be set, if the property is an array.
Returns
Returns the result of setting the property's value.
Remarks
If the property specified with the pPI pointer is an array and the arrayIndex parameter is specified, the method sets the new value at the arrayIndex position in the property array. If the property is not an array, the value of the property object is replaced with the new value. If the property value was successfully set, the method returns the eOk value; otherwise it returns an appropriate error code (for example, if the pointer to the property is invalid, the value index is not correct, or any other error occurs).

◆ setProperty() [3/3]

virtual OdResult OdTfObject::setProperty ( const PropertyIndexType propertyIndex,
const OdTfVariant & value,
const ItemIndexType arrayIndex = -1 )
pure virtual

Sets a new value for the object's property.

Parameters
propertyIndex[in] An index of the property in the class field array.
value[in] A new property value.
arrayIndex[in] An index of the value from the array property to be set, if the property is an array.
Returns
Returns the result of setting the property's value.
Remarks
The method searches for a property object allocated at the propertyIndex position in the array of class properties. If the property is an array and the arrayIndex parameter is specified, the method sets the new value at the arrayIndex position in the property array. If the property is not an array, the value of the found property object is replaced with the new value. If the property value was successfully set, the method returns the eOk value; otherwise it returns an appropriate error code (for example, if the property index or value index is not correct or if any other error occurs).

The documentation for this class was generated from the following file: