Open CASCADE Technology 7.8.2.dev
TDF_DerivedAttribute.hxx File Reference

Data Structures

class  TDF_DerivedAttribute
 Class provides global access (through static methods) to all derived attributres 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 Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
#define Handle(Class)
Define Handle() macro.
Definition Standard_Handle.hxx:399
#define Standard_OVERRIDE
Should be used in declarations of virtual methods overridden in the derived classes,...
Definition Standard_Macro.hxx:41
#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:104
A class each application has to implement. It is used to contain the application data....
Definition TDF_Attribute.hxx:131

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

◆ IMPLEMENT_DERIVED_ATTRIBUTE

#define IMPLEMENT_DERIVED_ATTRIBUTE ( Class,
Base )
Value:
static Handle(TDF_Attribute) TDF_DERIVED_New##Class() { return new Class(); } \
static TDF_DerivedAttribute::NewDerived TDF_DERIVED_##Class( \
TDF_DerivedAttribute::Register(TDF_DERIVED_New##Class)); \
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:112
Handle< TDF_Attribute >(*) NewDerived()
A function of derived attribute that returns a new attribute instance.
Definition TDF_DerivedAttribute.hxx:55
static NewDerived Register(NewDerived theNewAttributeFunction, Standard_CString theNameSpace=NULL, Standard_CString theTypeName=NULL)
Registers a derived by the pointer to a method that creates a new derived attribute instance.

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 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)); \
Handle(TDF_Attribute) Class::NewEmpty() const { return TDF_DERIVED_##Class(); } \

Defines implementation of Handle method and registers the derived attribute.