A DtAttachedPartCollection is a collection of attached parts of an entity.
More...
Detailed Description
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.
Member Typedef Documentation
Constructor & Destructor Documentation
| DtAttachedPartCollection::DtAttachedPartCollection |
( |
| ) |
|
| virtual DtAttachedPartCollection::~DtAttachedPartCollection |
( |
| ) |
|
|
virtual |
Member Function Documentation
Returns a constant iterator to the first part.
Function used to create a part instance.
This is a separate function to allow subclasses to create the part instances. If you are adding a part from your code that isn't a subclass, you should use getPart, not createPart, as this function does not add the part to the collection.
- Parameters
-
| Input | |
| copy | is an optional parameter which should be used with a copy constructor when copy is valid. |
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.
- Return values
-
| 0 | If the part is not found. |
- Warning
- The returned pointer should not be deleted, as it is owned and managed by the collection, and may be deallocated at any point in the future.
| 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.
- Return values
-
| 0 | If the part is not found. |
- Warning
- The returned pointer should not be deleted, as it is owned and managed by the collection, and may be deallocated at any point in the future.
| virtual DtAttachedPart& DtAttachedPartCollection::getPart |
( |
int |
station | ) |
|
|
virtual |
Get the part at a particular station.
If the part does not exist, it will be created.
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.
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.
- Warning
- This will invalidate all iterators.
| virtual void DtAttachedPartCollection::removePart |
( |
int |
station | ) |
|
|
virtual |
Remove the part specified from the collection.
If the part does not exist, the function does nothing.
- Warning
- This function may invalidate an iterator if it points to the part removed.
Member Data Documentation
| PartMap DtAttachedPartCollection::myPartMap |
|
protected |
The documentation for this class was generated from the following file: