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

Hierarchical componenet. More...

#include <Connection.hpp>

+ Inheritance diagram for torc::physical::Connection:
+ Collaboration diagram for torc::physical::Connection:

Public Types

typedef
ConnectionPinVector::const_iterator 
ConnectionPinSharedPtrConstIterator
 
typedef
ConnectionPinVector::iterator 
ConnectionPinSharedPtrIterator
 

Public Member Functions

 Connection (const string &inName)
 Constructor. More...
 
ConnectionPinSharedPtrConstIterator connectionPinsBegin (void) const
 
ConnectionPinSharedPtrConstIterator connectionPinsEnd (void) const
 
ConnectionPinSharedPtrIterator connectionPinsBegin (void)
 
ConnectionPinSharedPtrIterator connectionPinsEnd (void)
 
ConnectionPinSharedPtrConstIterator getSource (void) const
 
ConnectionPinSharedPtrConstIterator getSink (void) const
 
size_t getConnectionPinCount (void) const
 
bool addConnectionPin (ConnectionPin &inConnectionPinPtr)
 
bool removeConnectionPin (ConnectionPin &inConnectionPinPtr)
 
bool operator== (const Connection &rhs) const
 
const stringgetName (void) const
 Returns the object name. More...
 
bool operator== (const Named &rhs) const
 Equality operator. More...
 

Protected Types

typedef std::string string
 

Protected Attributes

ConnectionPinVector mConnectionPins
 
string mName
 The name of the object. More...
 

Friends

class RcFactory
 The Factory class has direct access to our internals. More...
 

Detailed Description

Hierarchical componenet.

Definition at line 29 of file Connection.hpp.

Member Typedef Documentation

typedef ConnectionPinVector::const_iterator torc::physical::Connection::ConnectionPinSharedPtrConstIterator

Definition at line 40 of file Connection.hpp.

typedef ConnectionPinVector::iterator torc::physical::Connection::ConnectionPinSharedPtrIterator

Definition at line 41 of file Connection.hpp.

typedef std::string torc::physical::Connection::string
protected

Definition at line 32 of file Connection.hpp.

Constructor & Destructor Documentation

torc::physical::Connection::Connection ( const string inName)
inline

Constructor.

Definition at line 38 of file Connection.hpp.

38 : Named(inName){}
Named(const string &inName)
Constructor which must specify the object name.
Definition: Named.hpp:48

Member Function Documentation

bool torc::physical::Connection::addConnectionPin ( ConnectionPin inConnectionPinPtr)
inline
Todo:
Acquire mutex.
Todo:
Release mutex.

Definition at line 51 of file Connection.hpp.

51  {
52  /// \todo Acquire mutex.
54  ConnectionPinSharedPtrIterator result = std::find(connectionPinsEnd(), e, inConnectionPinPtr);
55  if(result != e) return false;
56  mConnectionPins.push_back(inConnectionPinPtr);
57  return true;
58  /// \todo Release mutex.
59  }
ConnectionPinVector mConnectionPins
Definition: Connection.hpp:33
ConnectionPinSharedPtrConstIterator connectionPinsEnd(void) const
Definition: Connection.hpp:44
ConnectionPinVector::iterator ConnectionPinSharedPtrIterator
Definition: Connection.hpp:41

+ Here is the call graph for this function:

ConnectionPinSharedPtrConstIterator torc::physical::Connection::connectionPinsBegin ( void  ) const
inline

Definition at line 43 of file Connection.hpp.

43 { return mConnectionPins.begin(); }
ConnectionPinVector mConnectionPins
Definition: Connection.hpp:33

+ Here is the caller graph for this function:

ConnectionPinSharedPtrIterator torc::physical::Connection::connectionPinsBegin ( void  )
inline

Definition at line 45 of file Connection.hpp.

45 { return mConnectionPins.begin(); }
ConnectionPinVector mConnectionPins
Definition: Connection.hpp:33
ConnectionPinSharedPtrConstIterator torc::physical::Connection::connectionPinsEnd ( void  ) const
inline

Definition at line 44 of file Connection.hpp.

44 { return mConnectionPins.end(); }
ConnectionPinVector mConnectionPins
Definition: Connection.hpp:33

+ Here is the caller graph for this function:

ConnectionPinSharedPtrIterator torc::physical::Connection::connectionPinsEnd ( void  )
inline

Definition at line 46 of file Connection.hpp.

46 { return mConnectionPins.end(); }
ConnectionPinVector mConnectionPins
Definition: Connection.hpp:33
size_t torc::physical::Connection::getConnectionPinCount ( void  ) const
inline

Definition at line 49 of file Connection.hpp.

49 { return mConnectionPins.size(); }
ConnectionPinVector mConnectionPins
Definition: Connection.hpp:33
const string& torc::physical::Named::getName ( void  ) const
inlineinherited

Returns the object name.

Definition at line 51 of file Named.hpp.

51 { return mName; }
string mName
The name of the object.
Definition: Named.hpp:43

+ Here is the caller graph for this function:

ConnectionPinSharedPtrConstIterator torc::physical::Connection::getSink ( void  ) const
inline

Definition at line 48 of file Connection.hpp.

48 { ConnectionPinSharedPtrConstIterator cp = mConnectionPins.begin();; ++cp; return cp; }
ConnectionPinVector::const_iterator ConnectionPinSharedPtrConstIterator
Definition: Connection.hpp:40
ConnectionPinVector mConnectionPins
Definition: Connection.hpp:33
ConnectionPinSharedPtrConstIterator torc::physical::Connection::getSource ( void  ) const
inline

Definition at line 47 of file Connection.hpp.

47 { return mConnectionPins.begin(); }
ConnectionPinVector mConnectionPins
Definition: Connection.hpp:33
bool torc::physical::Named::operator== ( const Named rhs) const
inlineinherited

Equality operator.

Definition at line 54 of file Named.hpp.

54 { return mName == rhs.mName; }
string mName
The name of the object.
Definition: Named.hpp:43
bool torc::physical::Connection::operator== ( const Connection rhs) const
inline

Definition at line 77 of file Connection.hpp.

77 { return mName == rhs.mName; }
string mName
The name of the object.
Definition: Named.hpp:43
bool torc::physical::Connection::removeConnectionPin ( ConnectionPin inConnectionPinPtr)
inline
Todo:
Acquire mutex.
Todo:
Release mutex.

Definition at line 62 of file Connection.hpp.

62  {
63  /// \todo Acquire mutex.
65  ConnectionPinSharedPtrIterator result = std::find(connectionPinsBegin(), e, inConnectionPinPtr);
66  if(result == e) return false;
67  mConnectionPins.erase(result);
68  /// \todo Release mutex.
69  return true;
70  }
ConnectionPinSharedPtrConstIterator connectionPinsBegin(void) const
Definition: Connection.hpp:43
ConnectionPinVector mConnectionPins
Definition: Connection.hpp:33
ConnectionPinSharedPtrConstIterator connectionPinsEnd(void) const
Definition: Connection.hpp:44
ConnectionPinVector::iterator ConnectionPinSharedPtrIterator
Definition: Connection.hpp:41

+ Here is the call graph for this function:

Friends And Related Function Documentation

friend class RcFactory
friend

The Factory class has direct access to our internals.

Definition at line 32 of file Connection.hpp.

Field Documentation

ConnectionPinVector torc::physical::Connection::mConnectionPins
protected

Definition at line 33 of file Connection.hpp.

string torc::physical::Named::mName
protectedinherited

The name of the object.

Definition at line 43 of file Named.hpp.


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