![]() |
VR-Link API Documentation for HLA 1.3
|
A DtAttachedPartCollection is a collection of attached parts of an entity. More...
Collaboration diagram for DtAttachedPartCollection:Public Types | |
| typedef std::map< int, DtAttachedPart * > | PartMap |
| typedef PartMap::const_iterator | const_iterator |
Public Member Functions | |
| DtAttachedPartCollection () | |
| Constructor. | |
| DtAttachedPartCollection (const DtAttachedPartCollection &orig) | |
| Copy constructor. | |
| DtAttachedPartCollection & | operator= (const DtAttachedPartCollection &orig) |
| Assignment operator. | |
| virtual | ~DtAttachedPartCollection () |
| Destructor. | |
| virtual DtAttachedPart & | getPart (int station) |
| Get the part at a particular station. | |
| virtual void | removeAllParts () |
| Remove all parts from the collection. | |
| virtual void | removePart (int station) |
| Remove the part specified from the collection. | |
| virtual unsigned int | partCount () const |
| Returns the number of parts in the collection. | |
| virtual DtAttachedPart * | createPart (DtAttachedPart *copy=0) const |
| Function used to create a part instance. | |
| const_iterator | begin () const |
| Returns a constant iterator to the first part. | |
| const_iterator | end () const |
| Returns a constant iterator beyond the last part. | |
| void | printDataToStream (std::ostream &stream) const |
| Prints the collection to the specified stream. | |
| bool | operator== (const DtAttachedPartCollection &other) const |
| Equality/inequality operators. | |
| bool | operator!= (const DtAttachedPartCollection &other) const |
| Equality/inequality operators. | |
| virtual DtAttachedPart * | findPart (int station) |
| Search for a part at a particular station. | |
| virtual const DtAttachedPart * | findPart (int station) const |
| Search for a part at a particular station. | |
Protected Attributes | |
| PartMap | myPartMap |
A DtAttachedPartCollection is a collection of attached parts of an entity.
Each part contains a station number, which is stored by the collection, an an entity type, which is stored by the DtAttachedPart itself.
| typedef PartMap::const_iterator DtAttachedPartCollection::const_iterator |
| typedef std::map<int, DtAttachedPart*> DtAttachedPartCollection::PartMap |
Constructor.
Copy constructor.
| virtual DtAttachedPartCollection::~DtAttachedPartCollection | ( | ) | [virtual] |
Destructor.
Returns a constant iterator to the first part.
| virtual DtAttachedPart* DtAttachedPartCollection::createPart | ( | DtAttachedPart * | copy = 0 | ) | const [virtual] |
Function used to create a part instance.
This is a separate function to allow subclasses to create the part instances.
| Input | |
| copy | is an optional parameter which should be used with a copy constructor when copy is valid. |
| const_iterator DtAttachedPartCollection::end | ( | ) | const |
Returns a constant iterator beyond the last part.
| virtual DtAttachedPart* DtAttachedPartCollection::findPart | ( | int | station | ) | [virtual] |
Search for a part at a particular station.
If the part does not exist, the function will return null.
| 0 | If the part is not found. |
| virtual const DtAttachedPart* DtAttachedPartCollection::findPart | ( | int | station | ) | const [virtual] |
Search for a part at a particular station.
If the part does not exist, the function will return null.
| 0 | If the part is not found. |
| virtual DtAttachedPart& DtAttachedPartCollection::getPart | ( | int | station | ) | [virtual] |
Get the part at a particular station.
If the part does not exist, it will be created.
| bool DtAttachedPartCollection::operator!= | ( | const DtAttachedPartCollection & | other | ) | const |
Equality/inequality operators.
These iterate through the collection, checking to see if station numbers are equal, and then calling the equality/inequality operator of the DtAttachedParts to make sure they are equal as well.
| DtAttachedPartCollection& DtAttachedPartCollection::operator= | ( | const DtAttachedPartCollection & | orig | ) |
Assignment operator.
| bool DtAttachedPartCollection::operator== | ( | const DtAttachedPartCollection & | other | ) | const |
Equality/inequality operators.
These iterate through the collection, checking to see if station numbers are equal, and then calling the equality/inequality operator of the DtAttachedParts to make sure they are equal as well.
| virtual unsigned int DtAttachedPartCollection::partCount | ( | ) | const [virtual] |
Returns the number of parts in the collection.
| void DtAttachedPartCollection::printDataToStream | ( | std::ostream & | stream | ) | const |
Prints the collection to the specified stream.
| virtual void DtAttachedPartCollection::removeAllParts | ( | ) | [virtual] |
Remove all parts from the collection.
| virtual void DtAttachedPartCollection::removePart | ( | int | station | ) | [virtual] |
Remove the part specified from the collection.
If the part does not exist, the function does nothing.
PartMap DtAttachedPartCollection::myPartMap [protected] |