00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 00005 #ifndef BALL_CONCEPT_PERSISTENTOBJECT_H 00006 #define BALL_CONCEPT_PERSISTENTOBJECT_H 00007 00008 #ifndef BALL_CONCEPT_OBJECT_H 00009 # include <BALL/CONCEPT/object.h> 00010 #endif 00011 00012 namespace BALL 00013 { 00014 00015 class PersistenceManager; 00016 00027 class BALL_EXPORT PersistentObject 00028 : public Object 00029 { 00030 public: 00031 00035 00039 PersistentObject() 00040 00041 : Object() 00042 { 00043 } 00044 00048 virtual ~PersistentObject() 00049 00050 { 00051 } 00053 00057 00068 PersistenceManager& operator >> (PersistenceManager& pm) const 00069 throw(Exception::GeneralException); 00070 00080 virtual void persistentWrite(PersistenceManager& pm, const char* name = "") const 00081 throw(Exception::GeneralException); 00082 00094 virtual void persistentRead(PersistenceManager& pm) 00095 throw(Exception::GeneralException); 00096 00104 virtual void finalize() 00105 throw(Exception::GeneralException) 00106 { 00107 } 00109 00110 }; 00111 00112 } // namespace BALL 00113 00114 #endif // BALL_CONCEPT_PERSISTENTOBJECT_H