VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Attributes
DtTaskCommand Class Reference

DtSimCommand subclass for tasking an object. More...

Inheritance diagram for DtTaskCommand:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtTaskCommand ()
 Default constructor.
 DtTaskCommand (const DtString &writeName, DtReaderWriterRegistry *parentRegistry=NULL)
 Usual constructor.
 DtTaskCommand (const DtString &writeName, const DtTaskCommand &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 copy constructor
virtual ~DtTaskCommand ()
 destructor
DtTaskCommandoperator= (const DtTaskCommand &orig)
 assignment operator
int type () const
virtual DtSimCommandclone (const DtString &name, DtReaderWriterRegistry *parentRegistry=0) const
virtual const DtSimTasktask () const
 The task contained by the command.
virtual void setTask (const DtSimTask *task)
 Sets the task for this command. The task will be cloned.
virtual DtString stringRep () const
 Text representation of this command.
virtual int netRepSize () const
 Returns the size in bytes of the network representation of the class.
virtual bool setFromNet (const char *contentBuffer, unsigned contentSize)
 Sets mySubsimCommand member from the incoming contentBuffer (cast to type DtNetSimSimCommand).
virtual bool setToNet ()
 Calls netRep() to create the network buffer.
virtual DtString objectName () const
 Name of the object to delete.
virtual void setObjectName (const DtString &name)
 Name of the object to delete.

Static Public Member Functions

static DtSimCommandcreator ()
 Returns a new instance of this class.

Protected Member Functions

virtual void putData (FILE *fp, int indentLevel=0)
 Overridden to manage the contained task in the file.
virtual DtlObjPtr getData (DtlObjPtr args, const DtFilename &searchPath, const DtVariableBindingsList &variableBindings)
 Overridden to manage the contained task in the file.

Protected Attributes

DtRwString myObjectName
DtSimTaskmyTask

Detailed Description

DtSimCommand subclass for tasking an object.

This command contains a DtSimTask, which is sent to the entity upon execution of this command.


Constructor & Destructor Documentation

Default constructor.

DtTaskCommand::DtTaskCommand ( const DtString writeName,
DtReaderWriterRegistry parentRegistry = NULL 
)

Usual constructor.

DtTaskCommand::DtTaskCommand ( const DtString writeName,
const DtTaskCommand orig,
DtReaderWriterRegistry parentRegistry = NULL 
)

copy constructor

virtual DtTaskCommand::~DtTaskCommand ( ) [virtual]

destructor


Member Function Documentation

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

assignment operator

int DtTaskCommand::type ( ) const [virtual]
Returns:
DtTaskCommandType.

Implements DtSimCommand.

virtual DtSimCommand* DtTaskCommand::clone ( const DtString name,
DtReaderWriterRegistry parentRegistry = 0 
) const [virtual]
Returns:
A new instance of this class, copied from the original.

Implements DtSimCommand.

virtual DtString DtTaskCommand::objectName ( ) const [virtual]

Name of the object to delete.

virtual void DtTaskCommand::setObjectName ( const DtString name) [virtual]

Name of the object to delete.

virtual const DtSimTask* DtTaskCommand::task ( ) const [virtual]

The task contained by the command.

virtual void DtTaskCommand::setTask ( const DtSimTask task) [virtual]

Sets the task for this command. The task will be cloned.

virtual DtString DtTaskCommand::stringRep ( ) const [virtual]

Text representation of this command.

Implements DtSimCommand.

virtual int DtTaskCommand::netRepSize ( ) const [virtual]

Returns the size in bytes of the network representation of the class.

This is the size in bytes of the DtNetSimSimCommand structure. Derived classes should take into acount the size returned by this class when overriding (they should call down to this class and add the result to their additional size).

Reimplemented from DtSimCommand.

virtual bool DtTaskCommand::setFromNet ( const char *  contentBuffer,
unsigned  contentSize 
) [virtual]

Sets mySubsimCommand member from the incoming contentBuffer (cast to type DtNetSimSimCommand).

Derived classes should call down to this function first, and then extract their own data starting at the location contentBuffer + DtSimCommand::netRepSize().

Reimplemented from DtSimCommand.

virtual bool DtTaskCommand::setToNet ( ) [virtual]

Calls netRep() to create the network buffer.

Casts the resulting myNetRep to type DtNetSimSimCommand*, and then sets the mySubsimCommand member in the DtNetSimSimCommand from mySubsimCommand. Derived classes should call down to the base class version of setToNet() at the start of the function (before doing any processing on the network representation) They can then start to fill in their network data, starting at the location myNetRep + DtSimCommand::netRepSize().

Reimplemented from DtSimCommand.

static DtSimCommand* DtTaskCommand::creator ( ) [static]

Returns a new instance of this class.

virtual void DtTaskCommand::putData ( FILE *  fp,
int  indentLevel = 0 
) [protected, virtual]

Overridden to manage the contained task in the file.

Reimplemented from DtSimCommand.

virtual DtlObjPtr DtTaskCommand::getData ( DtlObjPtr  args,
const DtFilename &  searchPath,
const DtVariableBindingsList variableBindings 
) [protected, virtual]

Overridden to manage the contained task in the file.

Reimplemented from DtSimCommand.


Member Data Documentation


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)