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 | Friends
DtScriptedMovementObject Class Reference

DtScriptedMovementObject class is a container that describes a scripted movement file and phases for that scripted movement.

Public Types

typedef std::vector
< DtScriptedMovementPhase
Phases
 

Public Member Functions

 DtScriptedMovementObject ()
 
 DtScriptedMovementObject (int type)
 
virtual ~DtScriptedMovementObject ()
 
 DtScriptedMovementObject (const DtScriptedMovementObject &orig)
 
DtScriptedMovementObjectoperator= (const DtScriptedMovementObject &orig)
 
virtual void setName (const std::string &)
 
virtual const std::string & name () const
 
virtual const
DtScriptedMovementFileConfiguration
scriptedMovementFileConfiguration () const
 
virtual
DtScriptedMovementFileConfiguration
scriptedMovementFileConfiguration ()
 
virtual void addPhase (const DtScriptedMovementPhase &)
 
virtual void removePhase (int)
 
virtual const Phasesphases () const
 
virtual DtScriptedMovementPhasephase (int)
 
virtual const
DtScriptedMovementPhase
phase (int) const
 
virtual void setPhases (const Phases &)
 
virtual bool setPhase (int p, const DtScriptedMovementPhase &phase)
 
virtual bool load (const DtFilename &)
 
virtual void setLoadedPath (const DtFilename &)
 
virtual DtFilename loadedPath () const
 
const DtFilename & loadedFile () const
 
virtual bool save (const DtFilename &)
 
virtual bool save ()
 
virtual bool hasValidPhases (double simTimeDelta, const std::set< int > &phasesPerformed)
 
virtual std::set< intavailablePhases (double simTimeDelta, const std::set< int > &phasesPerformed)
 
virtual void setFilename (const DtFilename &)
 
virtual bool remove ()
 
virtual int scriptType () const
 
virtual void setDescription (const std::string &)
 
virtual const std::string & description () const
 
virtual void setCategories (const std::string &)
 
virtual void setCategories (const std::vector< std::string > &)
 
virtual std::vector< std::string > categories () const
 
virtual void addCategory (const std::string &)
 
virtual void removeCategory (const std::string &)
 
virtual const std::string & categoriesAsString () const
 
virtual bool hasCategory (const std::string &) const
 
virtual void renameCategory (const std::string &oldName, const std::string &newName)
 

Protected Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Protected Attributes

int myScriptType
 
std::string myName
 
Phases myPhases
 
DtFilename myFilename
 
std::string myCategories
 
std::string myDescription
 
DtScriptedMovementFileConfiguration myPreviousConfiguration
 

Friends

class boost::serialization::access
 

Member Typedef Documentation

Constructor & Destructor Documentation

DtScriptedMovementObject::DtScriptedMovementObject ( )

default constructor

DtScriptedMovementObject::DtScriptedMovementObject ( int  type)

default constructor

virtual DtScriptedMovementObject::~DtScriptedMovementObject ( )
virtual

destructor

DtScriptedMovementObject::DtScriptedMovementObject ( const DtScriptedMovementObject orig)

copy constructor

Member Function Documentation

DtScriptedMovementObject& DtScriptedMovementObject::operator= ( const DtScriptedMovementObject orig)

assignment operator

virtual void DtScriptedMovementObject::setName ( const std::string &  )
virtual

Sets the name of this scripted movement object.

virtual const std::string& DtScriptedMovementObject::name ( ) const
virtual
virtual const DtScriptedMovementFileConfiguration& DtScriptedMovementObject::scriptedMovementFileConfiguration ( ) const
virtual

Backwards compatability only. Configuration is now set via the phases.

virtual DtScriptedMovementFileConfiguration& DtScriptedMovementObject::scriptedMovementFileConfiguration ( )
virtual
virtual void DtScriptedMovementObject::addPhase ( const DtScriptedMovementPhase )
virtual

Phase manipulation. Adds a new phase.

virtual void DtScriptedMovementObject::removePhase ( int  )
virtual

Removes a phase.

virtual const Phases& DtScriptedMovementObject::phases ( ) const
virtual

Returns phases.

virtual DtScriptedMovementPhase& DtScriptedMovementObject::phase ( int  )
virtual

Returns the phase at the specified position.

virtual const DtScriptedMovementPhase& DtScriptedMovementObject::phase ( int  ) const
virtual
virtual void DtScriptedMovementObject::setPhases ( const Phases )
virtual

Sets phases.

virtual bool DtScriptedMovementObject::setPhase ( int  p,
const DtScriptedMovementPhase phase 
)
virtual

Sets the phase at the given index. If the phase does not exist will return false.

virtual bool DtScriptedMovementObject::load ( const DtFilename &  )
virtual

Loads a scripted movement object file and sets the path to load all phase files from.

virtual void DtScriptedMovementObject::setLoadedPath ( const DtFilename &  )
virtual

If creating from code, set this to be the file that would be saved out if saved. If this is not set then movment file will not load.

virtual DtFilename DtScriptedMovementObject::loadedPath ( ) const
virtual

Returns the path this object was loaded from.

const DtFilename& DtScriptedMovementObject::loadedFile ( ) const
inline
virtual bool DtScriptedMovementObject::save ( const DtFilename &  )
virtual

Saves the file to the given path. Will not change the loaded path if this file was previously loaded. If there is no loaded path the path is changed to the saved path.

virtual bool DtScriptedMovementObject::save ( )
virtual

Saves to the currently loaded filename. If no filename returns false.

virtual bool DtScriptedMovementObject::hasValidPhases ( double  simTimeDelta,
const std::set< int > &  phasesPerformed 
)
virtual

Returns true if there are any valid phases left to perform, given a list of the phases that have already been performed.

virtual std::set<int> DtScriptedMovementObject::availablePhases ( double  simTimeDelta,
const std::set< int > &  phasesPerformed 
)
virtual

Returns a list of phases that satisfy the current simTimeDelta mark.

virtual void DtScriptedMovementObject::setFilename ( const DtFilename &  )
virtual

Sets the name of the file to save to.

virtual bool DtScriptedMovementObject::remove ( )
virtual

Removes the file referenced by this object from disk.

virtual int DtScriptedMovementObject::scriptType ( ) const
virtual

Returns the script type.

virtual void DtScriptedMovementObject::setDescription ( const std::string &  )
virtual

Description of the movement object. Will be used as a tool tip when displaying in the gui.

virtual const std::string& DtScriptedMovementObject::description ( ) const
virtual
virtual void DtScriptedMovementObject::setCategories ( const std::string &  )
virtual

Categories that this movement object belongs to. These are arbitrary strings that will be displayed to the user so they can be used to filter movement objects. The categories will be a string that has the categories separated by ;. An empty category list means it belongs to all categories.

virtual void DtScriptedMovementObject::setCategories ( const std::vector< std::string > &  )
virtual
virtual std::vector<std::string> DtScriptedMovementObject::categories ( ) const
virtual
virtual void DtScriptedMovementObject::addCategory ( const std::string &  )
virtual
virtual void DtScriptedMovementObject::removeCategory ( const std::string &  )
virtual
virtual const std::string& DtScriptedMovementObject::categoriesAsString ( ) const
virtual
virtual bool DtScriptedMovementObject::hasCategory ( const std::string &  ) const
virtual
virtual void DtScriptedMovementObject::renameCategory ( const std::string &  oldName,
const std::string &  newName 
)
virtual
template<class Archive >
void DtScriptedMovementObject::serialize ( Archive &  ar,
const unsigned int  version 
)
inlineprotected

When the class Archive corresponds to an output archive, the & operator is defined similar to <<. Likewise, when the class Archive is a type of input archive the & operator is defined similar to >>.

References DtBallisticMissileMovementScript.

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Serialization/Deserialization //!

Member Data Documentation

int DtScriptedMovementObject::myScriptType
protected
std::string DtScriptedMovementObject::myName
protected
Phases DtScriptedMovementObject::myPhases
protected
DtFilename DtScriptedMovementObject::myFilename
protected
std::string DtScriptedMovementObject::myCategories
protected
std::string DtScriptedMovementObject::myDescription
protected
DtScriptedMovementFileConfiguration DtScriptedMovementObject::myPreviousConfiguration
protected

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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)