VR-Link API Documentation for HLA 1.3
Public Types | Public Member Functions | Protected Attributes
DtAttachedPartCollection Class Reference

A DtAttachedPartCollection is a collection of attached parts of an entity. More...

+ Collaboration diagram for DtAttachedPartCollection:

List of all members.

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.
DtAttachedPartCollectionoperator= (const DtAttachedPartCollection &orig)
 Assignment operator.
virtual ~DtAttachedPartCollection ()
 Destructor.
virtual DtAttachedPartgetPart (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 DtAttachedPartcreatePart (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 DtAttachedPartfindPart (int station)
 Search for a part at a particular station.
virtual const DtAttachedPartfindPart (int station) const
 Search for a part at a particular station.

Protected Attributes

PartMap myPartMap

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

typedef PartMap::const_iterator DtAttachedPartCollection::const_iterator

Constructor & Destructor Documentation

Constructor.

Copy constructor.

Destructor.


Member Function Documentation

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.

Parameters:
Input
copyis 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:
0If 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:
0If 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.

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.

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


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

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)