VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
sendChatCommand.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
8 #include "vrfplan/simCommand.h"
10 #include <readerWriter/rwInt.h>
11 
16 {
17 public:
18 
21 
23  DtSendChatCommand(const DtString& writeName,
24  DtReaderWriterRegistry* parentRegistry = NULL);
25 
27  DtSendChatCommand(const DtString & writeName, const DtSendChatCommand& orig,
28  DtReaderWriterRegistry* parentRegistry = NULL);
29 
31  virtual ~DtSendChatCommand() override;
32 
35 
38 
40  virtual const DtSimCommandMessageType& type() const override;
41 
43  virtual DtSimCommand * clone(const DtString& name, DtReaderWriterRegistry* parentRegistry = 0) const override;
44 
46 
47  virtual const DtString& channel() const;
48  virtual void setChannel(const DtString&);
50 
52 
53  virtual int forceType() const;
54  virtual void setForceType(int force);
56 
58 
59  virtual const DtString& message() const;
60  virtual void setMessage(const DtString&);
62 
63  virtual int netRepSize() const override;
64  virtual bool setFromNet(const char* contentBuffer, unsigned contentSize) override;
65  virtual bool setToNet() override;
66 
68  virtual DtString stringRep() const override;
69 
70  static DtSimCommand* creator();
71 
72 protected:
76 };
77 
virtual bool setToNet()
Calls netRep() to create the network buffer. Casts the resulting myNetRep to type DtNetSimSimCommand*...
DtRwInt myForceType
Definition: sendChatCommand.h:75
Description: Readable, Writable DtString Variable substitutions are done on this object when it is re...
Definition: rwString.h:20
virtual DtString stringRep() const =0
Returns a human-readable string representation of the command. This string representation is used to ...
Definition: readerWriterRegistry.h:39
DtRwString myMessage
Definition: sendChatCommand.h:74
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().
Description: Readable, Writable int.
Definition: rwInt.h:25
const DtSimCommand & operator=(const DtSimCommand &orig)
assignment operator; same as copy constructor
DtRwString myChannel
Definition: sendChatCommand.h:73
DtSimCommand is an abstract base class from which commands can derive. It manages the read/write capa...
Definition: simCommand.h:32
virtual DtSimCommand * clone() const
Version of clone that preserves the existing name, and assigns a null parent registry.
virtual const DtSimCommandMessageType & type() const =0
#define DT_DLL_vrfplan
This file is used to determine how to build.
Definition: vrfplanDefines.h:28
DtSendChatCommand&#39;.
Definition: sendChatCommand.h:15

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)