20 #ifdef GENOM_SERIALIZATION
21 #include <boost/archive/binary_iarchive.hpp>
22 #include <boost/archive/binary_oarchive.hpp>
23 #include <boost/serialization/is_abstract.hpp>
24 #include <boost/serialization/shared_ptr.hpp>
25 #endif //GENOM_SERIALIZATION
34 #ifdef GENOM_SERIALIZATION
35 class RestoredViewUpdater {
37 void operator()(
const ViewSharedPtr& inView)
const throw (Error) {
39 inView->setParent(mCell);
40 inView->restoreActions();
42 e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
47 RestoredViewUpdater(
const CellSharedPtr& inCell) : mCell(inCell) {
52 #endif //GENOM_SERIALIZATION
69 newCell->setName(inName);
70 newCell->setParent(inLibraryPtr);
71 inLibraryPtr->addCell(newCell);
72 newCell->setType(inCellType);
73 newCell->setOriginalName(inOriginalName);
118 if(
false == mViewSymTab.set(name, inView)) {
123 inView->setParent(getSharedThis());
157 if(
false == mViewSymTab.remove(inName)) {
167 mViewSymTab(), mType(eTypeGeneric) {}
171 #ifdef GENOM_SERIALIZATION
172 template <
class Archive>
void Cell::serialize(Archive& ar,
unsigned int) {
173 ar & boost::serialization::base_object < Commentable > (*this);
174 ar & boost::serialization::base_object < Extern > (*this);
175 ar & boost::serialization::base_object < Nameable > (*this);
176 ar & boost::serialization::base_object < PropertyContainer > (*this);
177 ar & boost::serialization::base_object < Renamable > (*this);
178 ar & boost::serialization::base_object < Visitable > (*this);
179 ar & boost::serialization::base_object < SelfReferencing<Cell> > (*this);
184 void Cell::restoreActions() throw (Error) {
188 e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
194 template void Cell::serialize<boost::archive::binary_iarchive>(boost::archive::binary_iarchive& ar,
197 template void Cell::serialize<boost::archive::binary_oarchive>(boost::archive::binary_oarchive& ar,
200 #endif //GENOM_SERIALIZATION
An object that has a parent.
void addView(const ViewSharedPtr &inView)
SymTab< std::string, ViewSharedPtr > mViewSymTab
void removeView(const std::string &inName)
Represents objects that have properties.
Represents class that can hold userData.
void applyOnAll(const _Action &action)
void runVisitor(_Tp &inoutVisited, BaseVisitor &inoutVisitor)
The Error object thrown by different methods of EdifOM.
boost::shared_ptr< Library > LibrarySharedPtr
A base class for Visitor.
bool get(const KeyType &inKey, ValueType &outValue) const
void saveContextData(const std::string &inName, const boost::any &inSource)
virtual CellSharedPtr newCellPtr(const std::string &inName, const LibrarySharedPtr &inLibraryPtr, const Cell::Type &inCellType=Cell::eTypeGeneric, const std::string &inOriginalName=std::string())
ViewSharedPtr findView(const std::string &inName)
void setType(const Type &inSource)
boost::shared_ptr< View > ViewSharedPtr
boost::shared_ptr< Cell > CellSharedPtr
An object that has a name.
Pointer getSharedThis() const
Represents objects that can be renamed.
Represents objects that have status.
virtual void accept(BaseVisitor &inoutVisitor)
An object that receives an inoutVisitor.
Used to implement external object referencing.
void setCurrentLocation(const std::string &inFunction, const std::string &inFile, uint32_t inLine)