VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
changeHostilityCommand.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2008 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #ifndef changeHostilityCommand_h
12 #define changeHostilityCommand_h
13 
14 #include "vrfplan/simCommand.h"
15 #include "vrfplan/vrfplanDefines.h"
16 #include "vrfutil/rwForceType.h"
17 #include <readerWriter/rwBoolean.h>
18 
23 {
24 public:
27 
29  DtChangeHostilityCommand(const DtString& writeName,
30  DtReaderWriterRegistry* parentRegistry = NULL);
31 
33  DtChangeHostilityCommand(const DtString & writeName, const DtChangeHostilityCommand& orig,
34  DtReaderWriterRegistry* parentRegistry = NULL);
35 
37  virtual ~DtChangeHostilityCommand();
38 
41 
43  virtual const DtSimCommandMessageType& type() const;
44 
46  virtual DtSimCommand * clone(const DtString & name, DtReaderWriterRegistry *
47  parentRegistry = 0) const;
48 
50 
51  virtual void setForceOne(const DtForceType& force);
52  virtual DtForceType forceOne() const;
54 
56 
57  virtual void setForceTwo(const DtForceType& force);
58  virtual DtForceType forceTwo() const;
60 
62 
63  virtual void setHostile(bool yesNo);
64  virtual bool hostile() const;
66 
68  virtual DtString stringRep() const;
69 
71  virtual int netRepSize() const;
72 
74  virtual bool setFromNet(const char* contentBuffer,
75  unsigned contentSize);
76 
78  virtual bool setToNet();
79 
81  static DtSimCommand* creator();
82 
83 protected:
87 };
88 
89 
90 #endif
virtual bool setToNet()
Calls netRep() to create the network buffer. Casts the resulting myNetRep to type DtNetSimSimCommand*...
DtSimCommand which changes the hostility of two forces. This command will give forceOne a new hostili...
Definition: changeHostilityCommand.h:22
virtual DtString stringRep() const =0
Returns a human-readable string representation of the command. This string representation is used to ...
Definition: readerWriterRegistry.h:39
DtRwBoolean myHostile
Definition: changeHostilityCommand.h:86
virtual int netRepSize() const
Returns the size in bytes of the network representation of the class. This is the size in bytes of th...
virtual bool setFromNet(const char *contentBuffer, unsigned contentSize)
Sets mySubsimCommand member from the incoming contentBuffer (cast to type DtNetSimSimCommand). Derived classes should call down to this function first, and then extract their own data starting at the location contentBuffer + DtSimCommand::netRepSize().
const DtSimCommand & operator=(const DtSimCommand &orig)
assignment operator; same as copy constructor
DtSimCommand is an abstract base class from which commands can derive. It manages the read/write capa...
Definition: simCommand.h:32
Description: A readable, writable DtForceType.
Definition: rwForceType.h:26
virtual DtSimCommand * clone() const
Version of clone that preserves the existing name, and assigns a null parent registry.
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
DtRwForceType myForceOne
Definition: changeHostilityCommand.h:84
virtual const DtSimCommandMessageType & type() const =0
#define DT_DLL_vrfplan
This file is used to determine how to build.
Definition: vrfplanDefines.h:28
DtRwForceType myForceTwo
Definition: changeHostilityCommand.h:85

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)