VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
DtCurrentTasksAdminContent Class Reference

Admin content that is used to send the current tasks status from a specific entity. This message is sent in response to a DtRequstCurrentTasksAdminContent or a subscription to the current task status using the same message. The current task status is a list of all the currently executing top level tasks that an entity has.

Inheritance diagram for DtCurrentTasksAdminContent:
Inheritance graph
[legend]

Classes

struct  UnparentedSubtask
 

Public Types

typedef std::list
< DtCurrentTaskData
DtTaskList
 
typedef std::list
< DtCurrentScriptedSetData
DtScriptedSetList
 

Public Member Functions

 DtCurrentTasksAdminContent ()
 
 DtCurrentTasksAdminContent (const DtCurrentTasksAdminContent &orig)
 
const DtCurrentTasksAdminContentoperator= (const DtCurrentTasksAdminContent &orig)
 
virtual ~DtCurrentTasksAdminContent ()
 
virtual bool init ()
 
virtual const
DtAdminContentMessageType
type () const
 
virtual void addTaskToList (const DtSimTask *task, const std::vector< DtSimTaskMessageType > &conflictingTaskTypes, int taskId, int status, const DtString &controller)
 
virtual void addScriptedSetToList (const DtSetDataRequest *set, int taskId, const DtString &controller)
 
virtual void addSubtask (const DtSimTask *task, int subtaskId, int spawningTaskId, int status, const DtString &controller, bool addIfNoParent=false)
 
virtual void clearTaskList ()
 
virtual void clearScriptedSetsList ()
 
virtual const DtTaskListtaskList () const
 
virtual const DtScriptedSetListscriptedSetList () const
 
virtual bool testTaskForConflict (const DtSimTaskMessageType &taskType) const
 
virtual DtAdminContentclone () const
 
virtual DtString stringRep () const
 
virtual int netRepSize () const
 
virtual bool setFromNet (const char *contentBuffer, unsigned contentSize)
 
virtual bool setToNet ()
 
virtual void resolveUnparentedSubtasks ()
 
virtual void clearUnparentedSubtasks ()
 
- Public Member Functions inherited from DtAdminContent
virtual ~DtAdminContent ()
 
virtual charnetRep ()
 

Static Public Member Functions

static DtAdminContentcreate ()
 
- Static Public Member Functions inherited from DtAdminContent
static void addAdminContentCreatorFcn (const DtAdminContentMessageType &contentName, DtAdminContentCreatorFcn fcn)
 
static void setFactory (DtAdminContentFactory *factory)
 
static DtAdminContentFactoryfactory ()
 
static bool isTypeRegistered (const DtAdminContentMessageType &type)
 

Protected Types

typedef std::map< int,
DtCurrentTaskData * > 
InternalTaskMap
 
typedef std::vector
< UnparentedSubtask
UnparentedSubtasks
 

Protected Member Functions

virtual void addUnparentedSubtask (const DtSimTask *task, int subtaskId, int spawningTaskId, int status, const DtString &controller)
 
void clearTaskList (DtTaskList &taskList)
 
virtual void clearAllTasks ()
 
void copyTaskList (const DtTaskList &taskList, DtTaskList &into)
 
void copyScriptedSetList (const DtScriptedSetList &taskList, DtScriptedSetList &into)
 
virtual DtString printTasksToString (const DtTaskList &tasks) const
 
virtual DtString printSetsToString (const DtScriptedSetList &tasks) const
 
virtual void addTaskWithStatus (DtTaskList &list, const DtSimTask *task, int status, const std::vector< DtSimTaskMessageType > &conflictingTaskTypes, int taskId, const DtString &controller)
 
- Protected Member Functions inherited from DtAdminContent
 DtAdminContent ()
 
 DtAdminContent (const DtAdminContent &orig)
 
const DtAdminContentoperator= (const DtAdminContent &orig)
 
virtual charcreateNetworkBuffer ()
 

Protected Attributes

DtTaskList myTaskList
 
DtScriptedSetList myScriptedSetList
 
InternalTaskMap myInternalTaskMap
 
UnparentedSubtasks myUnparentedSubtasks
 
- Protected Attributes inherited from DtAdminContent
charmyNetRep
 

Additional Inherited Members

- Static Protected Attributes inherited from DtAdminContent
static DtAdminContentFactorymyFactory
 

Member Typedef Documentation

Internal map that keeps track of tasks such that when adding a subtask it can be added efficiently.

Constructor & Destructor Documentation

DtCurrentTasksAdminContent::DtCurrentTasksAdminContent ( )

default constructor

DtCurrentTasksAdminContent::DtCurrentTasksAdminContent ( const DtCurrentTasksAdminContent orig)

copy constructor

virtual DtCurrentTasksAdminContent::~DtCurrentTasksAdminContent ( )
virtual

destructor

Member Function Documentation

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

assignment operator; same as copy costructor.

static DtAdminContent* DtCurrentTasksAdminContent::create ( )
static

Creator function. Returns new instance of this class.

virtual bool DtCurrentTasksAdminContent::init ( )
virtual

Call after construction.

Reimplemented from DtAdminContent.

virtual const DtAdminContentMessageType& DtCurrentTasksAdminContent::type ( ) const
virtual
Returns

Implements DtAdminContent.

virtual void DtCurrentTasksAdminContent::addTaskToList ( const DtSimTask task,
const std::vector< DtSimTaskMessageType > &  conflictingTaskTypes,
int  taskId,
int  status,
const DtString controller 
)
virtual

Clones the specified task and adds it to the task list in the message. Associates the specified list of task IDs as the conflicting task IDs to the specified task.

virtual void DtCurrentTasksAdminContent::addScriptedSetToList ( const DtSetDataRequest set,
int  taskId,
const DtString controller 
)
virtual

Clones the specified scripted set and adds it to the list of current items being managed by the scripted task controller.

virtual void DtCurrentTasksAdminContent::addSubtask ( const DtSimTask task,
int  subtaskId,
int  spawningTaskId,
int  status,
const DtString controller,
bool  addIfNoParent = false 
)
virtual

Look at all the tasks and see which task this belongs to.

virtual void DtCurrentTasksAdminContent::clearTaskList ( )
virtual

Removes all the top level tasks from the task list.

virtual void DtCurrentTasksAdminContent::clearScriptedSetsList ( )
virtual

Removes all the scripted sets from the set list.

virtual const DtTaskList& DtCurrentTasksAdminContent::taskList ( ) const
virtual
Returns
The task list.
Note
The tasks pointed to by this list belong to this admin content, and will be deleted when this admin content is deleted. No not modify or hold on to pointers to these tasks.
virtual const DtScriptedSetList& DtCurrentTasksAdminContent::scriptedSetList ( ) const
virtual
Returns
The scripted set list.
Note
The sets pointed to by this list belong to this admin content, and will be deleted when this admin content is deleted. No not modify or hold on to pointers to these tasks.
virtual bool DtCurrentTasksAdminContent::testTaskForConflict ( const DtSimTaskMessageType taskType) const
virtual
Returns
True if and only if the specified task type appears in any of the conflicting task type lists for any of the tasks contained in the content.
virtual DtAdminContent* DtCurrentTasksAdminContent::clone ( ) const
virtual

Make a copy of this content. Returns a pointer to a newly created copy of this class.

Implements DtAdminContent.

virtual DtString DtCurrentTasksAdminContent::stringRep ( ) const
virtual

Get a readable string representation of this content.

Implements DtAdminContent.

virtual int DtCurrentTasksAdminContent::netRepSize ( ) const
virtual
Returns
Size of the serialized representation of this admin content.

Reimplemented from DtAdminContent.

virtual bool DtCurrentTasksAdminContent::setFromNet ( const char contentBuffer,
unsigned  contentSize 
)
virtual

Decodes content from buffer.

Reimplemented from DtAdminContent.

virtual bool DtCurrentTasksAdminContent::setToNet ( )
virtual

Encodes content into buffer.

Reimplemented from DtAdminContent.

virtual void DtCurrentTasksAdminContent::resolveUnparentedSubtasks ( )
virtual

Adds in all unparented subtasks.

virtual void DtCurrentTasksAdminContent::clearUnparentedSubtasks ( )
virtual

Clears out unparented subtasks.

virtual void DtCurrentTasksAdminContent::addUnparentedSubtask ( const DtSimTask task,
int  subtaskId,
int  spawningTaskId,
int  status,
const DtString controller 
)
protectedvirtual

If a subtask is to be added and the parent task does not exist, add to unparented internal list. When done adding all tasks MUST call resolveUnparentedSubtasks. If you do not all unparented tasks will be lost.

void DtCurrentTasksAdminContent::clearTaskList ( DtTaskList taskList)
protected

Removes and deletes all tasks on the task list. Non-virtual because it is used by the constructors/destructor.

virtual void DtCurrentTasksAdminContent::clearAllTasks ( )
protectedvirtual

Clears the task list.

void DtCurrentTasksAdminContent::copyTaskList ( const DtTaskList taskList,
DtTaskList into 
)
protected

Clones all tasks in taskList and adds them to myTaskList.

Note
Does not clear myTaskList first. Non-virtual because it is used by the constructors.
void DtCurrentTasksAdminContent::copyScriptedSetList ( const DtScriptedSetList taskList,
DtScriptedSetList into 
)
protected

Clones all sets in scriptedSetList and adds them to myScriptedSetList.

Note
Does not clear myScriptedSetList first. Non-virtual because it is used by the constructors.
virtual DtString DtCurrentTasksAdminContent::printTasksToString ( const DtTaskList tasks) const
protectedvirtual

Prints out the string rep of the list and returns the string.

virtual DtString DtCurrentTasksAdminContent::printSetsToString ( const DtScriptedSetList tasks) const
protectedvirtual
virtual void DtCurrentTasksAdminContent::addTaskWithStatus ( DtTaskList list,
const DtSimTask task,
int  status,
const std::vector< DtSimTaskMessageType > &  conflictingTaskTypes,
int  taskId,
const DtString controller 
)
protectedvirtual

Adds a task to the supplied list.

Member Data Documentation

DtTaskList DtCurrentTasksAdminContent::myTaskList
protected
DtScriptedSetList DtCurrentTasksAdminContent::myScriptedSetList
protected
InternalTaskMap DtCurrentTasksAdminContent::myInternalTaskMap
protected
UnparentedSubtasks DtCurrentTasksAdminContent::myUnparentedSubtasks
protected

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

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)