torc-master
|
Represents different logic elements which holds array of logic values. More...
#include <LogicElement.hpp>
Data Structures | |
class | Factory |
Public Types | |
enum | Type { eTypeSingle = 0, eTypeList, eTypeOneOf, eTypeWaveForm, eTypeIgnored, eTypeTransition, eTypeBecomes } |
enum | RelationType { eRelationTypeParent = 0, eRelationTypeChild } |
typedef VisitorType< LogicElement > | Visitor |
typedef std::string | Name |
typedef boost::shared_ptr< Type > | Pointer |
typedef boost::weak_ptr< Type > | WeakPointer |
Public Member Functions | |
virtual void | accept (BaseVisitor &visitor) throw (Error) |
Receive a visitor to this class. The visit method of the visitor is called and a reference to this object is passed as a parameter. It has to be noted however, that a dynamic_cast is performed inside this method. If the cast fails, an appropriate exception is thrown by this method. This situation can arise when the passed Visitor object does not inherit from the appropriate visitor specialization. See Visitor documentation for more details. More... | |
const Type | getType () const |
void | setType (const Type &inSource) |
void | getChildren (std::vector< LogicElementSharedPtr > &outLogicElements) const |
void | setChildren (const std::vector< LogicElementSharedPtr > &inSource) |
bool | addChildLogicElement (const LogicElementSharedPtr &inChildLogicElement) |
template<typename _Action > | |
void | applyOnAllChildren (const _Action &action) throw (Error) |
const RelationType | getRelationType () const |
void | setRelationType (const RelationType &inSource) |
size_t | getSize () const |
~LogicElement () throw () | |
const LogicValueAttributesSharedPtr | getAttributes () const |
void | setAttributes (const LogicValueAttributesSharedPtr &inSource) |
virtual const std::string | getName () const |
void | setName (const std::string &inSource) throw (Error) |
virtual Name | getOriginalName () const |
virtual void | setOriginalName (const Name &inSource) |
void | addComment (const std::string &comment) |
const std::vector< std::string > & | getComments () const |
void | setComments (const std::vector< std::string > &inSource) |
const boost::shared_ptr < SimulationInfo > | getParent () const |
virtual void | setParent (const boost::shared_ptr< SimulationInfo > &inSource) |
PropertySharedPtr | getProperty (const std::string &inName) |
bool | setProperty (const std::string &inName, const PropertySharedPtr &inProperty) |
void | getProperties (std::map< std::string, PropertySharedPtr > &outProperties) const |
void | setProperties (const std::map< std::string, PropertySharedPtr > &inSource) |
template<typename _Action > | |
void | applyOnAllProperties (const _Action &action) throw (Error) |
void | getUserData (std::list< std::string > &outUserData) const |
void | setUserData (const std::list< std::string > &inSource) |
void | addUserData (const std::string &inSource) |
void | setWeakThis (const WeakPointer &inWeakThis) |
Pointer | getSharedThis () const |
Protected Member Functions | |
LogicElement () | |
Private Attributes | |
Type | mType |
RelationType | mRelationType |
std::vector < LogicElementSharedPtr > | mChildren |
Friends | |
class | FactoryType< LogicElement > |
Represents different logic elements which holds array of logic values.
The LogicElement class is used to represent different logic elements constructs in EDIF like logicWaveForm, logicOneOf, logicList, transition, becomes, ignore and logic value name.
Definition at line 41 of file LogicElement.hpp.
|
inherited |
Definition at line 40 of file generic/Renamable.hpp.
|
inherited |
Definition at line 36 of file SelfReferencing.hpp.
Convenience class to visit a logic element.
Definition at line 67 of file LogicElement.hpp.
|
inherited |
Definition at line 37 of file SelfReferencing.hpp.
Relation type of the logic elements, is it parent or child.
Enumerator | |
---|---|
eRelationTypeParent | |
eRelationTypeChild |
Definition at line 60 of file LogicElement.hpp.
Logic element type
Enumerator | |
---|---|
eTypeSingle | |
eTypeList | |
eTypeOneOf | |
eTypeWaveForm | |
eTypeIgnored | |
eTypeTransition | |
eTypeBecomes |
Definition at line 50 of file LogicElement.hpp.
torc::generic::LogicElement::~LogicElement | ( | ) | ||
throw | ( | |||
) |
Definition at line 171 of file LogicElement.cpp.
|
protected |
Definition at line 169 of file LogicElement.cpp.
|
virtual |
Receive a visitor to this class. The visit method of the visitor is called and a reference to this object is passed as a parameter. It has to be noted however, that a dynamic_cast is performed inside this method. If the cast fails, an appropriate exception is thrown by this method. This situation can arise when the passed Visitor object does not inherit from the appropriate visitor specialization. See Visitor documentation for more details.
[in,out] | visitor | A reference to the visitor object |
Error | Visitor type inappropriate for visiting this object or any other error thrown by the Visitor::throw() method. |
Reimplemented from torc::generic::LogicValue.
Definition at line 98 of file LogicElement.cpp.
bool torc::generic::LogicElement::addChildLogicElement | ( | const LogicElementSharedPtr & | inChildLogicElement | ) |
Add a logic element to parent logic element
[in] | inChildLogicElement | Child logic element to be added to parent |
Definition at line 86 of file LogicElement.cpp.
|
inherited |
Add a comment to the object
[in] | comment | The comment to add to an existing list of comments |
Definition at line 36 of file Commentable.cpp.
|
inherited |
Add an user data to the list of user data
[in] | inSource | An user data as string |
Definition at line 34 of file UserDataContainer.cpp.
|
inline |
Apply action on all children
[in] | action | Action to be applied |
Definition at line 204 of file LogicElement.hpp.
|
inlineinherited |
Apply action on all properties.
[in] | action | Action to be applied |
Definition at line 113 of file PropertyContainer.hpp.
|
inlineinherited |
Get the attributes of the LogicValue. Attributes include voltageMap, currentMap, booleanMap, compound, weak, strong, dominates etc.
Definition at line 125 of file LogicValue.hpp.
|
inline |
Get the nested logic elements.
[out] | outLogicElements | Vector of logic element to be appended to |
Definition at line 196 of file LogicElement.hpp.
|
inlineinherited |
Get the list of all comments
Definition at line 85 of file Commentable.hpp.
|
inlinevirtualinherited |
Get the object name
Definition at line 89 of file Nameable.hpp.
|
inlinevirtualinherited |
Get the new name provided for the object.
Definition at line 78 of file generic/Renamable.hpp.
|
inlineinherited |
Get a pointer to the parent object
|
inlineinherited |
Get the map of all properties
[out] | outProperties | The map of properties |
Get the map of all properties
Definition at line 107 of file PropertyContainer.hpp.
|
inherited |
Get a property
[in] | inName | Name of the property to be retreived |
Get a property
[in] | name | Name of the property to be retreived |
Definition at line 37 of file PropertyContainer.cpp.
|
inline |
Get the relation type.
Definition at line 222 of file LogicElement.hpp.
|
inlineinherited |
Get a shared pointer to this object. A valid pointer is returned if weakThis was set. Otherwise this returns a NULL pointer. For Vector types, the second scenario is an exception condition and should be treated as such.
Get a shared pointer to this object. A valid pointer is returned if weakThis was set. Otherwise this returns a NULL pointer. For Vector types, the second scenario is an exception condition and should be treated as such.
[out] | ptr | Set to a shared pointer to this object |
size_t torc::generic::LogicElement::getSize | ( | void | ) | const |
Get the total number of bits of the composition
Definition at line 120 of file LogicElement.cpp.
|
inline |
Get the Logic element type
Definition at line 187 of file LogicElement.hpp.
|
inlineinherited |
Get the list of all userData
[out] | outUserData | The list of all userData |
Definition at line 78 of file UserDataContainer.hpp.
|
inherited |
Set the attributes of the LogicValue. Attributes include voltageMap, currentMap, booleanMap, compound, weak, strong, dominates etc.
[in] | inSource | Pointer to LogicValueAttributes object. |
Definition at line 59 of file LogicValue.cpp.
void torc::generic::LogicElement::setChildren | ( | const std::vector< LogicElementSharedPtr > & | inSource | ) |
Set the nested logic elements.
[in] | inSource | Vector containing logic elements. |
Error | Could not add child logic elements because pointer to the logic elements does not exist |
Definition at line 68 of file LogicElement.cpp.
|
inherited |
Get the list of all comments
[in] | inSource | A list of all comments to be set on this object |
Definition at line 45 of file Commentable.cpp.
|
inherited |
Set a name for this object
[in] | inSource | Name of the object |
Error | Could not set name, because name is empty (Will be used by array members)
|
Set a name for this object
[in] | inSource | Name of the object |
Error | Could not set name, because name is empty (Will be used by array members) |
Definition at line 41 of file Nameable.cpp.
|
virtualinherited |
Set the new name provided for the object.
[in] | inSource | Name of the object |
Definition at line 35 of file generic/Renamable.cpp.
|
virtualinherited |
Set a pointer to the parent
[in] | inSource | Set a pointer to the parent |
|
inherited |
Set the map of properties
[in] | inSource | The map of properties |
Definition at line 66 of file PropertyContainer.cpp.
|
inherited |
Save the inSource of a property
[in] | inName | Name of the property to be saved |
[in] | inProperty | Pointer to the property object if present, empty pointer otherwise. |
Save the inSource of a property
[in] | inName | Name of the property to be saved |
[in] | inPoperty | Pointer to the property object if present, empty pointer otherwise. |
Definition at line 53 of file PropertyContainer.cpp.
void torc::generic::LogicElement::setRelationType | ( | const RelationType & | inSource | ) |
Set the relation type.
[in] | inSource | RelationType |
Definition at line 112 of file LogicElement.cpp.
void torc::generic::LogicElement::setType | ( | const Type & | inSource | ) |
Set the Logic element type
[in] | inSource | Logic element type |
Definition at line 57 of file LogicElement.cpp.
|
inherited |
Set the list of userData
[in] | inSource | The list of UserData |
Definition at line 26 of file UserDataContainer.cpp.
|
inlineinherited |
Set a weak pointer to this object. This will be used later to get a shared pointer to this object from within other member methods if required. This should be called by the Factory creating the object.
[in] | weakThis | A weak pointer to this object |
|
friend |
Definition at line 43 of file LogicElement.hpp.
|
private |
Definition at line 178 of file LogicElement.hpp.
|
private |
Definition at line 177 of file LogicElement.hpp.
|
private |
Definition at line 176 of file LogicElement.hpp.