VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
makVrf::DtArticulatedPartManager Class Reference

The articulated part manager maintains a tree of articulated and attached parts for the state repository class. These parts are each represented by a DtArticulatedPartStateRepository.

Inheritance diagram for makVrf::DtArticulatedPartManager:
Inheritance graph
[legend]

Public Types

typedef std::map
< DtArtPartType,
DtArticulatedPartStateRepository * > 
ArtPartMap
 
- Public Types inherited from DtReaderWriter
typedef std::vector
< DtSymbolString > 
aliasContainer
 
typedef std::vector
< DtSymbolString >::iterator 
aliasIter
 
typedef std::vector
< DtSymbolString >
::const_iterator 
aliasConstIter
 
typedef std::vector< DtFilename > SearchPaths
 
typedef std::pair
< DtSymbolString, DtString > 
DtVariableNameType
 
typedef DtReaderWriterFactory *(* DtReaderWriterFactoryCreatorFcn )()
 

Public Member Functions

 DtArticulatedPartManager (DtStateData *owner=nullptr, const DtString &name="art-parts", DtReaderWriterRegistry *parentRegistry=nullptr)
 
virtual ~DtArticulatedPartManager () override
 
virtual
DtArticulatedPartStateRepository * 
attachPart (DtArtPartType partType)
 
virtual
DtArticulatedPartStateRepository * 
attachPart (DtArtPartType partType, DtArtPartType parentPartType)
 
virtual
DtArticulatedPartStateRepository * 
attachPart (DtArtPartType partType, DtArtPartType parentPartType, const DtArticulatedPartStateRepository &partState)
 
virtual bool detachPart (DtArtPartType partType, DtArticulatedPartStateRepository *partState=nullptr)
 
virtual
DtArticulatedPartStateRepository * 
findPartByType (DtArtPartType partType)
 
virtual void setStateData (DtStateData *)
 
virtual const
DtArticulatedPartStateRepository * 
findPartByType (DtArtPartType partType) const
 
virtual int numParts () const
 
const DtArtPartMap & articulatedParts () const
 
virtual void mergeInPartAttachments (const DtArticulatedPartManager &other)
 
virtual void setAllPartValuesUnspecified ()
 
virtual void preGetSelf () override
 
virtual void postGetSelf () override
 
virtual void prePutSelf () override
 
virtual void setCoordinateSystem (const Coordinate_System *cs)
 
virtual void printAllParts (std::ostream &strm) const
 
DtArticulatedPartManager & operator= (const DtArticulatedPartManager &)
 
virtual void setPublishOnLegionNetwork (bool, bool isWritable)
 
bool publishOnLegionNetwork () const
 
virtual void updateDataStorage (const DtArticulatedPartCollection &)
 
- Public Member Functions inherited from DtReaderWriter
 DtReaderWriter ()
 
 DtReaderWriter (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 
 DtReaderWriter (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 
 DtReaderWriter (const DtString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 
 DtReaderWriter (const DtSymbolString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 
 DtReaderWriter (const DtReaderWriter &, DtReaderWriterRegistry *parentRegistry=NULL)
 
const DtReaderWriter & operator= (const DtReaderWriter &orig)
 
bool operator== (const DtReaderWriter &) const
 
bool operator!= (const DtReaderWriter &rhs) const
 
virtual ~DtReaderWriter ()
 
virtual void putSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 
virtual void postPutSelf ()
 
virtual void getSelf (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 
virtual void writeSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 
virtual DtSymbolString name () const
 
virtual void addAlias (const DtSymbolString &alias)
 
virtual void addAlias (const DtString &alias)
 
virtual bool hasAlias (const DtSymbolString &alias)
 
virtual const aliasContainer & aliases () const
 
virtual void setReadonly (bool flag)
 
bool isReadonly () const
 
virtual void reset ()
 
virtual int alignment () const
 
virtual bool variableIsBound () const
 
virtual void unbindVariable ()
 
virtual void setName (const DtString &)
 
virtual const char * readerWriterType () const
 
virtual const char * xmlType () const
 
virtual DtString prettyPrint () const
 
std::string debugText () const
 
virtual void bindVariables (DtVariableBindingsList variableBindings)
 
virtual std::list
< DtVariableNameType > 
unboundVariables () const
 
bool invalid () const
 
virtual bool hasChild (const DtReaderWriter *p) const
 
virtual bool hasVariableReference () const
 
virtual void bindLocalVariables (const DtVariableBindingsList &variableBindings)
 
virtual void recordUpdateTime () const
 
virtual bool changedSinceLastChecked ()
 
virtual bool peekChangedSinceLastChecked () const
 
virtual void putData (std::string &fp, int indentLevel=0)
 
virtual DtlObjPtr getData (DtlObjPtr args, const SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)
 
virtual void setValueSpecified (bool specified, bool recurse=false)
 
virtual bool valueSpecified () const
 
virtual bool isVariableReference () const
 
virtual void setIsVariableReference (bool value)
 
virtual void clearAllVariableReferenceFlags ()
 
virtual DtSymbolString variableName () const
 
virtual void setVariableName (const DtSymbolString variableName)
 
virtual const DtReaderWriter * defaultRWValue () const
 
virtual DtReaderWriter * defaultRWValue ()
 
virtual void setDefaultRWValue (DtReaderWriter *)
 
virtual bool checkAndSetDefaultRWValue (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 
const DtReaderWriterRegistry & registry () const
 
DtReaderWriterRegistry & registry ()
 
virtual DtPropertyInterface * property ()
 
virtual const DtPropertyInterface * property () const
 
virtual DtString toXml () const
 
virtual DtRwVariableBindings * generateVariableBindings () const
 
virtual bool toXml (const DtFilename &) const
 
virtual bool fromXml (const DtString &)
 
virtual bool fromXmlFile (const DtFilename &)
 
virtual void putSelf (DtEnvironmentSP, DtEnvValueSP parent) const
 
virtual void putData (DtEnvironmentSP, DtEnvValueSP value) const
 
virtual void putVariableReference (DtEnvironmentSP, DtEnvValueSP value) const
 
virtual void getSelf (const DtEnvironmentSP, const DtEnvValueSP root, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList())
 
virtual void getData (const DtEnvironmentSP, const DtEnvValueSP, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList())
 
virtual void unrecognizedItem (const DtEnvironmentSP env, const DtEnvValueSP root, const SearchPaths &searchPaths, const DtVariableBindingsList &varBindings)
 
virtual void getVariableReference (DtEnvironmentSP, DtEnvValueSP value)
 

Protected Member Functions

const
DtArticulatedPartStateRepository * 
findPartOnOtherPart (DtArtPartType partType, const DtArticulatedPartStateRepository &parentPart) const
 
bool detatchPartFromOtherPart (DtArtPartType partType, DtArticulatedPartStateRepository &parentPart, DtArticulatedPartStateRepository *partState=nullptr)
 
int countPartsOnOtherPart (const DtArticulatedPartStateRepository &parentPart) const
 
void mergeIntoPartsMap (const DtArtPartMap &otherMap)
 
- Protected Member Functions inherited from DtReaderWriter
virtual void bindToRwAsVariable (const DtReaderWriter *rw)
 

Protected Attributes

DtArtPartMap myParts
 
DtStateData * myOwner
 
const Coordinate_System * myCoordinateSystem
 
DtArtPartMap myTempParts
 
bool myPublishOnLegionNetwork
 
bool myIsWritable
 
- Protected Attributes inherited from DtReaderWriter
const DtSymbolString myName
 
DtReaderWriterRegistry myRegistry
 
DtReaderWriterRegistry * myParentRegistry
 
bool myValueSpecified
 
bool myReadOnlyFlag
 
bool myIsVariableReference
 
DtSymbolString myVariableName
 
bool myVariableIsBound
 
DtReaderWriter * myDefaultValue
 
aliasContainer myAliases
 
bool myInvalid
 
bool myChangedFlag
 

Private Member Functions

 DtArticulatedPartManager (const DtArticulatedPartManager &other)
 

Additional Inherited Members

- Static Public Member Functions inherited from DtReaderWriter
static void putIndent (std::string &fp, int indentLevel)
 
static const
DtVariableBindingsList & 
nullVariableReference ()
 
static void setPostGetSelfCallback (DtGetSelfCallbackFcn fcn, void *usrData)
 
static void setPrePutSelfCallback (DtPutSelfCallbackFcn fcn, void *usrData)
 
static void setPutIndent (bool)
 
static bool putIndent ()
 
static const char * theXmlType ()
 
static const DtFilename & appPath ()
 
static void setFactoryCreatorFunction (DtReaderWriterFactoryCreatorFcn fcn)
 
static void createReaderWriterFactory ()
 
static void cleanupFactory ()
 
static DtReaderWriterFactory * factory ()
 
static void setOutputStream (DtOutputStream *stream)
 
static DtOutputStream & outputStream ()
 
static DtReaderWriter * createFromXmlFile (const DtFilename &, bool createAsProperty=false)
 
static DtReaderWriter * createFromXml (const DtString &, bool createAsProperty=false)
 
static DtReaderWriter * createFromEnvironment (DtEnvironmentSP, bool createAsProperty=false)
 
static DtString getAttribute (DtEnvironmentSP env, const DtString &name, DtEnvValueSP root)
 
- Static Protected Attributes inherited from DtReaderWriter
static DtString theUnspecifiedValue
 
static DtGetSelfCallbackInfo thePostGetSelfCallback
 
static DtPutSelfCallbackInfo thePrePutSelfCallback
 
static const DtVariableBindingsList theEmptyVariableBindingsList
 
static bool theCreatorFcnSet
 
static DtReaderWriterFactory * theFactory
 
static
DtReaderWriterFactoryCreatorFcn 
theFactoryCreatorFcn
 
static bool thePutIndent
 
static DtOutputStream * theOutputStream
 

Member Typedef Documentation

Map type indexing articulated part state repositories by part type.

Constructor & Destructor Documentation

makVrf::DtArticulatedPartManager::DtArticulatedPartManager ( const DtArticulatedPartManager &  other)
private
makVrf::DtArticulatedPartManager::DtArticulatedPartManager ( DtStateData *  owner = nullptr,
const DtString &  name = "art-parts",
DtReaderWriterRegistry *  parentRegistry = nullptr 
)

Constructor.

virtual makVrf::DtArticulatedPartManager::~DtArticulatedPartManager ( )
overridevirtual

Destructor.

Member Function Documentation

virtual DtArticulatedPartStateRepository* makVrf::DtArticulatedPartManager::attachPart ( DtArtPartType  partType)
virtual

Attach a part of the given type directly to the parent object. Returns a pointer to the new part if successful.

virtual DtArticulatedPartStateRepository* makVrf::DtArticulatedPartManager::attachPart ( DtArtPartType  partType,
DtArtPartType  parentPartType 
)
virtual

Attach a part of the given type to another part on the parent object. Returns a pointer to the new part if successful.

virtual DtArticulatedPartStateRepository* makVrf::DtArticulatedPartManager::attachPart ( DtArtPartType  partType,
DtArtPartType  parentPartType,
const DtArticulatedPartStateRepository &  partState 
)
virtual

Attach an existing part to a new parent.

virtual bool makVrf::DtArticulatedPartManager::detachPart ( DtArtPartType  partType,
DtArticulatedPartStateRepository *  partState = nullptr 
)
virtual

Detaches a part of the given type. Searches the tree of parts to find it. If partState is a valid pointer then it will be filled in with the state of the detached part. Returns true if found.

virtual DtArticulatedPartStateRepository* makVrf::DtArticulatedPartManager::findPartByType ( DtArtPartType  partType)
virtual

Goes through all articulated parts and their own parts looking for the part with the specified type.

virtual void makVrf::DtArticulatedPartManager::setStateData ( DtStateData *  )
virtual

Sets the owning state data object for this part manager.

Parameters
sdPointer to the owning DtStateData.
virtual const DtArticulatedPartStateRepository* makVrf::DtArticulatedPartManager::findPartByType ( DtArtPartType  partType) const
virtual

Returns the part of the given type, searching the full part tree. Const overload.

Parameters
partTypeThe type of part to find.
Returns
Const pointer to the found part, or nullptr if not found.
virtual int makVrf::DtArticulatedPartManager::numParts ( ) const
virtual

Returns the number of parts attached, including parts attached to those parts.

const DtArtPartMap& makVrf::DtArticulatedPartManager::articulatedParts ( ) const
inline

Returns the map of top-level articulated parts indexed by part type.

Returns
Read-only reference to the top-level articulated parts map.
virtual void makVrf::DtArticulatedPartManager::mergeInPartAttachments ( const DtArticulatedPartManager &  other)
virtual

Updates part attachments (adding missing parts) from the other part manager.

virtual void makVrf::DtArticulatedPartManager::setAllPartValuesUnspecified ( )
virtual

Mark all part settings as unspecified. That way only values loaded from the scenario will be marked specified.

virtual void makVrf::DtArticulatedPartManager::preGetSelf ( )
overridevirtual

Before getSelf is called we must save off our previous state to perform proper merging after read.

Reimplemented from DtReaderWriter.

virtual void makVrf::DtArticulatedPartManager::postGetSelf ( )
overridevirtual

After getSelf is called we must merge the new parts with the old parts.

Reimplemented from DtReaderWriter.

virtual void makVrf::DtArticulatedPartManager::prePutSelf ( )
overridevirtual

Before putSelf, mark unspecified items as read only so that they are not saved. That way configuration values will be used instead.

Reimplemented from DtReaderWriter.

virtual void makVrf::DtArticulatedPartManager::setCoordinateSystem ( const Coordinate_System *  cs)
virtual

Sets the coordinate system used by this manager and all contained parts.

Parameters
csPointer to the coordinate system to use.
virtual void makVrf::DtArticulatedPartManager::printAllParts ( std::ostream &  strm) const
virtual

Prints all parts to the given stream.

DtArticulatedPartManager& makVrf::DtArticulatedPartManager::operator= ( const DtArticulatedPartManager &  )

Assignment operator.

virtual void makVrf::DtArticulatedPartManager::setPublishOnLegionNetwork ( bool  ,
bool  isWritable 
)
virtual

Sets whether this manager and its parts should publish data on the Legion network.

Parameters
bTrue to enable publishing on the Legion network.
isWritableTrue if the parts should be writable on the network.
bool makVrf::DtArticulatedPartManager::publishOnLegionNetwork ( ) const
inline

Returns true if this manager publishes parts on the Legion network.

Returns
True if Legion network publishing is enabled.
virtual void makVrf::DtArticulatedPartManager::updateDataStorage ( const DtArticulatedPartCollection &  )
virtual

Updates articulated part state from a DIS articulated part collection.

Parameters
artPartListThe collection of articulated parts to update from.
const DtArticulatedPartStateRepository* makVrf::DtArticulatedPartManager::findPartOnOtherPart ( DtArtPartType  partType,
const DtArticulatedPartStateRepository &  parentPart 
) const
protected

Recursively searches a sub-tree of parts for a part with the given type.

Parameters
partTypeThe type of part to find.
parentPartThe parent part whose sub-tree to search.
Returns
Const pointer to the found part, or nullptr if not found.
bool makVrf::DtArticulatedPartManager::detatchPartFromOtherPart ( DtArtPartType  partType,
DtArticulatedPartStateRepository &  parentPart,
DtArticulatedPartStateRepository *  partState = nullptr 
)
protected

Recursively detaches a part from a sub-tree rooted at parentPart.

Parameters
partTypeThe type of part to detach.
parentPartThe parent part whose sub-tree to search.
partStateIf non-null, filled with the state of the detached part.
Returns
True if the part was found and detached.
int makVrf::DtArticulatedPartManager::countPartsOnOtherPart ( const DtArticulatedPartStateRepository &  parentPart) const
protected

Recursively counts the number of parts attached to the given part and its descendants.

Parameters
parentPartThe parent part to count descendants for.
Returns
The total count of descendant parts.
void makVrf::DtArticulatedPartManager::mergeIntoPartsMap ( const DtArtPartMap &  otherMap)
protected

Merges the given parts map into this manager's parts, matching and updating by part type.

Parameters
otherMapThe parts map to merge from.

Member Data Documentation

DtArtPartMap makVrf::DtArticulatedPartManager::myParts
protected

Top-level map of articulated parts indexed by part type.

DtStateData* makVrf::DtArticulatedPartManager::myOwner
protected

The owning state data object for this part manager.

const Coordinate_System* makVrf::DtArticulatedPartManager::myCoordinateSystem
protected

Coordinate system used by this manager and all contained parts.

DtArtPartMap makVrf::DtArticulatedPartManager::myTempParts
protected

Temporary parts map used during serialization (preGetSelf/postGetSelf).

bool makVrf::DtArticulatedPartManager::myPublishOnLegionNetwork
protected

True if this manager publishes parts on the Legion network.

bool makVrf::DtArticulatedPartManager::myIsWritable
protected

True if parts are writable on the Legion network.


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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)