BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Event/GeneratorObject/include/DataModel/tools/DefaultState.h
Go to the documentation of this file.
1#ifndef DATAMODEL_TOOLS_DEFAULTSTATE_H
2#define DATAMODEL_TOOLS_DEFAULTSTATE_H 1
3
4#ifndef DATAMODEL_TOOLS_ISTORAGESTATE_H
5# include "DataModel/tools/IStorageState.h"
6#endif
8
9// the storage is in the Default state when pointer, proxy or id are not
10// known. Only T and hence CLID is know. A transition will retrieve
11// the Default Object from StoreGate for this T.
12// we define the transition from Default to Accessible, Identified
13// and persistable states:
14
16
17public:
18 // create an instance: singleton
19 static IStorageState* instance( void );
20
21 // check whether this is a valid state
22 static bool valid( const IStoragePolicy* context );
23 virtual bool isValid( const IStoragePolicy* context ) const;
24
25 // Access methods: Input IDtype for each method below:
26
27 virtual void toAccessible( IStoragePolicy* context );
28 virtual void toIdentified( IStoragePolicy* context );
29 virtual void toPersistable( IStoragePolicy* context );
30
31protected:
32 DefaultState( void ){};
33
34private:
35 static IStorageState* m_instance;
36};
37
38#endif
virtual bool isValid(const IStoragePolicy *context) const
virtual void toIdentified(IStoragePolicy *context)
virtual void toAccessible(IStoragePolicy *context)
virtual void toPersistable(IStoragePolicy *context)
static IStorageState * instance(void)
static bool valid(const IStoragePolicy *context)