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

Represents an ordered list of port references with a name aliased. More...

#include <PortListAlias.hpp>

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

Data Structures

class  Factory
 

Public Types

typedef VisitorType
< PortListAlias
Visitor
 
typedef PortListAlias Type
 
typedef boost::shared_ptr< TypePointer
 
typedef boost::weak_ptr< TypeWeakPointer
 

Public Member Functions

virtual void accept (BaseVisitor &inoutVisitor) throw (Error)
 
const PortListSharedPtr getPortList () const
 
void setPortList (const PortListSharedPtr &inPortList)
 
 ~PortListAlias () throw ()
 
virtual const std::string getName () const
 
void setName (const std::string &inSource) throw (Error)
 
void setWeakThis (const WeakPointer &inWeakThis)
 
Pointer getSharedThis () const
 

Protected Member Functions

 PortListAlias ()
 

Private Attributes

PortListSharedPtr mPortList
 

Friends

class FactoryType< PortListAlias >
 

Detailed Description

Represents an ordered list of port references with a name aliased.

The PortList class represents an ordered list of port references. Such objects in EDIF are declard using the (portList portRefName1 portRefName2 ... ) syntax.

Definition at line 37 of file PortListAlias.hpp.

Member Typedef Documentation

typedef boost::shared_ptr<Type> torc::generic::SelfReferencing< PortListAlias >::Pointer
inherited

Definition at line 36 of file SelfReferencing.hpp.

Definition at line 35 of file SelfReferencing.hpp.

Convenience class to visit a port list alias.

Definition at line 46 of file PortListAlias.hpp.

typedef boost::weak_ptr<Type> torc::generic::SelfReferencing< PortListAlias >::WeakPointer
inherited

Definition at line 37 of file SelfReferencing.hpp.

Constructor & Destructor Documentation

torc::generic::PortListAlias::~PortListAlias ( )
throw (
)

Definition at line 64 of file PortListAlias.cpp.

64 {}
torc::generic::PortListAlias::PortListAlias ( )
protected

Definition at line 49 of file PortListAlias.cpp.

49 : Nameable(), SelfReferencing<PortListAlias>(), mPortList() {}

Member Function Documentation

void torc::generic::PortListAlias::accept ( BaseVisitor inoutVisitor)
throw (Error
)
virtual

Definition at line 51 of file PortListAlias.cpp.

51  {
52  try {
53  runVisitor(*this, inoutVisitor);
54  } catch(Error& e) {
55  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
56  throw;
57  }
58 }
void runVisitor(_Tp &inoutVisited, BaseVisitor &inoutVisitor)
Definition: VisitorType.hpp:78

+ Here is the call graph for this function:

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:

const PortListSharedPtr torc::generic::PortListAlias::getPortList ( ) const
inline

Get the portList accociated with this PortListAlias.

Returns
Pointer to PortList

Definition at line 94 of file PortListAlias.hpp.

94  {
95  return mPortList;
96 }
Pointer torc::generic::SelfReferencing< PortListAlias >::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
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::PortListAlias::setPortList ( const PortListSharedPtr inPortList)

Set the portList accociated with this PortListAlias.

Parameters
[in]inPortListPointer to PortList

Definition at line 60 of file PortListAlias.cpp.

60  {
61  mPortList = inPortList;
62 }
void torc::generic::SelfReferencing< PortListAlias >::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

Friends And Related Function Documentation

friend class FactoryType< PortListAlias >
friend

Definition at line 39 of file PortListAlias.hpp.

Field Documentation

PortListSharedPtr torc::generic::PortListAlias::mPortList
private

Definition at line 91 of file PortListAlias.hpp.


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