VR-Forces 5.0.1 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();
39 
42 
44  virtual const DtSimCommandMessageType& type() const;
45 
47  virtual DtSimCommand * clone(const DtString & name, DtReaderWriterRegistry *
48  parentRegistry = 0) const;
49 
51 
52  virtual const DtUUID& uuid() const;
53  virtual void setUUID(const DtUUID&);
55 
57  virtual const DtSimTask* task() const;
59  virtual void setTask(const DtSimTask* task);
60 
62  virtual DtString stringRep() const;
63 
65  virtual int netRepSize() const;
66 
68  virtual bool setFromNet(const char* contentBuffer,
69  unsigned contentSize);
70 
72  virtual bool setToNet();
73 
75  static DtSimCommand* creator();
76 
77 protected:
79 
80  virtual void putData(std::string& fp, int indentLevel = 0);
81  virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths& searchPaths,
82  const DtVariableBindingsList& variableBindings);
84 
85 protected:
88 };
89 
UUID is a unique ID wrapper class.
Definition: rwUUID.h:226
DtRwUUID myUUID
Definition: taskCommand.h:86
virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)
getData is just used to get us past the type in the data stream, since it&#39;s not actually stored...
DtSimTask * myTask
Definition: taskCommand.h:87
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
Description: Readable, Writable uuid string. Use this class in order to convert from object marking t...
Definition: rwUUID.h:428
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
virtual void putData(std::string &fp, int indentLevel=0)
putData writes our type, which is provided by the virtual type accessor of the deriving class...

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)