Main Page | Class Hierarchy | Data Structures | File List | Data Fields | Globals

TObj_Persistence.hxx File Reference

#include <TObj_Container.hxx>

Defines

#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).

Functions

class Handle (TObj_Object)

Define Documentation

#define _TOBJOCAF_PERSISTENCE_ACCESS_
 

#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_ () : TObj_Persistence(#name) {} /* register the tool */             \
    virtual Handle(TObj_Object) New (const TDF_Label& aLabel) const;                 \
      /* Creates an object of a proper type */                                           \
  };                                                                                     \
  friend class Persistence_;                                                             \
  static Persistence_ myPersistence_;

#define IMPLEMENT_TOBJOCAF_PERSISTENCE name   ) 
 

Value:

name::Persistence_ name::myPersistence_;                                               \
  Handle(TObj_Object) name::Persistence_::New (const TDF_Label& aLabel) const {      \
    return new name((const TObj_Persistence*)0, aLabel);                             \
  }


Function Documentation

class class Handle TObj_Object   ) 
 


Generated on Mon Aug 25 14:12:26 2008 for OpenCASCADE by  doxygen 1.4.1