torc::generic::LogicElement Class Reference

Represents different logic elements which holds array of logic values. More...

#include <LogicElement.hpp>

Inheritance diagram for torc::generic::LogicElement:

Inheritance graph
[legend]
Collaboration diagram for torc::generic::LogicElement:

Collaboration graph
[legend]

List of all members.

Public Types

enum  Type {
  eTypeSingle = 0, eTypeList, eTypeOneOf, eTypeWaveForm,
  eTypeIgnored, eTypeTransition, eTypeBecomes
}
enum  RelationType { eRelationTypeParent = 0, eRelationTypeChild }
typedef VisitorType< LogicElementVisitor

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


Detailed Description

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 42 of file LogicElement.hpp.


Member Typedef Documentation

Convenience class to visit a logic element.

Reimplemented from torc::generic::LogicValue.

Definition at line 77 of file LogicElement.hpp.


Member Enumeration Documentation

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.


Member Function Documentation

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.

Parameters:
[in,out] visitor A reference to the visitor object
Exceptions:
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

Returns:
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

Parameters:
[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.

Parameters:
[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.

Parameters:
[in] inSource Vector containing logic elements.
Exceptions:
Error Could not add child logic elements because pointer to the logic elements does not exist
Set the nested logic elements.

Parameters:
[in] inSource Vector containing logic elements.
Exceptions:
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

Parameters:
[in] inChildLogicElement Child logic element to be added to parent

Definition at line 103 of file LogicElement.cpp.

template<typename _Action>
void torc::generic::LogicElement::applyOnAllChildren ( const _Action &  action  )  throw (Error) [inline]

Apply action on all children

Parameters:
[in] action Action to be applied

Definition at line 235 of file LogicElement.hpp.

const LogicElement::RelationType torc::generic::LogicElement::getRelationType (  )  const throw () [inline]

Get the relation type.

Returns:
RelationType

Definition at line 258 of file LogicElement.hpp.

void torc::generic::LogicElement::setRelationType ( const RelationType inSource  )  throw ()

Set the relation type.

Parameters:
[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

Returns:
Number of bits

Definition at line 148 of file LogicElement.cpp.


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

Generated on Thu Oct 13 16:50:08 2011 for TORC by  doxygen 1.5.6