/******************************************************************************* PURPOSE: (List for checkpointable list container.) PROGRAMMERS: (((Thomas Brain) (Metecs) (May 2013) (--))) *******************************************************************************/ #ifndef CHECKPOINTHELPER_LIST_HH_ #define CHECKPOINTHELPER_LIST_HH_ #include "CheckpointItem.hh" #include namespace CheckpointHelper { template class list: public CheckpointItem, public std::list { public: T ** chkpt; std::string mmstr; list(T ** chkptIn, std::string mmstrIn) : chkpt(chkptIn), mmstr(mmstrIn) { *chkpt = 0x0; } list& operator=(const std::list& pr) { std::list::operator=(pr); return *this; } virtual ~list() { } virtual void checkpoint() { chkpt_seq::iterator, T>(*this); } virtual void restart() { restart_seq::iterator>(*this); } }; } #if (!defined(SWIG) && !defined(TRICK_ICG)) #define STLLIST( type, varName ) \ type* _##varName; \ CheckpointHelper::list varName #else #define STLLIST( type, varName ) \ type* _##varName #endif #if (!defined(SWIG) && !defined(TRICK_ICG)) #ifndef STL_CSTR1 #define STL_CSTR1( varName, type ) \ varName( &_##varName, #type ) #endif #else #ifndef STL_CSTR1 #define STL_CSTR1( varName, type ) \ _##varName() #endif #endif #define STLLISTCSTR STL_CSTR1 #endif /* STLHELPER_LIST_HH_ */