00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "torc/generic/om/LogicValue.hpp"
00017 #include "torc/generic/om/LogicValueAttributes.hpp"
00018 #include "torc/generic/om/SimulationInfo.hpp"
00019
00020 namespace torc {
00021
00022 namespace generic {
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 LogicValueSharedPtr
00036 LogicValue::Factory::newLogicValuePtr( const std::string & inName,
00037 const LogicValueAttributesSharedPtr & inAttributes,
00038 const std::string & inOriginalName,
00039 const SimulationInfoSharedPtr & inSimulationInfo ) throw(Error) {
00040 try
00041 {
00042 LogicValueSharedPtr newLogicValue;
00043 create( newLogicValue );
00044 newLogicValue->setName( inName );
00045 newLogicValue->setAttributes( inAttributes );
00046 newLogicValue->setOriginalName( inOriginalName );
00047 if( inSimulationInfo )
00048 {
00049 inSimulationInfo->addLogicValue( newLogicValue );
00050 }
00051 return newLogicValue;
00052 }
00053 catch( Error &e )
00054 {
00055 e.setCurrentLocation(
00056 __FUNCTION__, __FILE__, __LINE__ );
00057 throw;
00058 }
00059 }
00060
00061
00062
00063
00064
00065
00066
00067 void
00068 LogicValue::setAttributes(
00069 const LogicValueAttributesSharedPtr & inSource) throw() {
00070 mAttributes = inSource;
00071 }
00072
00073 void
00074 LogicValue::accept(BaseVisitor & inoutVisitor) throw(Error) {
00075 try
00076 {
00077 runVisitor( *this, inoutVisitor );
00078 }
00079 catch( Error &e )
00080 {
00081 e.setCurrentLocation(
00082 __FUNCTION__, __FILE__, __LINE__ );
00083 throw;
00084 }
00085 }
00086
00087 LogicValue::LogicValue()
00088 : Nameable(),
00089 Renamable(),
00090 Commentable(),
00091 Visitable(),
00092 ParentedObject<SimulationInfo>(),
00093 PropertyContainer(),
00094 UserDataContainer(),
00095 SelfReferencing<LogicValue>(),
00096 mAttributes() {
00097 }
00098
00099 LogicValue::~LogicValue() throw() {
00100 }
00101
00102 }
00103
00104 }