VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
setDataCommand.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
13 #include "vrfplan/simCommand.h"
14 #include "vrfplan/vrfplanDefines.h"
15 #include <readerWriter/rwString.h>
16 #include <vrfutil/rwUUID.h>
17 
18 class DtSetDataRequest;
19 
24 {
25 public:
28 
30  DtSetDataCommand(const DtString& writeName,
31  DtReaderWriterRegistry* parentRegistry = NULL);
32 
34  DtSetDataCommand(const DtString & writeName, const DtSetDataCommand& orig,
35  DtReaderWriterRegistry* parentRegistry = NULL);
36 
38  virtual ~DtSetDataCommand() override;
39 
42 
44  virtual const DtSimCommandMessageType& type() const override;
45 
47  virtual DtSimCommand * clone(const DtString& name, DtReaderWriterRegistry* parentRegistry = 0) const override;
48 
50 
51  virtual const DtUUID& uuid() const;
52  virtual void setUUID(const DtUUID&);
54 
56  virtual const DtSetDataRequest* setRequest() const;
58  virtual void setSetRequest(const DtSetDataRequest* setReq);
59 
61  virtual DtString stringRep() const override;
62 
64  virtual int netRepSize() const override;
65 
67  virtual bool setFromNet(const char* contentBuffer, unsigned contentSize) override;
68 
70  virtual bool setToNet() override;
71 
73  static DtSimCommand* creator();
74 
75 protected:
77 
78  virtual void putData(std::string& fp, int indentLevel = 0) override;
79  virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths& searchPaths,
80  const DtVariableBindingsList& variableBindings) override;
82 
83 protected:
86 };
UUID is a unique ID wrapper class.
Definition: uuid.h:59
DtSimCommand subclass sending DtSetDataRequests to an object. This command contains a DtSetDataReques...
Definition: setDataCommand.h:23
DtRwUUID myUUID
Definition: setDataCommand.h:84
virtual bool setToNet()
Calls netRep() to create the network buffer. Casts the resulting myNetRep to type DtNetSimSimCommand*...
virtual DtString stringRep() const =0
Returns a human-readable string representation of the command. This string representation is used to ...
Definition: readerWriterRegistry.h:39
Contains the DtUUID class declaration.
uuid class
Definition: rwUUID.h:26
DtSetDataRequest is an abstract base class from which real setDataRequests can derive. It manages the read/write capability; derived classes need only use and register read/writatble data types for derived information.
Definition: setDataRequest.h:41
virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings) override
getData is just used to get us past the type in the data stream, since it&#39;s not actually stored...
virtual void putData(std::string &fp, int indentLevel=0) override
putData writes our type, which is provided by the virtual type accessor of the deriving class...
virtual int netRepSize() const
Returns the size in bytes of the network representation of the class. This is the size in bytes of th...
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
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().
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
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
DtSetDataRequest * mySetRequest
Definition: setDataCommand.h:85
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

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)