VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
adminContent.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2007 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 #pragma once
11 
13 #include "tdbutil/unitFormatter.h"
15 #include "tdbutil/tdbUnits.h"
18 
25 {
26 protected:
29 
32 
34  DtAdminContent(const DtAdminContent & orig);
35 
37  const DtAdminContent & operator=(const DtAdminContent & orig);
38 
39 public:
40 
42  virtual ~DtAdminContent();
43 
46  virtual bool init();
47 
50  virtual const DtAdminContentMessageType& type() const = 0;
51 
56  virtual DtAdminContent * clone() const = 0;
57 
62  virtual DtString stringRep() const = 0;
63 
64  virtual char* netRep();
65 
70 
71  virtual int netRepSize() const;
74 
77  virtual bool setFromNet(const char* contentBuffer,
78  unsigned contentSize);
79 
82  virtual bool setToNet();
84 
85  static void addAdminContentCreatorFcn(const DtAdminContentMessageType & contentName,
87 
88  static void setFactory(DtAdminContentFactory * factory);
89  static DtAdminContentFactory * factory();
90 
91  static bool isTypeRegistered(const DtAdminContentMessageType& type);
92 
93 protected:
94  virtual char* createNetworkBuffer();
95 
96 protected:
97  char* myNetRep;
98 
99 protected:
101 };
102 
103 #ifdef _MSC_VER
104 namespace DtBufferSerialize
105 {
106 #endif
107  DT_DLL_vrftasks int getSize(const DtAdminContent* contentPtr);
110 
115  DT_DLL_vrftasks char* encode(const DtAdminContent* adminContentPtr, char *buffer);
116 
125  DT_DLL_vrftasks const char* decode(DtAdminContent*& adminContentPtr, const char *buffer);
126 #ifdef _MSC_VER
127 }
128 #endif
DT_DLL_readerWriter int getSize(const DtString &val)
The number of bytes required to encode the value.
Definition: vrfObjectMessageTypeTemplate.h:24
Factory for DtAdminContent used in messages.
Definition: adminContentFactory.h:22
DtAdminContentFactory::DtCreatorFcn DtAdminContentCreatorFcn
Definition: adminContentFactory.h:36
Define constants for types of tasks, sets, admin messages, reports, and sim commands (all sent via ra...
DT_DLL_readerWriter char * encode(const DtFilename &val, char *buffer)
Serializes the provided value val into buffer.
#define DT_DLL_vrftasks
This file is used to determine how to build.
Definition: vrftasksDefines.h:26
char * myNetRep
Definition: adminContent.h:97
DtAdminContent.
Definition: adminContent.h:24
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
DT_DLL_readerWriter const char * decode(DtString &val, const char *buffer)
Decodes a value from buffer and places the result in val of the type specified by val...
static DtAdminContentFactory * myFactory
Definition: adminContent.h:100

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)