16 #ifndef TORC_GENERIC_ROOT_HPP
17 #define TORC_GENERIC_ROOT_HPP
25 #include <boost/shared_ptr.hpp>
26 #ifdef GENOM_SERIALIZATION
27 #include <boost/serialization/access.hpp>
28 #include <boost/serialization/split_member.hpp>
29 #endif //GENOM_SERIALIZATION
44 #ifdef GENOM_SERIALIZATION
46 #endif //GENOM_SERIALIZATION
47 namespace torc {
namespace generic {
class Library; } }
48 namespace torc {
namespace generic {
class BaseVisitor; } }
69 #ifdef GENOM_SERIALIZATION
70 friend class boost::serialization::access;
71 #endif //GENOM_SERIALIZATION
185 virtual void getLibraries(std::vector<LibrarySharedPtr>& outLibraries);
258 virtual void getDesigns(std::vector<DesignSharedPtr>& outDesigns);
299 #ifdef GENOM_SERIALIZATION
300 inline const DumpRestoreData& getDumpRestoreData()
const;
302 void setDumpRestoreData(
const DumpRestoreData& inDumpRestoreData);
303 void handleNewDumpRestoreData(
const DumpRestoreData& inDumpRestoreData)
throw(
Error);
304 #endif //GENOM_SERIALIZATION
305 virtual ~Root() throw ();
312 #ifdef GENOM_SERIALIZATION
313 template <
class Archive>
void load(Archive& ar,
unsigned int);
315 template <
class Archive>
void save(Archive& ar,
unsigned int)
const;
319 void restoreAllLibraries() throw(
Error);
321 BOOST_SERIALIZATION_SPLIT_MEMBER()
322 #endif //GENOM_SERIALIZATION
323 Root(
const Root& source);
331 #ifdef GENOM_SERIALIZATION
332 DumpRestoreData mDumpRestoreData;
333 mutable std::list< std::string > mDumpedLibraries;
334 #endif //GENOM_SERIALIZATION
345 #ifdef GENOM_SERIALIZATION
346 restoreAllLibraries();
347 #endif //GENOM_SERIALIZATION
348 mLibraries.applyOnAll(action);
363 mDesignSymTab.applyOnAll(action);
388 #ifdef GENOM_SERIALIZATION
389 inline const DumpRestoreData&
390 Root::getDumpRestoreData()
const {
391 return mDumpRestoreData;
397 const DumpRestoreData& inData )
throw(Error);
400 const DumpRestoreData& inData )
throw(Error);
402 #endif //GENOM_SERIALIZATION
406 #endif // TORC_GENERIC_ROOT_HPP
An acyclic inoutVisitor implementation.
virtual void getDesigns(std::vector< DesignSharedPtr > &outDesigns)
void setVersion(const EdifVersion &inSource)
SymTab< std::string, LibrarySharedPtr > mLibraries
const EdifVersion getVersion() const
Represents class that can hold userData.
boost::shared_ptr< Design > DesignSharedPtr
virtual void removeDesign(const std::string &inName)
void applyOnAllDesigns(const _Action &action)
VisitorType< Root > Visitor
The Error object thrown by different methods of EdifOM.
virtual RootSharedPtr newRootPtr(const std::string &inName, const EdifLevel &inEdifLevel=eEdifLevel0, const std::string &inOriginalName=std::string())
const EdifLevel getLevel() const
boost::shared_ptr< Library > LibrarySharedPtr
A base class for Visitor.
Root of the EDIF Object Model.
virtual void getLibraries(std::vector< LibrarySharedPtr > &outLibraries)
virtual void addLibrary(const LibrarySharedPtr &inLibrary)
virtual LibrarySharedPtr findLibrary(const std::string &inName)
Root & operator=(const Root &source)
An object that has a name.
virtual void removeLibrary(const std::string &inName)
Represents objects that can be renamed.
virtual void addDesign(const DesignSharedPtr &inDesign)
Represents objects that have status.
virtual DesignSharedPtr findDesign(const std::string &inName)
void applyOnAllLibraries(const _Action &action)
A placeholder for a factory method.
void setLevel(const EdifLevel &inSource)
virtual void accept(BaseVisitor &inoutVisitor)
boost::shared_ptr< Root > RootSharedPtr
SymTab< std::string, DesignSharedPtr > mDesignSymTab
An object that receives an inoutVisitor.
void setCurrentLocation(const std::string &inFunction, const std::string &inFile, uint32_t inLine)