VR-Forces 4.8 Class Documentation
 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) 2017 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
58  {
59  return DtRwInt8Type;
60  }
61 
62  static const char* theXmlType()
63  {
64  return DtXMLInt8Type;
65  }
66 
67  virtual const char* xmlType() const
68  {
69  return theXmlType();
70  }
71 
72 };
73 
76 {
77 public:
79  DtRwInt16() : DtRwInt() {}
80 
82  DtRwInt16(const DtString& name, DtReaderWriterRegistry* const parentRegistry = NULL)
83  : DtRwInt(name, parentRegistry) {}
84 
85  DtRwInt16(const DtSymbolString& name, DtReaderWriterRegistry* const parentRegistry = NULL)
86  : DtRwInt(name, parentRegistry) {}
87 
89  DtRwInt16(const DtString& name, int value, DtReaderWriterRegistry* const parentRegistry = NULL)
90  : DtRwInt(name, value, parentRegistry) {}
91 
93  DtRwInt16(const DtSymbolString& name, int value, DtReaderWriterRegistry* const parentRegistry = NULL)
94  : DtRwInt(name, value, parentRegistry) {}
95 
97  DtRwInt16(int orig, DtReaderWriterRegistry* const parentRegistry = NULL)
98  : DtRwInt(orig, parentRegistry) {}
99 
100  DtRwInt16(const DtRwInt& orig, DtReaderWriterRegistry* const parentRegistry = NULL)
101  : DtRwInt(orig, parentRegistry) {}
102 
103  virtual const char* readerWriterType() const
104  {
105  return DtRwInt16Type;
106  }
107 
108  static const char* theXmlType()
109  {
110  return DtXMLInt16Type;
111  }
112 
113  virtual const char* xmlType() const
114  {
115  return theXmlType();
116  }
117 
118 };
119 
122 {
123 public:
126 
128  DtRwInt32(const DtString& name, DtReaderWriterRegistry* const parentRegistry = NULL)
129  : DtRwInt(name, parentRegistry) {}
130 
131  DtRwInt32(const DtSymbolString& name, DtReaderWriterRegistry* const parentRegistry = NULL)
132  : DtRwInt(name, parentRegistry) {}
133 
135  DtRwInt32(const DtString& name, int value, DtReaderWriterRegistry* const parentRegistry = NULL)
136  : DtRwInt(name, value, parentRegistry) {}
137 
139  DtRwInt32(const DtSymbolString& name, int value, DtReaderWriterRegistry* const parentRegistry = NULL)
140  : DtRwInt(name, value, parentRegistry) {}
141 
143  DtRwInt32(int orig, DtReaderWriterRegistry* const parentRegistry = NULL)
144  : DtRwInt(orig, parentRegistry) {}
145 
146  DtRwInt32(const DtRwInt& orig, DtReaderWriterRegistry* const parentRegistry = NULL)
147  : DtRwInt(orig, parentRegistry) {}
148 
149  virtual const char* readerWriterType() const
150  {
151  return DtRwInt32Type;
152  }
153 
154  static const char* theXmlType()
155  {
156  return DtXMLInt32Type;
157  }
158 
159  virtual const char* xmlType() const
160  {
161  return theXmlType();
162  }
163 
164 };
165 
166 namespace DtBufferSerialize
167 {
169  DT_DLL_readerWriter int getSize(const DtRwInt8& val);
170  DT_DLL_readerWriter int getSize(const DtRwInt16& val);
171  DT_DLL_readerWriter int getSize(const DtRwInt32& val);
172 
179  DT_DLL_readerWriter char *encode(const DtRwInt8& val, char *buffer);
180  DT_DLL_readerWriter char *encode(const DtRwInt16& val, char *buffer);
181  DT_DLL_readerWriter char *encode(const DtRwInt32& val, char *buffer);
182 
189  DT_DLL_readerWriter const char *decode(DtRwInt8 &val, const char *buffer);
190  DT_DLL_readerWriter const char *decode(DtRwInt16 &val, const char *buffer);
191  DT_DLL_readerWriter const char *decode(DtRwInt32 &val, const char *buffer);
192 }
193 
194 
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:131
DtRwInt that encodes the value as a 32 bit integer.
Definition: rwIntSized.h:121
virtual const char * readerWriterType() const
Used to supply a string type that this reader writer type is.
Definition: rwIntSized.h:57
Definition: symbolString.h:20
virtual const char * xmlType() const
Definition: rwIntSized.h:67
DtRwInt16(const DtRwInt &orig, DtReaderWriterRegistry *const parentRegistry=NULL)
Definition: rwIntSized.h:100
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:85
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:154
DtRwInt16(const DtString &name, DtReaderWriterRegistry *const parentRegistry=NULL)
real constructor
Definition: rwIntSized.h:82
DtRwInt32(const DtString &name, int value, DtReaderWriterRegistry *const parentRegistry=NULL)
real constructor from an int
Definition: rwIntSized.h:135
DtRwInt32(const DtSymbolString &name, int value, DtReaderWriterRegistry *const parentRegistry=NULL)
real constructor from an int
Definition: rwIntSized.h:139
virtual const char * xmlType() const
Definition: rwIntSized.h:159
Definition: readerWriterRegistry.h:39
DtRwInt32(const DtString &name, DtReaderWriterRegistry *const parentRegistry=NULL)
real constructor
Definition: rwIntSized.h:128
DtRwInt16(const DtSymbolString &name, int value, DtReaderWriterRegistry *const parentRegistry=NULL)
real constructor from an int
Definition: rwIntSized.h:93
DtRwInt8(const DtString &name, int value, DtReaderWriterRegistry *const parentRegistry=NULL)
real constructor from an int
Definition: rwIntSized.h:43
Description: Readable, Writable int.
Definition: rwInt.h:25
DtRwInt16(const DtString &name, int value, DtReaderWriterRegistry *const parentRegistry=NULL)
real constructor from an int
Definition: rwIntSized.h:89
DtRwInt32(int orig, DtReaderWriterRegistry *const parentRegistry=NULL)
copy constructor
Definition: rwIntSized.h:143
DtRwInt8(const DtString &name, DtReaderWriterRegistry *const parentRegistry=NULL)
real constructor
Definition: rwIntSized.h:36
DtRwInt16()
default constructor
Definition: rwIntSized.h:79
DtRwInt that encodes the value as a 16 bit integer.
Definition: rwIntSized.h:75
DtRwInt32()
default constructor
Definition: rwIntSized.h:125
const char DtRwInt16Type[]
Definition: rwTypes.h:27
static const char * theXmlType()
Definition: rwIntSized.h:62
DT_DLL_readerWriter char * encode(const DtFilename &val, char *buffer)
Serializes the provided value val into buffer.
virtual const char * xmlType() const
Definition: rwIntSized.h:113
static const char * theXmlType()
The type that is used when archiving to an XML stream.
const char DtXMLInt32Type[]
Definition: rwTypes.h:30
virtual const char * readerWriterType() const
Used to supply a string type that this reader writer type is.
Definition: rwIntSized.h:149
DtRwInt8(const DtSymbolString &name, DtReaderWriterRegistry *const parentRegistry=NULL)
Definition: rwIntSized.h:39
DtRwInt32(const DtRwInt &orig, DtReaderWriterRegistry *const parentRegistry=NULL)
Definition: rwIntSized.h:146
static const char * theXmlType()
Definition: rwIntSized.h:108
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 const char * readerWriterType() const
Used to supply a string type that this reader writer type is.
Definition: rwIntSized.h:103
DtRwInt8(const DtRwInt &orig, DtReaderWriterRegistry *const parentRegistry=NULL)
Definition: rwIntSized.h:54
DtRwInt16(int orig, DtReaderWriterRegistry *const parentRegistry=NULL)
copy constructor
Definition: rwIntSized.h:97
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 Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)