VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
simCommand.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2006 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 
10 #pragma once
11 
12 #include "vrfutil/readerWriter.h"
14 //#include "vrfutil/strIntMapper.h"
15 #include "vrfutil/rwBoolean.h"
16 #include <vlutil/vlNetTypes.h>
17 #include "tdbutil/unitFormatter.h"
18 #include "tdbutil/tdbUnits.h"
19 #include "vrfplan/vrfplanDefines.h"
20 
21 class DtRwString;
23 
31 
33 {
34 protected:
37 
39  DtSimCommand();
40 
43  DtSimCommand(const DtString & writeName,
44  DtReaderWriterRegistry * parentRegistry = 0);
45 
47  DtSimCommand(const DtString & writeName, const DtSimCommand & orig,
48  DtReaderWriterRegistry * parentRegistry = 0);
49 
51  const DtSimCommand & operator=(const DtSimCommand & orig);
52 
53 public:
54 
56  virtual ~DtSimCommand();
57 
60  virtual bool init();
61 
66  virtual const DtSimCommandMessageType& type() const = 0;
67 
72  virtual DtSimCommand * clone(const DtString & name, DtReaderWriterRegistry *
73  parentRegistry = 0) const = 0;
74 
77  virtual DtSimCommand* clone() const;
78 
84  virtual DtString stringRep() const = 0;
85 
88  virtual void putData(FILE *fp, int indentLevel = 0);
89 
92  virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths& searchPaths,
93  const DtVariableBindingsList& variableBindings);
94 
95  virtual char* netRep();
96 
102  virtual int netRepSize() const;
103 
108  virtual bool setFromNet(const char* contentBuffer,
109  unsigned contentSize);
110 
118  virtual bool setToNet();
119 
120 
131  static DtSimCommand * createSimCommand(DtlObjPtr mtlStream);
132  static DtSimCommand * createSimCommand(const DtSimCommandMessageType& simCommandType);
133 
135  static void addSimCommandCreatorFcn(const DtSimCommandMessageType& simCommandName,
137 
138  static void setFactory(DtSimCommandFactory * factory);
139  static DtSimCommandFactory* factory();
140 
141 protected:
142  virtual char* createNetworkBuffer();
143  virtual bool isTypeRegistered(const DtSimCommandMessageType& commandType);
144 
145 protected:
146  char* myNetRep;
148 };
149 
150 namespace DtBufferSerialize
151 {
154  DT_DLL_vrfplan int getSize(const DtSimCommand* const& commandPtr);
155 
160  DT_DLL_vrfplan char *encode(const DtSimCommand* const& commandPtr, char *buffer);
161 
170  DT_DLL_vrfplan const char *decode(DtSimCommand*& commandPtr, const char *buffer);
171 }
172 

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)