VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DtIfPlan Class Reference

class DtIfPlan: More...

Inheritance diagram for DtIfPlan:
Inheritance graph
[legend]

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 DtUUIDplanName () const
 Set/get the uuid of the plan.
virtual void setPlanName (const DtUUID &name)
 Was: setName.
virtual DtString markingText () const
virtual bool addStatement (const DtSimStatement &statement)
 Add a statement to the message.
virtual const std::vector
< DtSimStatement * > & 
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 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.
virtual void setIsQuickLaunch (bool)
virtual bool isQuickLaunch () const
virtual void setShowOnQuickLaunchToolbar (bool)
virtual bool showOnQuickLaunchToolbar () const
virtual void setQuickLaunchIcon (const DtString &)
virtual const DtStringquickLaunchIcon () const
virtual void setOrdinal (int)
virtual int ordinal () const
- Public Member Functions inherited from DtSimInterfaceContent
virtual ~DtSimInterfaceContent ()
virtual bool update (const DtSimInterfaceContent *data)
virtual charnetRep ()
virtual void printContentType (DtString &str)
virtual void setUseSessionId (bool yesNo)
virtual bool useSessionId () const

Static Public Member Functions

static DtSimInterfaceContentcreator ()
- Static Public Member Functions inherited from DtSimInterfaceContent
static DtSimInterfaceContentcreateInterfaceContent (int type)
static void addInterfaceContentCreatorFcn (int type, DtInterfaceContentCreatorFcn fcn)
static void setFactory (DtInterfaceContentFactory *factory)
static DtInterfaceContentFactoryfactory ()
static void registerContentTypePrinter (DtSimInterfaceContentTypePrinterFcn printFcn)

Protected Member Functions

void copyStatementList (const std::vector< DtSimStatement * > &otherList)
 Copies contents of given list to our list of plan statements.
- Protected Member Functions inherited from DtSimInterfaceContent
 DtSimInterfaceContent ()
 DtSimInterfaceContent (const DtSimInterfaceContent &orig)
const DtSimInterfaceContentoperator= (const DtSimInterfaceContent &orig)
virtual charcreateNetworkBuffer ()

Protected Attributes

DtUUID myPlanName
std::vector< DtSimStatement * > 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
int myQuickLaunchFlags
 Information that are used for global plans only.
int myOrdinal
DtString myQuickLaunchIcon
- Protected Attributes inherited from DtSimInterfaceContent
charmyNetRep
bool myUseSessionId

Additional Inherited Members

- Static Protected Attributes inherited from DtSimInterfaceContent
static DtInterfaceContentFactorymyFactory
static
DtSimInterfaceContentTypePrinterFcn 
theContentTypePrinterFcn

Detailed Description

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

DtIfPlan::DtIfPlan ( )

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 DtUUID& DtIfPlan::planName ( ) const
virtual

Set/get the uuid of the plan.

Set the uuid 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. Was: name

virtual void DtIfPlan::setPlanName ( const DtUUID name)
virtual

Was: setName.

Reimplemented in DtIfMultiplePlanSet.

virtual DtString DtIfPlan::markingText ( ) const
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 std::vector<DtSimStatement*>& 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.

Reimplemented in DtIfMultiplePlanSet.

virtual bool DtIfPlan::setToNet ( )
virtual

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

Reimplemented from DtSimInterfaceContent.

Reimplemented in DtIfMultiplePlanSet.

virtual void DtIfPlan::printDataToString ( DtString str)
virtual

Reimplemented from DtSimInterfaceContent.

static DtSimInterfaceContent* DtIfPlan::creator ( )
static

Reimplemented in DtIfMultiplePlanSet.

void DtIfPlan::emptyStatementList ( )

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 void DtIfPlan::setIsQuickLaunch ( bool  )
virtual

Global plan options only. Whether or not the global plan is a quick launch global plan (i.e. will not start executing until "turned on") and the icon to represent this global plan in the GUI

virtual bool DtIfPlan::isQuickLaunch ( ) const
virtual

Global plan options only. Whether or not the global plan is a quick launch global plan (i.e. will not start executing until "turned on") and the icon to represent this global plan in the GUI

virtual void DtIfPlan::setShowOnQuickLaunchToolbar ( bool  )
virtual

Global plan options only. Whether or not the global plan is a quick launch global plan (i.e. will not start executing until "turned on") and the icon to represent this global plan in the GUI

virtual bool DtIfPlan::showOnQuickLaunchToolbar ( ) const
virtual

Global plan options only. Whether or not the global plan is a quick launch global plan (i.e. will not start executing until "turned on") and the icon to represent this global plan in the GUI

virtual void DtIfPlan::setQuickLaunchIcon ( const DtString )
virtual

Global plan options only. Whether or not the global plan is a quick launch global plan (i.e. will not start executing until "turned on") and the icon to represent this global plan in the GUI

virtual const DtString& DtIfPlan::quickLaunchIcon ( ) const
virtual

Global plan options only. Whether or not the global plan is a quick launch global plan (i.e. will not start executing until "turned on") and the icon to represent this global plan in the GUI

virtual void DtIfPlan::setOrdinal ( int  )
virtual

Global plan options only. Whether or not the global plan is a quick launch global plan (i.e. will not start executing until "turned on") and the icon to represent this global plan in the GUI

virtual int DtIfPlan::ordinal ( ) const
virtual

Global plan options only. Whether or not the global plan is a quick launch global plan (i.e. will not start executing until "turned on") and the icon to represent this global plan in the GUI

void DtIfPlan::copyStatementList ( const std::vector< DtSimStatement * > &  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

DtUUID DtIfPlan::myPlanName
mutableprotected
std::vector<DtSimStatement*> DtIfPlan::myStatementList
protected

List of top-level DtSimStatement*s.

Individual statements may contain nested statements.

bool DtIfPlan::myAppendFlag
protected

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

bool DtIfPlan::myAssignFlag
protected

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

bool DtIfPlan::myIsGlobal
protected
int DtIfPlan::myQuickLaunchFlags
protected

Information that are used for global plans only.

int DtIfPlan::myOrdinal
protected
DtString DtIfPlan::myQuickLaunchIcon
protected

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

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)