VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rwIntSized.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2025 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
16 
17 #pragma once
18 
19 #include <vlutil/vlMachineTypes.h>
20 #include <readerWriter/rwInt.h>
21 #include <readerWriter/rwTypes.h>
22 
24 
26 
27 
30 {
31 public:
33  DtRwInt8() : DtRwInt() {}
34 
36  DtRwInt8(const DtString& name, DtReaderWriterRegistry* const parentRegistry = NULL)
37  : DtRwInt(name, parentRegistry) {}
38 
39  DtRwInt8(const DtSymbolString& name, DtReaderWriterRegistry* const parentRegistry = NULL)
40  : DtRwInt(name, parentRegistry) {}
41 
43  DtRwInt8(const DtString& name, int value, DtReaderWriterRegistry* const parentRegistry = NULL)
44  : DtRwInt(name, value, parentRegistry) {}
45 
47  DtRwInt8(const DtSymbolString& name, int value, DtReaderWriterRegistry* const parentRegistry = NULL)
48  : DtRwInt(name, value, parentRegistry) {}
49 
51  DtRwInt8(int orig, DtReaderWriterRegistry* const parentRegistry = NULL)
52  : DtRwInt(orig, parentRegistry) {}
53 
54  DtRwInt8(const DtRwInt& orig, DtReaderWriterRegistry* const parentRegistry = NULL)
55  : DtRwInt(orig, parentRegistry) {}
56 
57  virtual const char *readerWriterType() const override {
58  return DtRwInt8Type;
59  }
60 
61  static const char* theXmlType()
62  {
63  return DtXMLInt8Type;
64  }
65 
66  virtual const char *xmlType() const override {
67  return theXmlType();
68  }
69 
70  virtual int alignment() const override {
71  return 1;
72  }
73 
74 };
75 
78 {
79 public:
81  DtRwInt16() : DtRwInt() {}
82 
84  DtRwInt16(const DtString& name, DtReaderWriterRegistry* const parentRegistry = NULL)
85  : DtRwInt(name, parentRegistry) {}
86 
87  DtRwInt16(const DtSymbolString& name, DtReaderWriterRegistry* const parentRegistry = NULL)
88  : DtRwInt(name, parentRegistry) {}
89 
91  DtRwInt16(const DtString& name, int value, DtReaderWriterRegistry* const parentRegistry = NULL)
92  : DtRwInt(name, value, parentRegistry) {}
93 
95  DtRwInt16(const DtSymbolString& name, int value, DtReaderWriterRegistry* const parentRegistry = NULL)
96  : DtRwInt(name, value, parentRegistry) {}
97 
99  DtRwInt16(int orig, DtReaderWriterRegistry* const parentRegistry = NULL)
100  : DtRwInt(orig, parentRegistry) {}
101 
102  DtRwInt16(const DtRwInt& orig, DtReaderWriterRegistry* const parentRegistry = NULL)
103  : DtRwInt(orig, parentRegistry) {}
104 
105  virtual const char *readerWriterType() const override {
106  return DtRwInt16Type;
107  }
108 
109  static const char* theXmlType()
110  {
111  return DtXMLInt16Type;
112  }
113 
114  virtual const char *xmlType() const override {
115  return theXmlType();
116  }
117 
118  virtual int alignment() const override {
119  return 2;
120  }
121 
122 };
123 
126 {
127 public:
130 
132  DtRwInt32(const DtString& name, DtReaderWriterRegistry* const parentRegistry = NULL)
133  : DtRwInt(name, parentRegistry) {}
134 
135  DtRwInt32(const DtSymbolString& name, DtReaderWriterRegistry* const parentRegistry = NULL)
136  : DtRwInt(name, parentRegistry) {}
137 
139  DtRwInt32(const DtString& name, int value, DtReaderWriterRegistry* const parentRegistry = NULL)
140  : DtRwInt(name, value, parentRegistry) {}
141 
143  DtRwInt32(const DtSymbolString& name, int value, DtReaderWriterRegistry* const parentRegistry = NULL)
144  : DtRwInt(name, value, parentRegistry) {}
145 
147  DtRwInt32(int orig, DtReaderWriterRegistry* const parentRegistry = NULL)
148  : DtRwInt(orig, parentRegistry) {}
149 
150  DtRwInt32(const DtRwInt& orig, DtReaderWriterRegistry* const parentRegistry = NULL)
151  : DtRwInt(orig, parentRegistry) {}
152 
153  virtual const char *readerWriterType() const override {
154  return DtRwInt32Type;
155  }
156 
157  static const char* theXmlType()
158  {
159  return DtXMLInt32Type;
160  }
161 
162  virtual const char *xmlType() const override {
163  return theXmlType();
164  }
165 
166  virtual int alignment() const override {
167  return 4;
168  }
169 
170 };
171 
172 namespace DtBufferSerialize
173 {
175  DT_DLL_readerWriter int getSize(const DtRwInt8& val);
176  DT_DLL_readerWriter int getSize(const DtRwInt16& val);
177  DT_DLL_readerWriter int getSize(const DtRwInt32& val);
178 
185  DT_DLL_readerWriter char *encode(const DtRwInt8& val, char *buffer);
186  DT_DLL_readerWriter char *encode(const DtRwInt16& val, char *buffer);
187  DT_DLL_readerWriter char *encode(const DtRwInt32& val, char *buffer);
188 
195  DT_DLL_readerWriter const char *decode(DtRwInt8 &val, const char *buffer);
196  DT_DLL_readerWriter const char *decode(DtRwInt16 &val, const char *buffer);
197  DT_DLL_readerWriter const char *decode(DtRwInt32 &val, const char *buffer);
198 }
199 
200 
DT_DLL_readerWriter int getSize(const DtString &val)
The number of bytes required to encode the value.
#define DT_DLL_readerWriter
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: readerWriterDefines.h:34
DtRwInt8(const DtSymbolString &name, int value, DtReaderWriterRegistry *const parentRegistry=NULL)
real constructor from an int
Definition: rwIntSized.h:47
DtRwInt32(const DtSymbolString &name, DtReaderWriterRegistry *const parentRegistry=NULL)
Definition: rwIntSized.h:135
DtRwInt that encodes the value as a 32 bit integer.
Definition: rwIntSized.h:125
This class allows one to collect and compare strings using an index number instead of having to do st...
Definition: symbolString.h:27
virtual const char * xmlType() const override
Routines to archive/dearchive from an XML Environment.
Definition: rwIntSized.h:66
DtRwInt16(const DtRwInt &orig, DtReaderWriterRegistry *const parentRegistry=NULL)
Definition: rwIntSized.h:102
const char DtRwInt8Type[]
Definition: rwTypes.h:25
const char DtXMLInt16Type[]
Definition: rwTypes.h:28
DtRwInt16(const DtSymbolString &name, DtReaderWriterRegistry *const parentRegistry=NULL)
Definition: rwIntSized.h:87
DtRwInt that encodes the value as an 8 bit integer.
Definition: rwIntSized.h:29
DtRwInt8()
default constructor
Definition: rwIntSized.h:33
static const char * theXmlType()
Definition: rwIntSized.h:157
DtRwInt16(const DtString &name, DtReaderWriterRegistry *const parentRegistry=NULL)
real constructor
Definition: rwIntSized.h:84
DtRwInt32(const DtString &name, int value, DtReaderWriterRegistry *const parentRegistry=NULL)
real constructor from an int
Definition: rwIntSized.h:139
DtRwInt32(const DtSymbolString &name, int value, DtReaderWriterRegistry *const parentRegistry=NULL)
real constructor from an int
Definition: rwIntSized.h:143
Definition: readerWriterRegistry.h:39
DtRwInt32(const DtString &name, DtReaderWriterRegistry *const parentRegistry=NULL)
real constructor
Definition: rwIntSized.h:132
DtRwInt16(const DtSymbolString &name, int value, DtReaderWriterRegistry *const parentRegistry=NULL)
real constructor from an int
Definition: rwIntSized.h:95
virtual const char * xmlType() const override
Routines to archive/dearchive from an XML Environment.
Definition: rwIntSized.h:114
virtual const char * readerWriterType() const override
Used to supply a string type that this reader writer type is. This can be used in place of dynamic-ca...
Definition: rwIntSized.h:105
virtual int alignment() const override
Return HLA network alignment. sizeof(int)
Definition: rwIntSized.h:166
DtRwInt8(const DtString &name, int value, DtReaderWriterRegistry *const parentRegistry=NULL)
real constructor from an int
Definition: rwIntSized.h:43
virtual const char * readerWriterType() const override
Used to supply a string type that this reader writer type is. This can be used in place of dynamic-ca...
Definition: rwIntSized.h:57
Description: Readable, Writable int.
Definition: rwInt.h:25
virtual const char * readerWriterType() const override
Used to supply a string type that this reader writer type is. This can be used in place of dynamic-ca...
Definition: rwIntSized.h:153
DtRwInt16(const DtString &name, int value, DtReaderWriterRegistry *const parentRegistry=NULL)
real constructor from an int
Definition: rwIntSized.h:91
DtRwInt32(int orig, DtReaderWriterRegistry *const parentRegistry=NULL)
copy constructor
Definition: rwIntSized.h:147
DtRwInt8(const DtString &name, DtReaderWriterRegistry *const parentRegistry=NULL)
real constructor
Definition: rwIntSized.h:36
DtRwInt16()
default constructor
Definition: rwIntSized.h:81
DtRwInt that encodes the value as a 16 bit integer.
Definition: rwIntSized.h:77
DtRwInt32()
default constructor
Definition: rwIntSized.h:129
const char DtRwInt16Type[]
Definition: rwTypes.h:27
static const char * theXmlType()
Definition: rwIntSized.h:61
virtual int alignment() const override
Return HLA network alignment. sizeof(int)
Definition: rwIntSized.h:70
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...
virtual const char * xmlType() const override
Routines to archive/dearchive from an XML Environment.
Definition: rwIntSized.h:162
static const char * theXmlType()
The type that is used when archiving to an XML stream.
const char DtXMLInt32Type[]
Definition: rwTypes.h:30
DtRwInt8(const DtSymbolString &name, DtReaderWriterRegistry *const parentRegistry=NULL)
Definition: rwIntSized.h:39
DtRwInt32(const DtRwInt &orig, DtReaderWriterRegistry *const parentRegistry=NULL)
Definition: rwIntSized.h:150
static const char * theXmlType()
Definition: rwIntSized.h:109
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...
virtual int alignment() const override
Return HLA network alignment. sizeof(int)
Definition: rwIntSized.h:118
DtRwInt8(const DtRwInt &orig, DtReaderWriterRegistry *const parentRegistry=NULL)
Definition: rwIntSized.h:54
DtRwInt16(int orig, DtReaderWriterRegistry *const parentRegistry=NULL)
copy constructor
Definition: rwIntSized.h:99
const char DtXMLInt8Type[]
Definition: rwTypes.h:26
const char DtRwInt32Type[]
Definition: rwTypes.h:29
DtRwInt8(int orig, DtReaderWriterRegistry *const parentRegistry=NULL)
copy constructor
Definition: rwIntSized.h:51

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)