Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Data Structures | Macros
TObj_Persistence.hxx File Reference
#include <NCollection_DataMap.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_HExtendedString.hxx>
#include <TDF_Label.hxx>
#include <NCollection_Sequence.hxx>
#include <NCollection_HSequence.hxx>

Data Structures

class  TObj_Persistence
 

Macros

#define _TOBJOCAF_PERSISTENCE_ACCESS_
 Declare subclass and methods of the class inherited from TObj_Object necessary for implementation of persistence This declaration should be put inside class declaration, under 'protected' modifier.
 
#define DECLARE_TOBJOCAF_PERSISTENCE(name, ancestor)
 
#define IMPLEMENT_TOBJOCAF_PERSISTENCE(name)
 Implement mechanism for registration the type for persistence This should not be used for abstract classes (while DECLARE should)
 

Macro Definition Documentation

◆ _TOBJOCAF_PERSISTENCE_ACCESS_

#define _TOBJOCAF_PERSISTENCE_ACCESS_

Declare subclass and methods of the class inherited from TObj_Object necessary for implementation of persistence This declaration should be put inside class declaration, under 'protected' modifier.

◆ DECLARE_TOBJOCAF_PERSISTENCE

#define DECLARE_TOBJOCAF_PERSISTENCE ( name,
ancestor )
Value:
name(const TObj_Persistence* p, const TDF_Label& aLabel) \
: ancestor(p, aLabel) \
{ \
initFields(); \
} /* give the object a chance to initialize its fields */ \
\
/* Creates an object of a proper type */ \
/* First argument is used just to avoid possible conflict with other constructors */ \
_TOBJOCAF_PERSISTENCE_ACCESS_ \
class Persistence_ : public TObj_Persistence \
{ \
/* Friend private class of name, is a tool providing persistence */ \
public: \
Persistence_() \
{ \
} /* register the tool */ \
virtual occ::handle<TObj_Object> New(const TDF_Label& aLabel) const; \
/* Creates an object of a proper type */ \
}; \
friend class Persistence_; \
static Persistence_ myPersistence_; /* Static field implementing persistsnce tool */
GLfloat GLfloat p
Definition OpenGl_glext.h:21564
GLuint const GLchar * name
Definition OpenGl_glext.h:857
This class provides basic operations to define a label in a data structure. A label is a feature in t...
Definition TDF_Label.hxx:55
Definition TObj_Persistence.hxx:42
Intrusive smart pointer for use with Standard_Transient class and its descendants.
Definition Standard_Handle.hxx:54

◆ IMPLEMENT_TOBJOCAF_PERSISTENCE

#define IMPLEMENT_TOBJOCAF_PERSISTENCE ( name)
Value:
name::Persistence_ name::myPersistence_; \
occ::handle<TObj_Object> name::Persistence_::New(const TDF_Label& aLabel) const \
{ \
return new name(static_cast<const TObj_Persistence*>(nullptr), aLabel); \
}

Implement mechanism for registration the type for persistence This should not be used for abstract classes (while DECLARE should)