torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
torc::generic::LogicValueAttributes Class Reference

This class is used within simulationInfo construct to define a logic value to use for modeling. More...

#include <LogicValueAttributes.hpp>

+ Collaboration diagram for torc::generic::LogicValueAttributes:

Data Structures

struct  LogicMap
 This structure is for logicRef and libraryRef used in logicMapInput/logicMapOutput. More...
 

Public Member Functions

const LogicValueSharedPtr getStrongLogicValue () const
 
void setStrongLogicValue (const LogicValueSharedPtr &inSource)
 
const LogicValueSharedPtr getWeakLogicValue () const
 
void setWeakLogicValue (const LogicValueSharedPtr &inSource)
 
const Value::MiNoMax getVoltageMap () const
 
void setVoltageMap (const Value::MiNoMax &value)
 
const bool getIsVoltageMapSet () const
 
const Value::MiNoMax getCurrentMap () const
 
void setCurrentMap (const Value::MiNoMax &value)
 
const bool getIsCurrentMapSet () const
 
const Value::Boolean getBooleanMap () const
 
void setBooleanMap (const Value::Boolean &value)
 
const bool getIsBooleanMapSet () const
 
void getCompoundLogicValues (std::list< LogicValueSharedPtr > &outLogicValues) const
 
void setCompoundLogicValues (const std::list< LogicValueSharedPtr > &inSource) throw (Error)
 
void getDominatedLogicValues (std::list< LogicValueSharedPtr > &outLogicValues) const
 
void setDominatedLogicValues (const std::list< LogicValueSharedPtr > &inSource) throw (Error)
 
const bool getIsIsolated () const
 
void setIsIsolated (const bool &inSource)
 
void getLogicMaps (std::list< LogicMap * > &outLogicMaps) const
 
void setLogicMaps (const std::list< LogicMap * > &inSource)
 
void addLogicMap (LogicMap *&inLogicMap) throw (Error)
 
void getResolvedLogicValues (std::list< LogicValueSharedPtr > &outLogicValues) const
 
void setResolvedLogicValues (const std::list< LogicValueSharedPtr > &inSource)
 
 LogicValueAttributes ()
 
 ~LogicValueAttributes () throw ()
 
 LogicValueAttributes (const LogicValueAttributes &source)
 
LogicValueAttributesoperator= (const LogicValueAttributes &source)
 

Private Attributes

Value::MiNoMax mVoltageMap
 
bool mIsVoltageMapSet
 
Value::MiNoMax mCurrentMap
 
bool mIsCurrentMapSet
 
Value::Boolean mBooleanMap
 
bool mIsBooleanMapSet
 
std::list< LogicValueSharedPtrmCompounds
 
LogicValueSharedPtr mWeak
 
LogicValueSharedPtr mStrong
 
std::list< LogicValueSharedPtrmDominates
 
std::list< LogicMap * > mLogicMaps
 
bool mIsIsolated
 
std::list< LogicValueSharedPtrmResolves
 

Detailed Description

This class is used within simulationInfo construct to define a logic value to use for modeling.

Definition at line 34 of file LogicValueAttributes.hpp.

Constructor & Destructor Documentation

torc::generic::LogicValueAttributes::LogicValueAttributes ( )

Definition at line 166 of file LogicValueAttributes.cpp.

166  : mVoltageMap(), mIsVoltageMapSet(false),
168  mWeak(), mStrong(), mDominates(), mLogicMaps(), mIsIsolated(false), mResolves() {}
std::list< LogicValueSharedPtr > mDominates
std::list< LogicValueSharedPtr > mResolves
std::list< LogicValueSharedPtr > mCompounds
torc::generic::LogicValueAttributes::~LogicValueAttributes ( )
throw (
)

Definition at line 170 of file LogicValueAttributes.cpp.

170  {
171  std::list<LogicMap *>::iterator it = mLogicMaps.begin();
172  for(; it != mLogicMaps.end(); it++) {
173  if(*it) {
174  delete *it;
175  *it = NULL;
176  }
177  }
178 }
torc::generic::LogicValueAttributes::LogicValueAttributes ( const LogicValueAttributes source)

Definition at line 180 of file LogicValueAttributes.cpp.

180  :
181  mVoltageMap(source.mVoltageMap), mIsVoltageMapSet(source.mIsVoltageMapSet),
182  mCurrentMap(source.mCurrentMap), mIsCurrentMapSet(source.mIsCurrentMapSet),
183  mBooleanMap(source.mBooleanMap), mIsBooleanMapSet(source.mIsBooleanMapSet),
184  mCompounds(source.mCompounds), mWeak(source.mWeak), mStrong(source.mStrong),
185  mDominates(source.mDominates), mLogicMaps(source.mLogicMaps), mIsIsolated(source.mIsIsolated),
186  mResolves(source.mResolves) {}
std::list< LogicValueSharedPtr > mDominates
std::list< LogicValueSharedPtr > mResolves
std::list< LogicValueSharedPtr > mCompounds

Member Function Documentation

void torc::generic::LogicValueAttributes::addLogicMap ( LogicMap *&  inLogicMap)
throw (Error
)

Add a logic map to the list of logic maps. If an empty pointer is supplied, it returns without doing anything.

Parameters
[in]inLogicMapA pointer to a logic map object.
Exceptions
ErrorLogic map could not be added.

Definition at line 142 of file LogicValueAttributes.cpp.

142  {
143  if(!inLogicMap) {
144  return;
145  }
146  mLogicMaps.push_back(inLogicMap);
147 }
const Value::Boolean torc::generic::LogicValueAttributes::getBooleanMap ( ) const
inline

Get the boolean value(true/false) for this logic value.

Returns
Value containing Value::Boolean

Definition at line 315 of file LogicValueAttributes.hpp.

315  {
316  return mBooleanMap;
317 }
void torc::generic::LogicValueAttributes::getCompoundLogicValues ( std::list< LogicValueSharedPtr > &  outLogicValues) const
inline

Get the list of compound logic values for this logic value.

Parameters
[out]outLogicValuesList of logic values to be appended to

Definition at line 333 of file LogicValueAttributes.hpp.

334  {
335  outLogicValues.insert(outLogicValues.end(), mCompounds.begin(), mCompounds.end());
336 }
std::list< LogicValueSharedPtr > mCompounds
const Value::MiNoMax torc::generic::LogicValueAttributes::getCurrentMap ( ) const
inline

Get the current value for this logic value.

Returns
Value containing Value::MiNoMax

Definition at line 297 of file LogicValueAttributes.hpp.

297  {
298  return mCurrentMap;
299 }
void torc::generic::LogicValueAttributes::getDominatedLogicValues ( std::list< LogicValueSharedPtr > &  outLogicValues) const
inline

Get the list of logic values, which are dominated by the current logic value

Parameters
[out]outLogicValuesList of logic values to be appended to

Definition at line 343 of file LogicValueAttributes.hpp.

344  {
345  outLogicValues.insert(outLogicValues.end(), mDominates.begin(), mDominates.end());
346 }
std::list< LogicValueSharedPtr > mDominates
const bool torc::generic::LogicValueAttributes::getIsBooleanMapSet ( ) const
inline

Get whether this object is defined with a inSource, or is undefined.

Returns
True if initialized.

Definition at line 324 of file LogicValueAttributes.hpp.

324  {
325  return mIsBooleanMapSet;
326 }
const bool torc::generic::LogicValueAttributes::getIsCurrentMapSet ( ) const
inline

Get whether this object is defined with a inSource, or is undefined.

Returns
True if initialized.

Definition at line 306 of file LogicValueAttributes.hpp.

306  {
307  return mIsCurrentMapSet;
308 }
const bool torc::generic::LogicValueAttributes::getIsIsolated ( ) const
inline

Get whether the logic value is isolated or not.

Returns
bool Whether the logic value is isolated or not.

Definition at line 353 of file LogicValueAttributes.hpp.

353  {
354  return mIsIsolated;
355 }
const bool torc::generic::LogicValueAttributes::getIsVoltageMapSet ( ) const
inline

Get whether this object is defined with a inSource, or is undefined.

Returns
True if initialized.

Definition at line 288 of file LogicValueAttributes.hpp.

288  {
289  return mIsVoltageMapSet;
290 }
void torc::generic::LogicValueAttributes::getLogicMaps ( std::list< LogicMap * > &  outLogicMaps) const
inline

Get the list of logic maps.

Parameters
[out]outLogicMapsList of logic maps to be appended to

Definition at line 372 of file LogicValueAttributes.hpp.

372  {
373  outLogicMaps.insert(outLogicMaps.end(), mLogicMaps.begin(), mLogicMaps.end());
374 }
void torc::generic::LogicValueAttributes::getResolvedLogicValues ( std::list< LogicValueSharedPtr > &  outLogicValues) const
inline

Get the list of logic values, which are resolved by the current logic value

Parameters
[out]outLogicValuesList of logic values to be appended to

Definition at line 362 of file LogicValueAttributes.hpp.

363  {
364  outLogicValues.insert(outLogicValues.end(), mResolves.begin(), mResolves.end());
365 }
std::list< LogicValueSharedPtr > mResolves
const LogicValueSharedPtr torc::generic::LogicValueAttributes::getStrongLogicValue ( ) const
inline

Get the logic value, which is used to indicate that the current logic value is stronger than the return logic value.

Returns
Pointer to the logic value

Definition at line 260 of file LogicValueAttributes.hpp.

260  {
261  return mStrong;
262 }
const Value::MiNoMax torc::generic::LogicValueAttributes::getVoltageMap ( ) const
inline

Get the voltage value for this logic value.

Returns
Value containing Value::MiNoMax

Definition at line 279 of file LogicValueAttributes.hpp.

279  {
280  return mVoltageMap;
281 }
const LogicValueSharedPtr torc::generic::LogicValueAttributes::getWeakLogicValue ( ) const
inline

Get the logic value, which is used to indicate that the current logic value is weaker than this logic value.

Returns
Pointer to the logic value

Definition at line 270 of file LogicValueAttributes.hpp.

270  {
271  return mWeak;
272 }
LogicValueAttributes & torc::generic::LogicValueAttributes::operator= ( const LogicValueAttributes source)

Definition at line 188 of file LogicValueAttributes.cpp.

188  {
189  if(this != &source) {
190  mVoltageMap = source.mVoltageMap;
191  mIsVoltageMapSet = source.mIsVoltageMapSet;
192  mCurrentMap = source.mCurrentMap;
193  mIsCurrentMapSet = source.mIsCurrentMapSet;
194  mBooleanMap = source.mBooleanMap;
195  mIsBooleanMapSet = source.mIsBooleanMapSet;
196  mCompounds = source.mCompounds;
197  mWeak = source.mWeak;
198  mStrong = source.mStrong;
199  mDominates = source.mDominates;
200  mLogicMaps = source.mLogicMaps;
201  mIsIsolated = source.mIsIsolated;
202  mResolves = source.mResolves;
203  }
204  return *this;
205 }
std::list< LogicValueSharedPtr > mDominates
std::list< LogicValueSharedPtr > mResolves
std::list< LogicValueSharedPtr > mCompounds
void torc::generic::LogicValueAttributes::setBooleanMap ( const Value::Boolean value)

Set the boolean value(true/false) for this logic value.

Parameters
[in]valueBoolean value. Must be Value::Boolean

Definition at line 67 of file LogicValueAttributes.cpp.

void torc::generic::LogicValueAttributes::setCompoundLogicValues ( const std::list< LogicValueSharedPtr > &  inSource)
throw (Error
)

Set the list of compound logic values for this logic value.

Parameters
[in]inSourceList of logic values to be appended to

Definition at line 77 of file LogicValueAttributes.cpp.

78  {
79  std::list<LogicValueSharedPtr>::const_iterator it = inSource.begin();
80  for(; it != inSource.end(); it++) {
81  try {
82  mCompounds.push_back(*it);
83  } catch(Error& e) {
84  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
85  throw;
86  }
87  }
88 }
std::list< LogicValueSharedPtr > mCompounds

+ Here is the call graph for this function:

void torc::generic::LogicValueAttributes::setCurrentMap ( const Value::MiNoMax value)

Set the current value for this logic value.

Parameters
[in]valueCurrent value. Must be Value::MiNoMax

Definition at line 57 of file LogicValueAttributes.cpp.

void torc::generic::LogicValueAttributes::setDominatedLogicValues ( const std::list< LogicValueSharedPtr > &  inSource)
throw (Error
)

Set the list of logic values, which are dominated by the current logic value

Parameters
[in]inSourceList of logic values to be appended to

Definition at line 95 of file LogicValueAttributes.cpp.

96  {
97  std::list<LogicValueSharedPtr>::const_iterator it = inSource.begin();
98  for(; it != inSource.end(); it++) {
99  try {
100  mDominates.push_back(*it);
101  } catch(Error& e) {
102  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
103  throw;
104  }
105  }
106 }
std::list< LogicValueSharedPtr > mDominates

+ Here is the call graph for this function:

void torc::generic::LogicValueAttributes::setIsIsolated ( const bool &  inSource)

Set the logic value is isolated or not, default is false

Parameters
[in]inSourcebool Whether the logic value is isolated or not.

Definition at line 113 of file LogicValueAttributes.cpp.

113  {
114  mIsIsolated = inSource;
115 }
void torc::generic::LogicValueAttributes::setLogicMaps ( const std::list< LogicMap * > &  inSource)

Set the list of logic maps.

Parameters
[in]inSourceList of logic maps to be appended to

Definition at line 122 of file LogicValueAttributes.cpp.

122  {
123  std::list<LogicMap*>::const_iterator it = inSource.begin();
124  for(; it != inSource.end(); it++) {
125  try {
126  mLogicMaps.push_back(*it);
127  } catch(Error& e) {
128  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
129  throw;
130  }
131  }
132 }

+ Here is the call graph for this function:

void torc::generic::LogicValueAttributes::setResolvedLogicValues ( const std::list< LogicValueSharedPtr > &  inSource)

Set the list of logic values, which are resolved by the current logic value

Parameters
[in]inSourceList of logic values to be appended to

Definition at line 154 of file LogicValueAttributes.cpp.

154  {
155  std::list<LogicValueSharedPtr>::const_iterator it = inSource.begin();
156  for(; it != inSource.end(); it++) {
157  try {
158  mResolves.push_back(*it);
159  } catch(Error& e) {
160  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
161  throw;
162  }
163  }
164 }
std::list< LogicValueSharedPtr > mResolves

+ Here is the call graph for this function:

void torc::generic::LogicValueAttributes::setStrongLogicValue ( const LogicValueSharedPtr inSource)

Set the logic value, which is used to indicate that the current logic value is stronger than this logic value.

Parameters
[in]inSourcePointer to the logic value

Definition at line 28 of file LogicValueAttributes.cpp.

28  {
29  mStrong = inSource;
30 }
void torc::generic::LogicValueAttributes::setVoltageMap ( const Value::MiNoMax value)

Set the voltage value for this logic value.

Parameters
[in]valueVoltage value. Must be Value::MiNoMax

Definition at line 47 of file LogicValueAttributes.cpp.

void torc::generic::LogicValueAttributes::setWeakLogicValue ( const LogicValueSharedPtr inSource)

Set the logic value, which is used to indicate that the current logic value is weaker than this logic value.

Parameters
[in]inSourcePointer to the logic value

Definition at line 38 of file LogicValueAttributes.cpp.

38  {
39  mWeak = inSource;
40 }

Field Documentation

Value::Boolean torc::generic::LogicValueAttributes::mBooleanMap
private

Definition at line 242 of file LogicValueAttributes.hpp.

std::list<LogicValueSharedPtr> torc::generic::LogicValueAttributes::mCompounds
private

Definition at line 244 of file LogicValueAttributes.hpp.

Value::MiNoMax torc::generic::LogicValueAttributes::mCurrentMap
private

Definition at line 240 of file LogicValueAttributes.hpp.

std::list<LogicValueSharedPtr> torc::generic::LogicValueAttributes::mDominates
private

Definition at line 247 of file LogicValueAttributes.hpp.

bool torc::generic::LogicValueAttributes::mIsBooleanMapSet
private

Definition at line 243 of file LogicValueAttributes.hpp.

bool torc::generic::LogicValueAttributes::mIsCurrentMapSet
private

Definition at line 241 of file LogicValueAttributes.hpp.

bool torc::generic::LogicValueAttributes::mIsIsolated
private

Definition at line 249 of file LogicValueAttributes.hpp.

bool torc::generic::LogicValueAttributes::mIsVoltageMapSet
private

Definition at line 239 of file LogicValueAttributes.hpp.

std::list<LogicMap*> torc::generic::LogicValueAttributes::mLogicMaps
private

Definition at line 248 of file LogicValueAttributes.hpp.

std::list<LogicValueSharedPtr> torc::generic::LogicValueAttributes::mResolves
private

Definition at line 250 of file LogicValueAttributes.hpp.

LogicValueSharedPtr torc::generic::LogicValueAttributes::mStrong
private

Definition at line 246 of file LogicValueAttributes.hpp.

Value::MiNoMax torc::generic::LogicValueAttributes::mVoltageMap
private

Definition at line 238 of file LogicValueAttributes.hpp.

LogicValueSharedPtr torc::generic::LogicValueAttributes::mWeak
private

Definition at line 245 of file LogicValueAttributes.hpp.


The documentation for this class was generated from the following files: