00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef HAVE_CONFIG_H
00017 #include "torc/generic/config.h"
00018 #endif
00019
00020 #include "torc/generic/om/Design.hpp"
00021
00022 namespace torc {
00023
00024 namespace generic {
00025
00026 DesignSharedPtr
00027 Design::Factory::newDesignPtr( const std::string &inName,
00028 const RootSharedPtr &inRootPtr,
00029 const std::string &inCellRefName,
00030 const std::string &inLibraryRefName,
00031 const std::string &inOriginalName ) throw(Error) {
00032 try
00033 {
00034 DesignSharedPtr newDesign;
00035 create( newDesign );
00036 newDesign->setName( inName );
00037 newDesign->setParent( inRootPtr );
00038 inRootPtr->addDesign( newDesign );
00039 newDesign->setCellRefName( inCellRefName );
00040 newDesign->setLibraryRefName( inLibraryRefName );
00041 newDesign->setOriginalName( inOriginalName );
00042 return newDesign;
00043 }
00044 catch( Error &e )
00045 {
00046 e.setCurrentLocation( __FUNCTION__,
00047 __FILE__, __LINE__ );
00048 throw;
00049 }
00050 }
00051
00052 void
00053 Design::accept(BaseVisitor & inoutVisitor) throw(Error) {
00054 try
00055 {
00056 runVisitor( *this, inoutVisitor );
00057 }
00058 catch( Error &e )
00059 {
00060 e.setCurrentLocation( __FUNCTION__,
00061 __FILE__, __LINE__ );
00062 throw;
00063 }
00064 }
00065
00066 Design::Design()
00067 :Nameable(),
00068 Commentable(),
00069 PropertyContainer(),
00070 Renamable(),
00071 Visitable(),
00072 ParentedObject<Root>(),
00073 SelfReferencing<Design>(),
00074 UserDataContainer(),
00075 StatusContainer(),
00076 mCellRefName(),
00077 mLibraryRefName() {
00078 }
00079
00080 Design::Design( const std::string & inCellRefName,
00081 const std::string &inLibraryRefName )
00082 :Nameable(),
00083 Commentable(),
00084 PropertyContainer(),
00085 Renamable(),
00086 Visitable(),
00087 ParentedObject<Root>(),
00088 SelfReferencing<Design>(),
00089 UserDataContainer(),
00090 StatusContainer(),
00091 mCellRefName( inCellRefName ),
00092 mLibraryRefName( inLibraryRefName ) {
00093 }
00094
00095 Design::~Design() throw() {
00096 }
00097
00098 void
00099 Design::setCellRefName( const std::string & inCellRefName ) throw(){
00100 mCellRefName = inCellRefName;
00101 }
00102
00103 void
00104 Design::setLibraryRefName( const std::string & inLibraryRefName ) throw(){
00105 mLibraryRefName = inLibraryRefName;
00106 }
00107
00108 }
00109
00110 }