#include <LogicElement.hpp>
Public Types | |
enum | Type { eTypeSingle = 0, eTypeList, eTypeOneOf, eTypeWaveForm, eTypeIgnored, eTypeTransition, eTypeBecomes } |
enum | RelationType { eRelationTypeParent = 0, eRelationTypeChild } |
typedef VisitorType< LogicElement > | Visitor |
Public Member Functions | |
virtual void | accept (BaseVisitor &visitor) throw (Error) |
Recive 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 sitation can arise when the passed Visitor object does not inherit from the appropriate visitor specialization. See Visitor documentation for more details. | |
const Type | getType () const throw () |
void | setType (const Type &inSource) throw () |
void | getChildren (std::vector< LogicElementSharedPtr > &outLogicElements) const throw () |
void | setChildren (const std::vector< LogicElementSharedPtr > &inSource) throw () |
bool | addChildLogicElement (const LogicElementSharedPtr &inChildLogicElement) throw () |
template<typename _Action> | |
void | applyOnAllChildren (const _Action &action) throw (Error) |
const RelationType | getRelationType () const throw () |
void | setRelationType (const RelationType &inSource) throw () |
size_t | getSize () const throw () |
Private Attributes | |
Type | mType |
RelationType | mRelationType |
std::vector < LogicElementSharedPtr > | mChildren |
Friends | |
class | FactoryType< LogicElement > |
Classes | |
class | Factory |
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 42 of file LogicElement.hpp.
Convenience class to visit a logic element.
Reimplemented from torc::generic::LogicValue.
Definition at line 77 of file LogicElement.hpp.
Logic element type
Definition at line 52 of file LogicElement.hpp.
Relation type of the logic elements, is it parent or child.
Definition at line 68 of file LogicElement.hpp.
void torc::generic::LogicElement::accept | ( | BaseVisitor & | visitor | ) | throw (Error) [virtual] |
Recive 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 sitation 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 120 of file LogicElement.cpp.
const LogicElement::Type torc::generic::LogicElement::getType | ( | void | ) | const throw () [inline] |
Get the Logic element type
Definition at line 213 of file LogicElement.hpp.
void torc::generic::LogicElement::setType | ( | const Type & | inSource | ) | throw () |
Set the Logic element type
[in] | inSource | Logic element type |
Definition at line 66 of file LogicElement.cpp.
void torc::generic::LogicElement::getChildren | ( | std::vector< LogicElementSharedPtr > & | outLogicElements | ) | const throw () [inline] |
Get the nested logic elements.
[out] | outLogicElements | Vector of logic element to be appended to |
Definition at line 223 of file LogicElement.hpp.
void torc::generic::LogicElement::setChildren | ( | const std::vector< LogicElementSharedPtr > & | inSource | ) | throw () |
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 |
[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 78 of file LogicElement.cpp.
bool torc::generic::LogicElement::addChildLogicElement | ( | const LogicElementSharedPtr & | inChildLogicElement | ) | throw () |
Add a logic element to parent logic element
[in] | inChildLogicElement | Child logic element to be added to parent |
Definition at line 103 of file LogicElement.cpp.
void torc::generic::LogicElement::applyOnAllChildren | ( | const _Action & | action | ) | throw (Error) [inline] |
Apply action on all children
[in] | action | Action to be applied |
Definition at line 235 of file LogicElement.hpp.
const LogicElement::RelationType torc::generic::LogicElement::getRelationType | ( | ) | const throw () [inline] |
void torc::generic::LogicElement::setRelationType | ( | const RelationType & | inSource | ) | throw () |
Set the relation type.
[in] | inSource | RelationType |
Definition at line 139 of file LogicElement.cpp.
size_t torc::generic::LogicElement::getSize | ( | void | ) | const throw () |
Get the total number of bits of the composition
Definition at line 148 of file LogicElement.cpp.