VR-Forces 5.0.2 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=0, const DtString &name="art-parts", DtReaderWriterRegistry *parentRegistry=NULL)
 
virtual ~DtArticulatedPartManager ()
 
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=0)
 
virtual
DtArticulatedPartStateRepository
findPartByType (DtArtPartType partType)
 
virtual void setStateData (DtStateData *)
 
virtual const
DtArticulatedPartStateRepository
findPartByType (DtArtPartType partType) const
 
virtual int numParts () const
 
const DtArtPartMaparticulatedParts () const
 
virtual void mergeInPartAttachments (const DtArticulatedPartManager &other)
 
virtual void setAllPartValuesUnspecified ()
 
virtual void preGetSelf ()
 
virtual void postGetSelf ()
 
virtual void prePutSelf ()
 
virtual void setCoordinateSystem (const Coordinate_System *cs)
 
virtual void printAllParts (std::ostream &strm) const
 
DtArticulatedPartManageroperator= (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 DtReaderWriteroperator= (const DtReaderWriter &orig)
 
bool operator== (const DtReaderWriter &) const
 
bool operator!= (const DtReaderWriter &rhs)
 
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 aliasContaineraliases () 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 charreaderWriterType () const
 
virtual const charxmlType () 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 wasUpdatedSince (DtTime t) 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 DtReaderWriterdefaultRWValue () const
 
virtual DtReaderWriterdefaultRWValue ()
 
virtual void setDefaultRWValue (DtReaderWriter *)
 
virtual bool checkAndSetDefaultRWValue (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 
const DtReaderWriterRegistryregistry () const
 
DtReaderWriterRegistryregistry ()
 
virtual DtPropertyInterfaceproperty ()
 
virtual const DtPropertyInterfaceproperty () const
 
virtual DtString toXml () const
 
virtual DtRwVariableBindingsgenerateVariableBindings () 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=0)
 
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
 
DtStateDatamyOwner
 
const Coordinate_SystemmyCoordinateSystem
 
DtArtPartMap myTempParts
 
bool myPublishOnLegionNetwork
 
bool myIsWritable
 
- Protected Attributes inherited from DtReaderWriter
const DtSymbolString myName
 
DtReaderWriterRegistry myRegistry
 
DtReaderWriterRegistrymyParentRegistry
 
bool myValueSpecified
 
bool myReadOnlyFlag
 
bool myIsVariableReference
 
DtSymbolString myVariableName
 
bool myVariableIsBound
 
DtReaderWritermyDefaultValue
 
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 chartheXmlType ()
 
static const DtFilename & appPath ()
 
static void setFactoryCreatorFunction (DtReaderWriterFactoryCreatorFcn fcn)
 
static void createReaderWriterFactory ()
 
static void cleanupFactory ()
 
static DtReaderWriterFactoryfactory ()
 
static void setOutputStream (DtOutputStream *stream)
 
static DtOutputStream & outputStream ()
 
static DtReaderWritercreateFromXmlFile (const DtFilename &, bool createAsProperty=false)
 
static DtReaderWritercreateFromXml (const DtString &, bool createAsProperty=false)
 
static DtReaderWritercreateFromEnvironment (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 DtReaderWriterFactorytheFactory
 
static
DtReaderWriterFactoryCreatorFcn 
theFactoryCreatorFcn
 
static bool thePutIndent
 
static DtOutputStream * theOutputStream
 

Member Typedef Documentation

Constructor & Destructor Documentation

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

Constructor.

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

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 = 0 
)
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
virtual const DtArticulatedPartStateRepository* makVrf::DtArticulatedPartManager::findPartByType ( DtArtPartType  partType) const
virtual
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
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 ( )
virtual

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 ( )
virtual

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

Reimplemented from DtReaderWriter.

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

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
virtual void makVrf::DtArticulatedPartManager::printAllParts ( std::ostream &  strm) const
virtual

Prints all parts to the given stream.

DtArticulatedPartManager& makVrf::DtArticulatedPartManager::operator= ( const DtArticulatedPartManager )
virtual void makVrf::DtArticulatedPartManager::setPublishOnLegionNetwork ( bool  ,
bool  isWritable 
)
virtual
bool makVrf::DtArticulatedPartManager::publishOnLegionNetwork ( ) const
inline
virtual void makVrf::DtArticulatedPartManager::updateDataStorage ( const DtArticulatedPartCollection )
virtual
const DtArticulatedPartStateRepository* makVrf::DtArticulatedPartManager::findPartOnOtherPart ( DtArtPartType  partType,
const DtArticulatedPartStateRepository parentPart 
) const
protected
bool makVrf::DtArticulatedPartManager::detatchPartFromOtherPart ( DtArtPartType  partType,
DtArticulatedPartStateRepository parentPart,
DtArticulatedPartStateRepository partState = 0 
)
protected
int makVrf::DtArticulatedPartManager::countPartsOnOtherPart ( const DtArticulatedPartStateRepository parentPart) const
protected
void makVrf::DtArticulatedPartManager::mergeIntoPartsMap ( const DtArtPartMap otherMap)
protected

Member Data Documentation

DtArtPartMap makVrf::DtArticulatedPartManager::myParts
protected
DtStateData* makVrf::DtArticulatedPartManager::myOwner
protected
const Coordinate_System* makVrf::DtArticulatedPartManager::myCoordinateSystem
protected
DtArtPartMap makVrf::DtArticulatedPartManager::myTempParts
protected
bool makVrf::DtArticulatedPartManager::myPublishOnLegionNetwork
protected
bool makVrf::DtArticulatedPartManager::myIsWritable
protected

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

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)