Open CASCADE Technology  7.6.0
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 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. More...
 
#define IMPLEMENT_DERIVED_ATTRIBUTE(Class, Base)
 Defines implementation of Handle method, serialization methods and registers the derived attribute. More...
 
#define IMPLEMENT_DERIVED_ATTRIBUTE_WITH_TYPE(Class, Base, NameSpace, TypeName)
 Defines implementation of Handle method and registers the derived attribute. More...
 

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:407
#define Standard_OVERRIDE
Should be used in declarations of virtual methods overridden in the derived classes,...
Definition: Standard_Macro.hxx:37
#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:108
A class each application has to implement. It is used to contain the application data....
Definition: TDF_Attribute.hxx:136

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:116
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.
Handle< TDF_Attribute >(* NewDerived)()
A function of derived attribute that returns a new attribute instance.
Definition: TDF_DerivedAttribute.hxx:55

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.