File indexing completed on 2026-09-20 09:19:22
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef _TDF_DerivedAttribute_HeaderFile
0015 #define _TDF_DerivedAttribute_HeaderFile
0016
0017 #include <NCollection_List.hxx>
0018 #include <TDF_Attribute.hxx>
0019
0020 class TCollection_AsciiString;
0021
0022
0023
0024
0025 #define DEFINE_DERIVED_ATTRIBUTE(Class, Base) \
0026 DEFINE_STANDARD_RTTIEXT(Class, Base); \
0027 Standard_EXPORT occ::handle<TDF_Attribute> NewEmpty() const override;
0028
0029
0030
0031
0032 #define IMPLEMENT_DERIVED_ATTRIBUTE(Class, Base) \
0033 IMPLEMENT_STANDARD_RTTIEXT(Class, Base) \
0034 static occ::handle<TDF_Attribute> TDF_DERIVED_New##Class() \
0035 { \
0036 return new Class(); \
0037 } \
0038 static TDF_DerivedAttribute::NewDerived TDF_DERIVED_##Class( \
0039 TDF_DerivedAttribute::Register(TDF_DERIVED_New##Class)); \
0040 occ::handle<TDF_Attribute> Class::NewEmpty() const \
0041 { \
0042 return TDF_DERIVED_##Class(); \
0043 }
0044
0045
0046
0047 #define IMPLEMENT_DERIVED_ATTRIBUTE_WITH_TYPE(Class, Base, NameSpace, TypeName) \
0048 IMPLEMENT_STANDARD_RTTIEXT(Class, Base) \
0049 static occ::handle<TDF_Attribute> TDF_DERIVED_New##Class() \
0050 { \
0051 return new Class(); \
0052 } \
0053 static TDF_DerivedAttribute::NewDerived TDF_DERIVED_##Class( \
0054 TDF_DerivedAttribute::Register(TDF_DERIVED_New##Class, NameSpace, TypeName)); \
0055 occ::handle<TDF_Attribute> Class::NewEmpty() const \
0056 { \
0057 return TDF_DERIVED_##Class(); \
0058 }
0059
0060
0061
0062
0063 class TDF_DerivedAttribute
0064 {
0065 public:
0066
0067 typedef occ::handle<TDF_Attribute> (*NewDerived)();
0068
0069
0070 Standard_EXPORT static NewDerived Register(NewDerived theNewAttributeFunction,
0071 const char* theNameSpace = nullptr,
0072 const char* theTypeName = nullptr);
0073
0074
0075 Standard_EXPORT static occ::handle<TDF_Attribute> Attribute(const char* theType);
0076
0077
0078 Standard_EXPORT static const TCollection_AsciiString& TypeName(const char* theType);
0079
0080
0081 Standard_EXPORT static void Attributes(NCollection_List<occ::handle<TDF_Attribute>>& theList);
0082 };
0083
0084 #endif