Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Data Structures | Macros
TDF_DerivedAttribute.hxx File Reference
#include <NCollection_List.hxx>
#include <TDF_Attribute.hxx>

Data Structures

class  TDF_DerivedAttribute
 Class provides global access (through static methods) to all derived attributes information. It is used internally by macros for registration of derived attributes and driver-tables for getting this data. More...
 

Macros

#define DEFINE_DERIVED_ATTRIBUTE(Class, Base)
 Defines declaration of Handle method and declares methods for serialization of derived attribute.
 
#define IMPLEMENT_DERIVED_ATTRIBUTE(Class, Base)
 Defines implementation of Handle method, serialization methods and registers the derived attribute.
 
#define IMPLEMENT_DERIVED_ATTRIBUTE_WITH_TYPE(Class, Base, NameSpace, TypeName)
 Defines implementation of Handle method and registers the derived attribute.
 

Macro Definition Documentation

◆ DEFINE_DERIVED_ATTRIBUTE

#define DEFINE_DERIVED_ATTRIBUTE ( Class,
Base )
Value:
DEFINE_STANDARD_RTTIEXT(Class, Base); \
Standard_EXPORT occ::handle<TDF_Attribute> NewEmpty() const override;
#define DEFINE_STANDARD_RTTIEXT(Class, Base)
Helper macro to be included in definition of the classes inheriting Standard_Transient to enable use ...
Definition Standard_Type.hxx:69
Intrusive smart pointer for use with Standard_Transient class and its descendants.
Definition Standard_Handle.hxx:54

Defines declaration of Handle method and declares methods for serialization of derived attribute.

◆ IMPLEMENT_DERIVED_ATTRIBUTE

#define IMPLEMENT_DERIVED_ATTRIBUTE ( Class,
Base )
Value:
static occ::handle<TDF_Attribute> TDF_DERIVED_New##Class() \
{ \
return new Class(); \
} \
static TDF_DerivedAttribute::NewDerived TDF_DERIVED_##Class( \
TDF_DerivedAttribute::Register(TDF_DERIVED_New##Class)); \
occ::handle<TDF_Attribute> Class::NewEmpty() const \
{ \
return TDF_DERIVED_##Class(); \
}
#define IMPLEMENT_STANDARD_RTTIEXT(Class, Base)
Defines implementation of type descriptor and DynamicType() function.
Definition Standard_Type.hxx:81
static NewDerived Register(NewDerived theNewAttributeFunction, const char *theNameSpace=nullptr, const char *theTypeName=nullptr)
Registers a derived by the pointer to a method that creates a new derived attribute instance.
occ::handle< TDF_Attribute >(* NewDerived)()
A function of derived attribute that returns a new attribute instance.
Definition TDF_DerivedAttribute.hxx:67

Defines implementation of Handle method, serialization methods and registers the derived attribute.

◆ IMPLEMENT_DERIVED_ATTRIBUTE_WITH_TYPE

#define IMPLEMENT_DERIVED_ATTRIBUTE_WITH_TYPE ( Class,
Base,
NameSpace,
TypeName )
Value:
static occ::handle<TDF_Attribute> TDF_DERIVED_New##Class() \
{ \
return new Class(); \
} \
static TDF_DerivedAttribute::NewDerived TDF_DERIVED_##Class( \
TDF_DerivedAttribute::Register(TDF_DERIVED_New##Class, NameSpace, TypeName)); \
occ::handle<TDF_Attribute> Class::NewEmpty() const \
{ \
return TDF_DERIVED_##Class(); \
}

Defines implementation of Handle method and registers the derived attribute.