15 #include <vlutil/vlMachineTypes.h>
16 #include <vlutil/vlString.h>
22 #include <matrix/vlVector.h>
60 virtual void setDefaultHostility();
65 virtual bool addForce(
DtString forceName,
DtVector forceColor,
bool includeInDialogs,
int forceType = -1,
const DtString& country =
"");
68 virtual bool removeForce(DtU8 force);
71 virtual bool hasForceNamed(
const DtString&)
const;
75 virtual int forceTypeForForceNamed(
const DtString&)
const;
86 virtual void setHostility(DtU8 force, DtU8 targetForce,
bool hostile);
89 virtual bool hostile(DtU8 force, DtU8 targetForce)
const;
93 virtual void hostileForces(DtU8 force, std::list<DtU8>& forceList)
const;
94 virtual void hostileForces(DtU8 force, std::set<DtU8>& forceList)
const;
98 virtual int forceHostileTo(DtU8 force)
const;
102 virtual void friendlyForces(DtU8 force, std::list<DtU8>& forceList)
const;
115 virtual void setName(DtU8 force,
DtString forceName);
116 virtual DtString name(DtU8 force)
const;
121 virtual void setCountry(DtU8 force,
DtString forceName);
122 virtual DtString country(DtU8 force)
const;
127 virtual void setIncludeInDialogs(DtU8 force,
bool includeInDialogs);
128 virtual bool includeInDialogs(DtU8 force);
133 virtual void setColor(DtU8 force,
DtVector forceColor);
139 virtual void setForceIsUsed(DtU8 force,
bool forceIsUsed);
140 virtual bool forceIsUsed(DtU8 force);
144 virtual int numForces()
const;
147 virtual DtU8 nextAvailableForceId();
163 virtual bool readHostilityFile(
const DtString&
filename,
bool clear =
true);
164 virtual bool readHostilityFileFromZipFile(
const DtFilename& scenarioZipFile,
const DtString&
filename,
bool clear =
true);
167 virtual bool processHostilityFile(DtlInputStream*,
bool clear);
176 virtual void sendHostilityMatrix();
179 virtual void sendForces();
187 virtual void registerInterfaceMessageCallbacks();
191 static void requestHostilityMatrixCallback(
DtSimMessage* msg,
void* usr);
192 virtual void processRequestHostilityMatrix(
DtSimMessage* msg);
197 static void requestForcesCallback(
DtSimMessage* msg,
void* usr);
203 static void setHostilityMatrixCallback(
DtSimMessage* msg,
void* usr);
204 virtual void processSetHostilityMatrix(
DtSimMessage* msg);
209 static void requestForceHostilityCallback(
DtSimMessage* msg,
void* usr);
210 virtual void processRequestForceHostility(
DtSimMessage* msg);
215 static void setForceHostilityCallback(
DtSimMessage* msg,
void* usr);
216 virtual void processSetForceHostility(
DtSimMessage* msg);
225 virtual void clearMatrix();
std::vector< DtString > DtNameVector
Definition: hostilityManager.h:233
DtBoolVector myForceIsUsedVector
Definition: hostilityManager.h:251
DtCallbackList< DtU8 > myHostilityChangedCallbackList
Definition: hostilityManager.h:253
DtVectorVector myColorVector
Definition: hostilityManager.h:250
std::vector< DtVector > DtVectorVector
Definition: hostilityManager.h:234
DtSimulationServices * mySimulationServices
Local members.
Definition: hostilityManager.h:240
DtCallbackList< DtU8 >::DtCallbackFunctionType DtHostitliyChangedCallbackFcn
Definition: hostilityManager.h:48
This class keeps track of which forces are hostile to which other forces in the simulation. It maintains state for each force type, and which other forces types are considered hostile by that force. It can be queried for this data any time during the simulation. Supports force enumerations from 0 to 255.
Definition: hostilityManager.h:34
std::vector< DtBoolVector > DtBoolVectorVector
Definition: hostilityManager.h:232
DtBoolVector myIncludeInDialogsVector
Definition: hostilityManager.h:249
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
File: simMsg.h.
Definition: simMessage.h:35
Definition: noArgumentCallbackList.h:91
std::vector< bool > DtBoolVector
Typedefs to make list definitions easier.
Definition: hostilityManager.h:231
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:89
DtNameVector myCountryVector
Definition: hostilityManager.h:248
DtNameVector myNameVector
Definition: hostilityManager.h:247
Description: A readable, writable list of force descriptions.
Definition: rwForceDescriptionList.h:86
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
DtBoolVectorVector myHostilityMatrix
Tracks which forces are hostile to which other forces. Each force has a vector which contains a boole...
Definition: hostilityManager.h:245