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

Represents a parameter object in EDIF. More...

#include <Parameter.hpp>

+ Inheritance diagram for torc::generic::Parameter:
+ Collaboration diagram for torc::generic::Parameter:

Public Types

typedef Parameter Type
 
typedef boost::shared_ptr< TypePointer
 
typedef boost::weak_ptr< TypeWeakPointer
 
typedef std::vector< PointerList
 
typedef size_t SizeType
 
typedef std::string Name
 

Public Member Functions

virtual ~Parameter () throw ()
 
const Value getValue () const
 
void setValue (const Value &inSource)
 
virtual const Unit getUnit () const
 
virtual void setUnit (const Unit &inSource)
 
virtual CompositionType getCompositionType () const =0
 
virtual size_t getSize () const =0
 
virtual void getChildren (List &outChildren) const =0 throw (Error)
 
virtual const Pointer get (const std::vector< SizeType > &inIndices) const =0 throw (Error)
 
virtual void setParentCollection (const Pointer &inParentCollection)
 
virtual Pointer getParentCollection () const
 
void setWeakThis (const WeakPointer &inWeakThis)
 
Pointer getSharedThis () const
 
virtual const std::string getName () const
 
void setName (const std::string &inSource) throw (Error)
 
virtual Name getOriginalName () const
 
virtual void setOriginalName (const Name &inSource)
 
virtual void accept (BaseVisitor &inoutVisitor)=0 throw (Error)
 

Protected Member Functions

 Parameter ()
 

Private Member Functions

 Parameter (const Parameter &source)
 
Parameteroperator= (const Parameter &source)
 

Private Attributes

Value mValue
 
Unit mUnit
 

Detailed Description

Represents a parameter object in EDIF.

In EDIF, the Cell and Instance objects can have associated parameters. The parameters defined in a cell can be overridden during instanciation.

Definition at line 38 of file Parameter.hpp.

Member Typedef Documentation

typedef std::vector<Pointer> torc::generic::Composite< Parameter >::List
inherited

List of Shared Pointers to objects of type Type

Definition at line 61 of file Composite.hpp.

typedef std::string torc::generic::Renamable::Name
inherited

Definition at line 40 of file generic/Renamable.hpp.

typedef boost::shared_ptr<Type> torc::generic::Composite< Parameter >::Pointer
inherited

Shared Pointer to object of type Type

Definition at line 55 of file Composite.hpp.

typedef size_t torc::generic::Composite< Parameter >::SizeType
inherited

Definition at line 62 of file Composite.hpp.

Definition at line 50 of file Composite.hpp.

typedef boost::weak_ptr<Type> torc::generic::Composite< Parameter >::WeakPointer
inherited

Definition at line 56 of file Composite.hpp.

Constructor & Destructor Documentation

torc::generic::Parameter::Parameter ( )
protected
torc::generic::Parameter::~Parameter ( )
throw (
)
virtual

Definition at line 38 of file Parameter.cpp.

38 {}
torc::generic::Parameter::Parameter ( const Parameter source)
private

Member Function Documentation

virtual void torc::generic::Visitable::accept ( BaseVisitor inoutVisitor)
throw (Error
)
pure virtualinherited

Receive an inoutVisitor to this class. The visit method of the inoutVisitor 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 inoutVisitor specialization. See Visitor documentation for more details.

Parameters
[in,out]inoutVisitorA reference to the inoutVisitor object
Exceptions
ErrorVisitor type inappropriate for visiting this object or any other error thrown by the Visitor::throw() method.

Implemented in torc::generic::Root, torc::generic::Permutable, torc::generic::PortBundle, torc::generic::Status, torc::generic::VectorPort, torc::generic::View, torc::generic::InterfaceJoinedInfo, torc::generic::LogicElement, torc::generic::ParameterArray, torc::generic::InstanceArray, torc::generic::Cell, torc::generic::VectorPortReference, torc::generic::VectorNet, torc::generic::Library, torc::generic::LogicValue, torc::generic::Simulate, torc::generic::Property, torc::generic::SingleParameter, torc::generic::Design, torc::generic::SimulationInfo, torc::generic::NetBundle, torc::generic::PortBundleReference, torc::generic::ScalarPort, torc::generic::ScalarNet, torc::generic::ScalarPortReference, torc::generic::SingleInstance, torc::generic::LogicalResponse, torc::generic::InstanceArrayMember, torc::generic::ParameterArrayElement, torc::generic::Event, torc::generic::VectorNetBit, torc::generic::VectorPortBit, torc::generic::Timing, torc::generic::ForbiddenEvent, torc::generic::VectorPortBitReference, and torc::generic::Apply.

virtual const Pointer torc::generic::Composite< Parameter >::get ( const std::vector< SizeType > &  inIndices) const
throw (Error
)
pure virtualinherited

Get a specific member of this composition.

Note
This is relevant for Vector composition only. Other compositions return a NULL pointer
Parameters
[in]inIndicesA list of indices to be accessed. The number of indices must be equal to the number of dimensions.
Returns
A pointer to the child situated at the specified indices. For non-relevant types a NULL pointer is returned
Exceptions
ErrorIndex dimensions mismatch

Implemented in torc::generic::Vector< Parameter, ParameterArrayElement, ParameterArrayElement::Factory, false >, torc::generic::VectorBit< Parameter >, and torc::generic::Scalar< Parameter >.

virtual void torc::generic::Composite< Parameter >::getChildren ( List outChildren) const
throw (Error
)
pure virtualinherited

Get children of this composition.

Note
This is relevant for Vector and Bundle compositions only. Other compositions return a NULL pointer
Parameters
[out]outChildrenA list of all children for this composition

Implemented in torc::generic::Vector< Parameter, ParameterArrayElement, ParameterArrayElement::Factory, false >, torc::generic::Scalar< Parameter >, and torc::generic::VectorBit< Parameter >.

virtual CompositionType torc::generic::Composite< Parameter >::getCompositionType ( ) const
pure virtualinherited
const std::string torc::generic::Nameable::getName ( void  ) const
inlinevirtualinherited

Get the object name

Returns
Name of the object

Definition at line 89 of file Nameable.hpp.

89  {
90  return mName;
91 }

+ Here is the caller graph for this function:

Renamable::Name torc::generic::Renamable::getOriginalName ( ) const
inlinevirtualinherited

Get the new name provided for the object.

Returns
Name of the object

Definition at line 78 of file generic/Renamable.hpp.

78  {
79  return mOriginalName;
80 }

+ Here is the caller graph for this function:

virtual Pointer torc::generic::Composite< Parameter >::getParentCollection ( ) const
inlinevirtualinherited

Get a pointer to the parent collection

Returns
A pointer to the parent collection if present, empty pointer otherwise
Pointer torc::generic::SelfReferencing< Parameter >::getSharedThis ( ) const
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.

Returns
A shared pointer to this object

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.

Parameters
[out]ptrSet to a shared pointer to this object
virtual size_t torc::generic::Composite< Parameter >::getSize ( void  ) const
pure virtualinherited
const Unit torc::generic::Parameter::getUnit ( ) const
virtual

Definition at line 44 of file Parameter.cpp.

44  {
45  return mUnit;
46 }
const Value torc::generic::Parameter::getValue ( ) const
inline

Definition at line 71 of file Parameter.hpp.

71  {
72  return mValue;
73 }
Parameter& torc::generic::Parameter::operator= ( const Parameter source)
private
void torc::generic::Nameable::setName ( const std::string &  inSource)
throw (Error
)
inherited

Set a name for this object

Parameters
[in]inSourceName of the object
Exceptions
ErrorCould not set name, because name is empty (Will be used by array members)
  • Id : eMessageIdErrorEmptyItemName
  • Context Data

Set a name for this object

Parameters
[in]inSourceName of the object
Exceptions
ErrorCould not set name, because name is empty (Will be used by array members)

Definition at line 41 of file Nameable.cpp.

41  {
42  if(inSource.empty()) {
43  Error e(eMessageIdErrorEmptyItemName, __FUNCTION__, __FILE__, __LINE__);
44  e.saveContextData("Nameable", inSource);
45  throw e;
46  }
47  mName = inSource;
48 }

+ Here is the call graph for this function:

void torc::generic::Renamable::setOriginalName ( const Name inSource)
virtualinherited

Set the new name provided for the object.

Parameters
[in]inSourceName of the object

Definition at line 35 of file generic/Renamable.cpp.

35  {
36  mOriginalName = inSource;
37 }
virtual void torc::generic::Composite< Parameter >::setParentCollection ( const Pointer inParentCollection)
inlinevirtualinherited

Set a pointer to a parnt composition.

Parameters
[in]inParentCollectionpointer to the parent collection (Vector/Bundle)

Set a pointer to a parnt composition.

Parameters
[in]parentCollectionpointer to the parent collection (Vector/Bundle)
void torc::generic::Parameter::setUnit ( const Unit inSource)
virtual

Definition at line 48 of file Parameter.cpp.

48  {
49  mUnit = inSource;
50 }
void torc::generic::Parameter::setValue ( const Value inSource)

Definition at line 40 of file Parameter.cpp.

40  {
41  mValue = inSource;
42 }
void torc::generic::SelfReferencing< Parameter >::setWeakThis ( const WeakPointer inWeakThis)
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.

Parameters
[in]weakThisA weak pointer to this object

Field Documentation

Unit torc::generic::Parameter::mUnit
private

Definition at line 45 of file Parameter.hpp.

Value torc::generic::Parameter::mValue
private

Definition at line 44 of file Parameter.hpp.


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