VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
embarkTask.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1999 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include "vrftasks/simTask.h"
12 #include <vlutil/vlNetTypes.h>
13 #include <readerWriter/rwString.h>
14 #include "readerWriter/rwVector.h"
15 #include <readerWriter/rwInt.h>
16 #include <readerWriter/rwBoolean.h>
17 #include <vlpi/netStructs.h>
18 #include "vrfutil/rwUUID.h"
19 
26 {
27 
28 public:
29 
31 
32  DtEmbarkTask();
33 
34 
37 
38  DtEmbarkTask(const DtString & writeName,
39  DtReaderWriterRegistry * parentRegistry = 0);
40 
41 
43 
44  DtEmbarkTask(const DtString & writeName, const
46  parentRegistry = 0);
47 
48 
50 
51  const DtEmbarkTask & operator=(const
52  DtEmbarkTask & orig);
53 
54 
55  virtual ~DtEmbarkTask() override;
56 
57 
59 
60  virtual const DtSimTaskMessageType& type() const override;
61 
62 
64 
65  virtual DtSimTask * clone(const DtString& name, DtReaderWriterRegistry* parentRegistry = 0) const override;
66 
67 
69 
70  virtual DtString stringRep() const override;
71 
72 
75  virtual void setParent(const DtUUID&);
76 
77 
80  virtual const DtUUID& parent() const;
81 
82 
85 
86  virtual int netRepSize() const override;
87 
88 
90 
91  virtual bool setFromNet(const char* contentBuffer, unsigned contentSize) override;
92 
93 
96 
97  virtual bool setToNet() override;
98 
99 
100  virtual bool isOneClick() const override
101  {
102  return true;
103  }
104 
105  static DtSimTask * creator();
106 
107 
108  virtual void setLoadOverride(bool b);
109  virtual bool loadOverride() const;
110 
111  virtual void setLoadOverridePosition(const DtVector&);
112  virtual const DtVector& loadOverridePosition() const;
113 
118  virtual void setEmbarkInSlot(int s);
119  virtual int embarkInSlot() const;
120 
121  virtual void setSlotName(const DtString&);
122  virtual const DtString& slotName() const;
123 
124  virtual void setSlotType(const DtString&);
125  virtual const DtString& slotType() const;
126 
127  virtual void setChooseAnyAvailableSlotIfTaken(bool);
128  virtual bool chooseAnyAvailableSlotIfTaken() const;
129 
130 protected:
138 };
UUID is a unique ID wrapper class.
Definition: uuid.h:59
DtEmbarkTask represents a task to a entity to embark onto a parent entity.
Definition: embarkTask.h:25
virtual bool isOneClick() const override
If this is true this task supports one click execution. By default this is false. ...
Definition: embarkTask.h:100
DtRwBoolean myChooseAnyAvailableIfSlotTaken
Definition: embarkTask.h:135
Description: Readable, Writable DtString Variable substitutions are done on this object when it is re...
Definition: rwString.h:20
Definition: readerWriterRegistry.h:39
Contains the DtUUID class declaration.
virtual DtSimTask * clone(const DtString &name, DtReaderWriterRegistry *parentRegistry=0) const =0
Make a copy of this task. Returns a newly allocated instance of a DtSimTask. Override this member fun...
uuid class
Definition: rwUUID.h:26
DtRwOffsetVector myLoadOverridePosition
Definition: embarkTask.h:133
DtRwString mySlotType
Definition: embarkTask.h:137
virtual bool setFromNet(const char *contentBuffer, unsigned contentSize)
Sets mySubtask member from the incoming contentBuffer (cast to type DtNetSimTask). Derived classes should call down to this function first, and then extract their own data starting at the location contentBuffer + DtSimTask::netRepSize().
DtRwUUID myParent
Definition: embarkTask.h:131
Description: Readable, Writable int.
Definition: rwInt.h:25
virtual bool setToNet()
Calls netRep() to create the network buffer. Casts the resulting myNetRep to type DtNetSimTask*...
#define DT_DLL_vrftasks
This file is used to determine how to build.
Definition: vrftasksDefines.h:26
Specialized vector that can be used for the knowledge of an &quot;offset&quot; rather than location vector...
Definition: rwVector.h:112
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
DtSimTask is an abstract base class from which real tasks can derive. It manages the read/write capab...
Definition: simTask.h:30
virtual DtString stringRep() const =0
Returns a human-readable string representation of the task. This string representation is used to dis...
const DtSimTask & operator=(const DtSimTask &orig)
assignment operator; same as copy constructor
DtRwInt myEmbarkInSlot
Definition: embarkTask.h:134
DtRwString mySlotName
Definition: embarkTask.h:136
DtRwBoolean myLoadOverride
Definition: embarkTask.h:132
virtual const DtSimTaskMessageType & type() const =0
What kind of task am I? Returns a string indicating the kind of task (for example, “move-to”, “follow-entity”). Derived classes must implement this member function to return a unique string representing the type of task. The set of standard task types supplied with VR-Forces is in taskTypes.h.
File: rwVector.h.
virtual int netRepSize() const
Returns the size in bytes of the network representation of the class. This is the size in bytes of th...

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)