VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rwRealSized.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/rwReal.h>
21 #include <readerWriter/rwTypes.h>
22 
24 
26 
27 
30 {
31 public:
34 
36  DtRwReal32(const DtString& name, DtReaderWriterRegistry* const parentRegistry = NULL)
37  : DtRwReal(name, parentRegistry) {}
38 
39  DtRwReal32(const DtSymbolString& name, DtReaderWriterRegistry* const parentRegistry = NULL)
40  : DtRwReal(name, parentRegistry) {}
41 
43  DtRwReal32(const DtString& name, DtReal value, DtReaderWriterRegistry* const parentRegistry = NULL)
44  : DtRwReal(name, value, parentRegistry) {}
45 
47  DtRwReal32(const DtSymbolString& name, DtReal value, DtReaderWriterRegistry* const parentRegistry = NULL)
48  : DtRwReal(name, value, parentRegistry) {}
49 
51  DtRwReal32(const DtRwReal& orig, DtReaderWriterRegistry* const parentRegistry = NULL)
52  : DtRwReal(orig, parentRegistry) {}
53 
54  virtual const char *readerWriterType() const override {
55  return DtRwReal32Type;
56  }
57 
58  static const char* theXmlType()
59  {
60  return DtXMLReal32Type;
61  }
62 
63  virtual const char *xmlType() const override {
64  return theXmlType();
65  }
66 
67  virtual int alignment() const override {
68  return 4;
69  }
70 
71 };
72 
73 
76 {
77 public:
80 
82  DtRwReal64(const DtString& name, DtReaderWriterRegistry* const parentRegistry = NULL)
83  : DtRwReal(name, parentRegistry) {}
84 
85  DtRwReal64(const DtSymbolString& name, DtReaderWriterRegistry* const parentRegistry = NULL)
86  : DtRwReal(name, parentRegistry) {}
87 
89  DtRwReal64(const DtString& name, DtReal value, DtReaderWriterRegistry* const parentRegistry = NULL)
90  : DtRwReal(name, value, parentRegistry) {}
91 
93  DtRwReal64(const DtSymbolString& name, DtReal value, DtReaderWriterRegistry* const parentRegistry = NULL)
94  : DtRwReal(name, value, parentRegistry) {}
95 
97  DtRwReal64(const DtRwReal& orig, DtReaderWriterRegistry* const parentRegistry = NULL)
98  : DtRwReal(orig, parentRegistry) {}
99 
100  virtual const char *readerWriterType() const override {
101  return DtRwReal64Type;
102  }
103 
104  static const char* theXmlType()
105  {
106  return DtXMLReal64Type;
107  }
108 
109  virtual const char *xmlType() const override {
110  return theXmlType();
111  }
112 
113  virtual int alignment() const override {
114  return 8;
115  }
116 
117 };
118 
119 
120 
121 namespace DtBufferSerialize
122 {
124  DT_DLL_readerWriter int getSize(const DtRwReal32& val);
125  DT_DLL_readerWriter int getSize(const DtRwReal64& val);
126 
133  DT_DLL_readerWriter char *encode(const DtRwReal32& val, char *buffer);
134  DT_DLL_readerWriter char *encode(const DtRwReal64& val, char *buffer);
135 
142  DT_DLL_readerWriter const char *decode(DtRwReal32 &val, const char *buffer);
143  DT_DLL_readerWriter const char *decode(DtRwReal64 &val, const char *buffer);
144 }
145 
static const char * theXmlType()
The type that is used when archiving to an XML stream.
DT_DLL_readerWriter int getSize(const DtString &val)
The number of bytes required to encode the value.
DtRwReal64(const DtString &name, DtReaderWriterRegistry *const parentRegistry=NULL)
real constructor
Definition: rwRealSized.h:82
#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
static const char * theXmlType()
Definition: rwRealSized.h:58
This class allows one to collect and compare strings using an index number instead of having to do st...
Definition: symbolString.h:27
DtRwReal32(const DtSymbolString &name, DtReal value, DtReaderWriterRegistry *const parentRegistry=NULL)
real constructor from an int
Definition: rwRealSized.h:47
const char DtRwReal64Type[]
Definition: rwTypes.h:40
DtRwReal32(const DtRwReal &orig, DtReaderWriterRegistry *const parentRegistry=NULL)
copy constructor
Definition: rwRealSized.h:51
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: rwRealSized.h:100
static const char * theXmlType()
Definition: rwRealSized.h:104
DtRwReal64()
default constructor
Definition: rwRealSized.h:79
DtRwReal32(const DtString &name, DtReal value, DtReaderWriterRegistry *const parentRegistry=NULL)
real constructor from an int
Definition: rwRealSized.h:43
DtRwReal64(const DtString &name, DtReal value, DtReaderWriterRegistry *const parentRegistry=NULL)
real constructor from an int
Definition: rwRealSized.h:89
Definition: readerWriterRegistry.h:39
DtRwReal that encodes the value as a 32 bit float.
Definition: rwRealSized.h:29
DtRwReal that encodes the value as a 64 bit float.
Definition: rwRealSized.h:75
DtRwReal32(const DtString &name, DtReaderWriterRegistry *const parentRegistry=NULL)
real constructor
Definition: rwRealSized.h:36
DtRwReal32()
default constructor
Definition: rwRealSized.h:33
const char DtRwReal32Type[]
Definition: rwTypes.h:38
virtual const char * xmlType() const override
Routines to archive/dearchive from an XML Environment.
Definition: rwRealSized.h:63
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 int alignment() const override
Return HLA network alignment. sizeof(double)
Definition: rwRealSized.h:67
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
const char DtXMLReal32Type[]
Definition: rwTypes.h:39
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: rwRealSized.h:54
virtual const char * xmlType() const override
Routines to archive/dearchive from an XML Environment.
Definition: rwRealSized.h:109
DtRwReal64(const DtSymbolString &name, DtReaderWriterRegistry *const parentRegistry=NULL)
Definition: rwRealSized.h:85
virtual int alignment() const override
Return HLA network alignment. sizeof(double)
Definition: rwRealSized.h:113
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...
DtRwReal64(const DtSymbolString &name, DtReal value, DtReaderWriterRegistry *const parentRegistry=NULL)
real constructor from an int
Definition: rwRealSized.h:93
DtRwReal64(const DtRwReal &orig, DtReaderWriterRegistry *const parentRegistry=NULL)
copy constructor
Definition: rwRealSized.h:97
const char DtXMLReal64Type[]
Definition: rwTypes.h:41
DtRwReal32(const DtSymbolString &name, DtReaderWriterRegistry *const parentRegistry=NULL)
Definition: rwRealSized.h:39

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)