PrimitiveSet.
More...
#include <PrimitiveSet.hpp>
PrimitiveSet.
Definition at line 30 of file PrimitiveSet.hpp.
Shared pointer of our own type.
Definition at line 35 of file Progeny.hpp.
Weak pointer of our own type.
Definition at line 33 of file Progeny.hpp.
torc::physical::PrimitiveSet::PrimitiveSet |
( |
const string & |
inName | ) |
|
|
inlineprotected |
Definition at line 46 of file PrimitiveSet.hpp.
46 :
Named(inName), Progenitor<class PrimitiveSet>(){}
Named(const string &inName)
Constructor which must specify the object name.
Add a primitive to the PrimitiveSet.
- Parameters
-
inPrimitivePtr | The primitive to add. |
- Returns
- true if the primitive was added, or false if a primitive with the same name already exists in the PrimitiveSet.
- Todo:
- Acquire mutex.
- Todo:
- Release mutex.
Definition at line 67 of file PrimitiveSet.hpp.
69 PrimitiveSharedPtrVector::iterator e =
mPrimitives.end();
70 PrimitiveSharedPtrVector::iterator result =
findPrimitive(inPrimitivePtr->getName());
71 if(result == e)
mPrimitives.push_back(inPrimitivePtr);
PrimitiveSharedPtrIterator findPrimitive(const string &inName)
Find a PrimitiveSet primitive by name.
PrimitiveSharedPtrVector mPrimitives
Vector of primitive shared pointers.
Find a PrimitiveSet primitive by name.
- Parameters
-
inName | The primitive name to look for. |
- Returns
- an iterator for the specified primitive, or primitivesEnd() if the name was not found.
Definition at line 59 of file PrimitiveSet.hpp.
60 NameComparator predicate(inName);
PrimitiveSharedPtrConstIterator primitivesBegin(void) const
Returns the begin constant iterator for primitives.
PrimitiveSharedPtrConstIterator primitivesEnd(void) const
Returns the end constant iterator for primitives.
const string& torc::physical::Named::getName |
( |
void |
| ) |
const |
|
inlineinherited |
Returns the object name.
Definition at line 51 of file Named.hpp.
string mName
The name of the object.
Returns a shared pointer to the parent (WARNING: Does not work right).
Always seems to generate a "Returning reference to temporary" warning, and I cannot figure out why.
It is the caller's responsibility to reset the shared pointer when done.
- Todo:
- Figure out why Progeny<T>::getParentSharedPtr() yields a "Returning reference to
temporary" warning.
Definition at line 59 of file Progeny.hpp.
WeakPtrType mParentWeakPtr
Weak pointer to the parent.
Returns a weak pointer to the parent.
Definition at line 47 of file Progeny.hpp.
WeakPtrType mParentWeakPtr
Weak pointer to the parent.
size_t torc::physical::PrimitiveSet::getPrimitiveCount |
( |
void |
| ) |
const |
|
inline |
Definition at line 91 of file PrimitiveSet.hpp.
PrimitiveSharedPtrVector mPrimitives
Vector of primitive shared pointers.
Returns a weak pointer to this object.
Definition at line 68 of file Progenitor.hpp.
WeakPtrType mSelfWeakPtr
Weak pointer this object.
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.
Returns the begin constant iterator for primitives.
Definition at line 94 of file PrimitiveSet.hpp.
PrimitiveSharedPtrVector mPrimitives
Vector of primitive shared pointers.
Returns the begin non-constant iterator for primitives.
Definition at line 98 of file PrimitiveSet.hpp.
PrimitiveSharedPtrVector mPrimitives
Vector of primitive shared pointers.
Returns the end constant iterator for primitives.
Definition at line 96 of file PrimitiveSet.hpp.
PrimitiveSharedPtrVector mPrimitives
Vector of primitive shared pointers.
Returns the end non-constant iterator for primitives.
Definition at line 100 of file PrimitiveSet.hpp.
PrimitiveSharedPtrVector mPrimitives
Vector of primitive shared pointers.
Remove a primitive from the PrimitiveSet.
- Parameters
-
inPrimitivePtr | The primitive to remove. |
- Returns
- true if the primitive was removed, or false if the primitive did not exist.
- Todo:
- Acquire mutex.
- Todo:
- Release mutex.
Definition at line 78 of file PrimitiveSet.hpp.
80 PrimitiveSharedPtrVector::iterator e =
mPrimitives.end();
81 PrimitiveSharedPtrVector::iterator result = std::find(
mPrimitives.begin(), e, inPrimitivePtr);
82 if(result == e)
return false;
PrimitiveSharedPtrVector mPrimitives
Vector of primitive shared pointers.
Method to reset and orphan this object.
Definition at line 51 of file Progeny.hpp.
WeakPtrType mParentWeakPtr
Weak pointer to the parent.
Sets the weak pointer to the parent.
Definition at line 49 of file Progeny.hpp.
WeakPtrType mParentWeakPtr
Weak pointer to the parent.
Sets the weak pointer to this object.
Definition at line 59 of file Progenitor.hpp.
WeakPtrType mSelfWeakPtr
Weak pointer this object.
string torc::physical::Named::mName |
|
protectedinherited |
The name of the object.
Definition at line 43 of file Named.hpp.
Weak pointer to the parent.
Definition at line 38 of file Progeny.hpp.
Weak pointer this object.
This weak pointer is kept here to be passed along to our children, allowing them to point back to us without the strong dependency of a shared pointer.
Definition at line 57 of file Progenitor.hpp.
The documentation for this class was generated from the following file: