1 #ifndef PERSISTENCEMANAGER_H 2 #define PERSISTENCEMANAGER_H 9 template <
class T,
int NumExtAlloc>
46 static std::map<const TPZSavable *, int64_t>
mObjMap;
52 static void CloseWrite();
58 static unsigned int OpenRead(
const std::string &fileName,
streamType =
binary);
59 static void TranslateNextPointer(
TPZChunkInTranslation& chunk,
const std::map<std::string, uint64_t>& toVersion);
60 static void TranslatePointers(
TPZChunkInTranslation& chunk,
const std::map<std::string, uint64_t>& toVersion);
61 static int64_t NewChunkInTranslation();
65 static TPZSavable *GetInstance(
const int64_t &objId);
68 static std::shared_ptr<TPZSavable> GetSharedPointer(
const int64_t &objId);
70 static std::shared_ptr<TPZSavable> GetSharedPointer(
TPZStream *stream);
71 static void CloseRead();
73 static void AddInstanceToVec(
TPZSavable *,
const int &
id);
77 #endif // PERSISTENCEMANAGER_H static std::list< std::map< std::string, uint64_t > > mVersionHistory
Class for creating a bidirectional circular buffer.
static std::map< const TPZSavable *, int64_t > mObjMap
static TPZVec< const TPZSavable * > mPointersToSave
Implements a vector class which allows to use external storage provided by the user. Utility.
static int64_t mNextPointerToSave
static TPZVec< TPZAutoPointer< TPZChunkInTranslation > > mChunksVec
static TPZGeneralFStream * mpStream
static unsigned int mNextMainObjIndex
static TPZContBufferedStream mCurrentObjectStream
static std::map< std::string, uint64_t > mFileVersionInfo
static TPZVec< int64_t > mMainObjIds
static TPZContBufferedStream mObjectsStream
static TPZVec< TPZRestoredInstance > mObjVec
Defines the interface for saving and reading data. Persistency.
This class defines the interface to save and restore objects from TPZStream objects. Persistency.
This class implements a reference counter mechanism to administer a dynamically allocated object...