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

8 bytes total More...

Inheritance diagram for DtIfPlan:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtIfPlan ()
 default constructor
virtual ~DtIfPlan ()
 destructor
 DtIfPlan (const DtIfPlan &orig)
 copy constructor
DtIfPlanoperator= (const DtIfPlan &orig)
 assignment operator
virtual int type () const
 Returns the type of Interface Content.
virtual DtSimInterfaceContentclone () const
virtual const DtStringname () const
 Set/get the name string of the plan.
virtual void setName (const DtString &name)
virtual bool addStatement (const DtSimStatement &statement)
 Add a statement to the message.
virtual const DtList & statements () const
 Get the list of statements in the message.
virtual void setAssign (bool flag)
 Set/get the assign flag.
virtual bool assign () const
virtual int netRepSize () const
 Get the list of statements in the message.
virtual bool setFromNet (const char *contentBuffer, unsigned contentSize)
 Fills in the task from the network buffer.
virtual bool setToNet ()
 Fills in the network buffer (created by base class simTask) with the task contents.
virtual void printDataToString (DtString &str)
void emptyStatementList ()
 Empty contents of our statement list.
virtual bool isSamePlan (DtIfPlan *rhs)
 Returns true if the plans are equivalent.
virtual const char * restoreName (const char *contentBuffer)
 Restores the name portion of the network buffer.
virtual char * setNameToNet ()
 Sets the name to the network buffer and returns a pointer immediately after the name.
virtual bool isGlobal () const
 Indicates whether this plan is a global plan or an individual entity plan.
virtual void setIsGlobal (bool yesNo)
 Indicates whether this plan is a global plan or an individual entity plan.

Static Public Member Functions

static DtSimInterfaceContentcreator ()

Protected Member Functions

void copyStatementList (const DtList &otherList)
 Copies contents of given list to our list of plan statements.

Protected Attributes

DtString myName
DtList myStatementList
 List of top-level DtSimStatement*s.
bool myAppendFlag
 Indicates if message is used to create new or append to existing plan.
bool myAssignFlag
 Indicates whether the receiver should assign this plan to the object or whether the message represents the object's current plan.
bool myIsGlobal

Detailed Description

8 bytes total

class DtIfPlan:

Instances of DtIfPlan are the content portions of a plan message. This message contains enough information to reconstruct a DtPlan, minus the the content of the actual statements. The message is intended to be used with DtPlanStatement messages, which convey the rest of the content needed to fully represent the plan.

Content-Type: DtSetPlanMessageType

statement count: The number of DtSimStatements contained in this message.

plan statements: A list of <statement count>=""> DtSimStatements in this message. Statements should be appended to the plan’s main block in the order they appear in the message. If the plan is large enough to require multiple messages, then the messages should be processed in the order they are received, further appending to the statements to received in earlier DtPlan messages. DtNetIfPlan is the FIXED portion of the simulation network representation of a plan message, padded to an 8 byte boundary.

Fixed portion is immediately followed by:

<net rep of a DtSimStatement 1 (already padded to 8 byte boundary)> <net rep of a DtSimStatement n (already padded to 8 byte boundary)>

where n is myStatementCount.

Statements are top-level statements, added in the order they appear in the plan. Individual statements may contain nested statements (e.g. for 'If/else/then' and 'When' statements).


Constructor & Destructor Documentation

default constructor

virtual DtIfPlan::~DtIfPlan ( ) [virtual]

destructor

DtIfPlan::DtIfPlan ( const DtIfPlan orig)

copy constructor


Member Function Documentation

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

assignment operator

virtual int DtIfPlan::type ( ) const [virtual]

Returns the type of Interface Content.

Implements DtSimInterfaceContent.

Reimplemented in DtIfMultiplePlanSet.

virtual DtSimInterfaceContent* DtIfPlan::clone ( ) const [virtual]

Implements DtSimInterfaceContent.

Reimplemented in DtIfMultiplePlanSet.

virtual const DtString& DtIfPlan::name ( ) const [virtual]

Set/get the name string of the plan.

Set the name before adding statements, to make sure we don't exceed the size of net rep. The net rep size is checked when statements are being added, but not when the name is being set.

Reimplemented in DtIfMultiplePlanSet.

virtual void DtIfPlan::setName ( const DtString name) [virtual]

Reimplemented in DtIfMultiplePlanSet.

virtual bool DtIfPlan::isGlobal ( ) const [virtual]

Indicates whether this plan is a global plan or an individual entity plan.

virtual void DtIfPlan::setIsGlobal ( bool  yesNo) [virtual]

Indicates whether this plan is a global plan or an individual entity plan.

virtual bool DtIfPlan::addStatement ( const DtSimStatement statement) [virtual]

Add a statement to the message.

If statement cannot be added to message (i.e. it is too large), return false. Statement should be a top-level statement in the plan (statements in the main block of plan statements). Statements should be added in the order they appear in the main plan block. If addStatement returns false, you have exceeded the maximum size permitted for the PDU. Create a new next plan message and append the statement to that one.

virtual const DtList& DtIfPlan::statements ( ) const [virtual]

Get the list of statements in the message.

virtual void DtIfPlan::setAssign ( bool  flag) [virtual]

Set/get the assign flag.

If assign is true, the object's current plan should be replaced/appended by the statements in this message. Otherwise, this message represents the object's current plan (and has been sent in response to a 'request plan' message).

virtual bool DtIfPlan::assign ( ) const [virtual]
virtual int DtIfPlan::netRepSize ( ) const [virtual]

Get the list of statements in the message.

Statement returns the size of the full network representation (control object name included) padded to an 8-byte boundary.

Reimplemented from DtSimInterfaceContent.

Reimplemented in DtIfMultiplePlanSet.

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

Fills in the task from the network buffer.

Reimplemented from DtSimInterfaceContent.

virtual bool DtIfPlan::setToNet ( ) [virtual]

Fills in the network buffer (created by base class simTask) with the task contents.

Reimplemented from DtSimInterfaceContent.

virtual void DtIfPlan::printDataToString ( DtString str) [virtual]

Reimplemented from DtSimInterfaceContent.

Reimplemented in DtIfMultiplePlanSet.

Empty contents of our statement list.

Deletes the DtSimStatement* data items in the list. Non-virtual because it is called from constructors.

virtual bool DtIfPlan::isSamePlan ( DtIfPlan rhs) [virtual]

Returns true if the plans are equivalent.

virtual const char* DtIfPlan::restoreName ( const char *  contentBuffer) [virtual]

Restores the name portion of the network buffer.

This will return the pointer immediately after the name

Reimplemented in DtIfMultiplePlanSet.

virtual char* DtIfPlan::setNameToNet ( ) [virtual]

Sets the name to the network buffer and returns a pointer immediately after the name.

Reimplemented in DtIfMultiplePlanSet.

void DtIfPlan::copyStatementList ( const DtList &  otherList) [protected]

Copies contents of given list to our list of plan statements.

Non-virtual because it is called from constructors. Clones a copy of each invidiual item on the list and then adds the copy to our list.


Member Data Documentation

DtString DtIfPlan::myName [mutable, protected]
DtList DtIfPlan::myStatementList [protected]

List of top-level DtSimStatement*s.

Individual statements may contain nested statements.

Indicates if message is used to create new or append to existing plan.

Indicates whether the receiver should assign this plan to the object or whether the message represents the object's current plan.


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)