VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
taskCommand.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2006 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 DtSimTask;
19 
24 {
25 public:
27  DtTaskCommand();
28 
30  DtTaskCommand(const DtString& writeName,
31  DtReaderWriterRegistry* parentRegistry = NULL);
32 
34  DtTaskCommand(const DtString & writeName, const DtTaskCommand& orig,
35  DtReaderWriterRegistry* parentRegistry = NULL);
36 
38  virtual ~DtTaskCommand() 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 DtSimTask* task() const;
58  virtual void setTask(const DtSimTask* task);
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 };
87 
UUID is a unique ID wrapper class.
Definition: uuid.h:59
DtRwUUID myUUID
Definition: taskCommand.h:84
DtSimTask * myTask
Definition: taskCommand.h:85
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.
DtSimCommand subclass for tasking an object. This command contains a DtSimTask, which is sent to the ...
Definition: taskCommand.h:23
uuid class
Definition: rwUUID.h:26
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
virtual DtSimCommand * clone() const
Version of clone that preserves the existing name, and assigns a null parent registry.
DtSimTask is an abstract base class from which real tasks can derive. It manages the read/write capab...
Definition: simTask.h:30
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)