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

Represents port element like port or port reference. More...

#include <PortElement.hpp>

Public Types

enum  ElementType { eElementTypePort, eElementTypePortReference }
 

Public Member Functions

const ElementType getType () const
 
void setType (const ElementType &inSource)
 
const PortSharedPtr getPort () const
 
const PortReferenceSharedPtr getPortReference () const
 
 PortElement ()
 
 PortElement (const PortSharedPtr &inPort)
 
 PortElement (const PortReferenceSharedPtr &inPortRef)
 
 PortElement (const PortElement &inRhs)
 
PortElementoperator= (const PortElement &inRhs)
 
 ~PortElement () throw ()
 

Private Attributes

ElementType mType
 
PortSharedPtr mPort
 
PortReferenceSharedPtr mPortReference
 

Detailed Description

Represents port element like port or port reference.

Definition at line 32 of file PortElement.hpp.

Member Enumeration Documentation

Port element type

Enumerator
eElementTypePort 
eElementTypePortReference 

Definition at line 38 of file PortElement.hpp.

Constructor & Destructor Documentation

torc::generic::PortElement::PortElement ( )
torc::generic::PortElement::PortElement ( const PortSharedPtr inPort)

Definition at line 36 of file PortElement.cpp.

torc::generic::PortElement::PortElement ( const PortReferenceSharedPtr inPortRef)
torc::generic::PortElement::PortElement ( const PortElement inRhs)

Definition at line 42 of file PortElement.cpp.

42  :
43  mType(inRhs.mType), mPort(inRhs.mPort), mPortReference(inRhs.mPortReference) {}
PortReferenceSharedPtr mPortReference
Definition: PortElement.hpp:83
torc::generic::PortElement::~PortElement ( )
throw (
)

Definition at line 54 of file PortElement.cpp.

54 {}

Member Function Documentation

const PortSharedPtr torc::generic::PortElement::getPort ( ) const
inline

Get the port from the composition

Returns
Pointer to port from the composition

Definition at line 90 of file PortElement.hpp.

90  {
91  return mPort;
92 }
const PortReferenceSharedPtr torc::generic::PortElement::getPortReference ( ) const
inline

Get the port reference from the composition

Returns
Pointer to port reference from the composition

Definition at line 94 of file PortElement.hpp.

94  {
95  return mPortReference;
96 }
PortReferenceSharedPtr mPortReference
Definition: PortElement.hpp:83
const PortElement::ElementType torc::generic::PortElement::getType ( void  ) const
inline

Get the port element type

Returns
port element type

Definition at line 86 of file PortElement.hpp.

86  {
87  return mType;
88 }
PortElement & torc::generic::PortElement::operator= ( const PortElement inRhs)

Definition at line 45 of file PortElement.cpp.

45  {
46  if(this == &inRhs) {
47  mType = inRhs.mType;
48  mPort = inRhs.mPort;
49  mPortReference = inRhs.mPortReference;
50  }
51  return *this;
52 }
PortReferenceSharedPtr mPortReference
Definition: PortElement.hpp:83
void torc::generic::PortElement::setType ( const ElementType inSource)

Set the port element type

Parameters
[in]Pointerto port element type

Definition at line 30 of file PortElement.cpp.

30  {
31  mType = inSource;
32 }

Field Documentation

PortSharedPtr torc::generic::PortElement::mPort
private

Definition at line 82 of file PortElement.hpp.

PortReferenceSharedPtr torc::generic::PortElement::mPortReference
private

Definition at line 83 of file PortElement.hpp.

ElementType torc::generic::PortElement::mType
private

Definition at line 81 of file PortElement.hpp.


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