first commit
This commit is contained in:
116
Lab6/prsstent.h
Normal file
116
Lab6/prsstent.h
Normal file
@@ -0,0 +1,116 @@
|
||||
//## begin module.cm preserve=no
|
||||
|
||||
// %X% %Q% %Z% %W%
|
||||
|
||||
//## end module.cm
|
||||
|
||||
|
||||
|
||||
//## begin module.cp preserve=no
|
||||
|
||||
//## end module.cp
|
||||
|
||||
|
||||
|
||||
//## Module: Persistent; Pseudo Package specification
|
||||
|
||||
//## Subsystem: Figures
|
||||
|
||||
//## Source file: Prsstent.h
|
||||
|
||||
|
||||
|
||||
#ifndef Prsstent_h
|
||||
|
||||
#define Prsstent_h 1
|
||||
|
||||
|
||||
|
||||
//## begin module.additionalIncludes preserve=no
|
||||
|
||||
//## end module.additionalIncludes
|
||||
|
||||
|
||||
|
||||
//## begin module.includes preserve=yes
|
||||
|
||||
//## end module.includes
|
||||
|
||||
|
||||
|
||||
// InstMap
|
||||
|
||||
#include "InstMap.h"
|
||||
|
||||
// PStream
|
||||
|
||||
//#include "PStream.h"
|
||||
|
||||
//## begin module.additionalDeclarations preserve=yes
|
||||
|
||||
class PStream;
|
||||
|
||||
|
||||
|
||||
#define DECLARE_PERSISTENT(X) \
|
||||
|
||||
char* name() const {return #X;} \
|
||||
|
||||
Persistent* clone() const {return new X(*this);} \
|
||||
|
||||
static Persistent* _pobj;
|
||||
|
||||
|
||||
|
||||
#define IMPLEMENT_PERSISTENT(X) \
|
||||
|
||||
Persistent* X::_pobj = Persistent::addType(#X, new X);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//## end module.additionalDeclarations
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//## Class: Persistent
|
||||
|
||||
//## Category: Persist
|
||||
|
||||
//## Subsystem: Figures
|
||||
|
||||
//## Persistence: Transient
|
||||
|
||||
//## Cardinality/Multiplicity: n
|
||||
|
||||
|
||||
|
||||
//## Uses: <unnamed>; PStream { -> }
|
||||
|
||||
|
||||
|
||||
class Persistent
|
||||
|
||||
{
|
||||
|
||||
//## begin Persistent.initialDeclarations preserve=yes
|
||||
|
||||
//## end Persistent.initialDeclarations
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//## Constructors (generated)
|
||||
|
||||
Persistent();
|
||||
|
||||
|
||||
|
||||
//## Destructor (generated)
|
||||
|
||||
~Persistent();
|
||||
|
||||
Reference in New Issue
Block a user