VR-Forces 5.0.3 Developer's Guide
 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 
14 #include "tdbutil/tdbUnits.h"
17 
24 {
25 protected:
28 
31 
33  DtAdminContent(const DtAdminContent & orig);
34 
36  const DtAdminContent & operator=(const DtAdminContent & orig);
37 
38 public:
39 
41  virtual ~DtAdminContent();
42 
45  virtual bool init();
46 
49  virtual const DtAdminContentMessageType& type() const = 0;
50 
55  virtual DtAdminContent * clone() const = 0;
56 
61  virtual DtString stringRep() const = 0;
62 
63  virtual char* netRep();
64 
69 
70  virtual int netRepSize() const;
73 
76  virtual bool setFromNet(const char* contentBuffer,
77  unsigned contentSize);
78 
81  virtual bool setToNet();
83 
84  static void addAdminContentCreatorFcn(const DtAdminContentMessageType & contentName,
86 
87  static void setFactory(DtAdminContentFactory * factory);
88  static DtAdminContentFactory * factory();
89 
90  static bool isTypeRegistered(const DtAdminContentMessageType& type);
91 
92 protected:
93  virtual char* createNetworkBuffer();
94 
95 protected:
96  char* myNetRep;
97 
98 protected:
100 };
101 
102 #ifdef _MSC_VER
103 namespace DtBufferSerialize
104 {
105 #endif
106  DT_DLL_vrftasks int getSize(const DtAdminContent* contentPtr);
109 
114  DT_DLL_vrftasks char* encode(const DtAdminContent* adminContentPtr, char *buffer);
115 
124  DT_DLL_vrftasks const char* decode(DtAdminContent*& adminContentPtr, const char *buffer);
125 #ifdef _MSC_VER
126 }
127 #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. Overridden from the template class to specialize the err...
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. buffer must have at least the number of bytes returned...
#define DT_DLL_vrftasks
This file is used to determine how to build.
Definition: vrftasksDefines.h:26
char * myNetRep
Definition: adminContent.h:96
DtAdminContent.
Definition: adminContent.h:23
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:99

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)