torc::physical::Primitive Class Reference

primitive. More...

#include <Primitive.hpp>

Inheritance diagram for torc::physical::Primitive:

Inheritance graph
[legend]
Collaboration diagram for torc::physical::Primitive:

Collaboration graph
[legend]

List of all members.

Public Types

typedef
ElementSharedPtrVector::const_iterator 
ElementSharedPtrConstIterator
 Constant iterator for Element shared pointers.
typedef
ElementSharedPtrVector::iterator 
ElementSharedPtrIterator
 Non-constant iterator for Element shared pointers.

Public Member Functions

ElementSharedPtrIterator findElement (const string &inName)
 Find a primitive element by name.
bool addElement (ElementSharedPtr &inElementPtr)
 Add a element to the primitive.
bool removeElement (ElementSharedPtr &inElementPtr)
 Remove a element from the primitive.
bool operator== (const Primitive &rhs) const
 Equality operator.
size_t getElementCount (void) const
ElementSharedPtrConstIterator elementsBegin (void) const
 Returns the begin constant iterator for elements.
ElementSharedPtrConstIterator elementsEnd (void) const
 Returns the end constant iterator for elements.
ElementSharedPtrIterator elementsBegin (void)
 Returns the begin non-constant iterator for elements.
ElementSharedPtrIterator elementsEnd (void)
 Returns the end non-constant iterator for elements.

Protected Types

typedef std::string string
 Imported type name.

Protected Member Functions

 Primitive (const string &inName)

Protected Attributes

ElementSharedPtrVector mElements
 Vector of element shared pointers.

Friends

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


Detailed Description

primitive.

Definition at line 33 of file Primitive.hpp.


Member Typedef Documentation

typedef std::string torc::physical::Primitive::string [protected]

Imported type name.

Reimplemented from torc::physical::Component.

Definition at line 42 of file Primitive.hpp.

typedef ElementSharedPtrVector::const_iterator torc::physical::Primitive::ElementSharedPtrConstIterator

Constant iterator for Element shared pointers.

Definition at line 53 of file Primitive.hpp.

typedef ElementSharedPtrVector::iterator torc::physical::Primitive::ElementSharedPtrIterator

Non-constant iterator for Element shared pointers.

Definition at line 55 of file Primitive.hpp.


Member Function Documentation

ElementSharedPtrIterator torc::physical::Primitive::findElement ( const string inName  )  [inline]

Find a primitive element by name.

Parameters:
inName The element name to look for.
Returns:
an iterator for the specified element, or elementsEnd() if the name was not found.

Definition at line 61 of file Primitive.hpp.

bool torc::physical::Primitive::addElement ( ElementSharedPtr inElementPtr  )  [inline]

Add a element to the primitive.

Parameters:
inElementPtr The element to add.
Returns:
true if the element was added, or false if a element with the same name already exists in the primitive.

Todo:
Acquire mutex.

Todo:
Release mutex.

Definition at line 69 of file Primitive.hpp.

bool torc::physical::Primitive::removeElement ( ElementSharedPtr inElementPtr  )  [inline]

Remove a element from the primitive.

Parameters:
inElementPtr The element to remove.
Returns:
true if the element was remove, or false if the element did not exist.

Todo:
Acquire mutex.

Definition at line 80 of file Primitive.hpp.

bool torc::physical::Primitive::operator== ( const Primitive rhs  )  const [inline]

Equality operator.

This function deems elements equal if their names are identical.

Parameters:
rhs The element to compare against.
Returns:
true if both element names are identical, or false otherwise.

Definition at line 153 of file Primitive.hpp.

ElementSharedPtrConstIterator torc::physical::Primitive::elementsBegin ( void   )  const [inline]

Returns the begin constant iterator for elements.

Definition at line 161 of file Primitive.hpp.

ElementSharedPtrConstIterator torc::physical::Primitive::elementsEnd ( void   )  const [inline]

Returns the end constant iterator for elements.

Definition at line 163 of file Primitive.hpp.

ElementSharedPtrIterator torc::physical::Primitive::elementsBegin ( void   )  [inline]

Returns the begin non-constant iterator for elements.

Definition at line 165 of file Primitive.hpp.

ElementSharedPtrIterator torc::physical::Primitive::elementsEnd ( void   )  [inline]

Returns the end non-constant iterator for elements.

Definition at line 167 of file Primitive.hpp.


Friends And Related Function Documentation

friend class RcFactory [friend]

The Factory class has direct access to our internals.

Definition at line 37 of file Primitive.hpp.


Member Data Documentation

Vector of element shared pointers.

Definition at line 45 of file Primitive.hpp.


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

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