BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Event/GeneratorObject/include/DataModel/tools/PersistentState.h
Go to the documentation of this file.
1#ifndef DATAMODEL_TOOLS_PERSISTENTSTATE_H
2#define DATAMODEL_TOOLS_PERSISTENTSTATE_H 1
3
4#ifndef DATAMODEL_TOOLS_ISTORAGESTATE_H
5# include "DataModel/tools/IStorageState.h"
6#endif
8
9// the storage is in the persistable state when p_data (the proxy) is defined
10// we define the transition from persistable to identified
11// and from persistable to accessible
12
14
15public:
16 // create an instance: singleton
17 static IStorageState* instance( void );
18
19 // check whether this is a valid state
20 static bool valid( const IStoragePolicy* context );
21 virtual bool isValid( const IStoragePolicy* context ) const;
22
23 // everything is built in this state. just return
24
25 virtual void toAccessible( IStoragePolicy* );
26 virtual void toIdentified( IStoragePolicy* );
27 virtual void toPersistable( IStoragePolicy* );
28
29protected:
30 PersistentState( void ){};
31
32private:
33 static IStorageState* m_instance;
34};
35
36#endif
virtual void toIdentified(IStoragePolicy *)
virtual void toAccessible(IStoragePolicy *)
virtual bool isValid(const IStoragePolicy *context) const
virtual void toPersistable(IStoragePolicy *)
static IStorageState * instance(void)
static bool valid(const IStoragePolicy *context)