VR-Forces 5.0.3 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) 2017 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
55  {
56  return DtRwReal32Type;
57  }
58 
59  static const char* theXmlType()
60  {
61  return DtXMLReal32Type;
62  }
63 
64  virtual const char* xmlType() const
65  {
66  return theXmlType();
67  }
68 
69  virtual int alignment() const
70  {
71  return 4;
72  }
73 
74 };
75 
76 
79 {
80 public:
83 
85  DtRwReal64(const DtString& name, DtReaderWriterRegistry* const parentRegistry = NULL)
86  : DtRwReal(name, parentRegistry) {}
87 
88  DtRwReal64(const DtSymbolString& name, DtReaderWriterRegistry* const parentRegistry = NULL)
89  : DtRwReal(name, parentRegistry) {}
90 
92  DtRwReal64(const DtString& name, DtReal value, DtReaderWriterRegistry* const parentRegistry = NULL)
93  : DtRwReal(name, value, parentRegistry) {}
94 
96  DtRwReal64(const DtSymbolString& name, DtReal value, DtReaderWriterRegistry* const parentRegistry = NULL)
97  : DtRwReal(name, value, parentRegistry) {}
98 
100  DtRwReal64(const DtRwReal& orig, DtReaderWriterRegistry* const parentRegistry = NULL)
101  : DtRwReal(orig, parentRegistry) {}
102 
103  virtual const char* readerWriterType() const
104  {
105  return DtRwReal64Type;
106  }
107 
108  static const char* theXmlType()
109  {
110  return DtXMLReal64Type;
111  }
112 
113  virtual const char* xmlType() const
114  {
115  return theXmlType();
116  }
117 
118  virtual int alignment() const
119  {
120  return 8;
121  }
122 
123 };
124 
125 
126 
127 namespace DtBufferSerialize
128 {
130  DT_DLL_readerWriter int getSize(const DtRwReal32& val);
131  DT_DLL_readerWriter int getSize(const DtRwReal64& val);
132 
139  DT_DLL_readerWriter char *encode(const DtRwReal32& val, char *buffer);
140  DT_DLL_readerWriter char *encode(const DtRwReal64& val, char *buffer);
141 
148  DT_DLL_readerWriter const char *decode(DtRwReal32 &val, const char *buffer);
149  DT_DLL_readerWriter const char *decode(DtRwReal64 &val, const char *buffer);
150 }
151 
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:85
#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:59
virtual const char * xmlType() const
Routines to archive/dearchive from an XML Environment.
Definition: rwRealSized.h:64
Definition: symbolString.h:20
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
static const char * theXmlType()
Definition: rwRealSized.h:108
DtRwReal64()
default constructor
Definition: rwRealSized.h:82
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:92
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:78
DtRwReal32(const DtString &name, DtReaderWriterRegistry *const parentRegistry=NULL)
real constructor
Definition: rwRealSized.h:36
virtual int alignment() const
Return HLA network alignment. sizeof(double)
Definition: rwRealSized.h:118
DtRwReal32()
default constructor
Definition: rwRealSized.h:33
const char DtRwReal32Type[]
Definition: rwTypes.h:38
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
Return HLA network alignment. sizeof(double)
Definition: rwRealSized.h:69
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
virtual const char * xmlType() const
Routines to archive/dearchive from an XML Environment.
Definition: rwRealSized.h:113
const char DtXMLReal32Type[]
Definition: rwTypes.h:39
DtRwReal64(const DtSymbolString &name, DtReaderWriterRegistry *const parentRegistry=NULL)
Definition: rwRealSized.h:88
virtual const char * readerWriterType() const
Used to supply a string type that this reader writer type is. This can be used in place of dynamic-ca...
Definition: rwRealSized.h:103
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:96
DtRwReal64(const DtRwReal &orig, DtReaderWriterRegistry *const parentRegistry=NULL)
copy constructor
Definition: rwRealSized.h:100
virtual const char * readerWriterType() const
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
const char DtXMLReal64Type[]
Definition: rwTypes.h:41
DtRwReal32(const DtSymbolString &name, DtReaderWriterRegistry *const parentRegistry=NULL)
Definition: rwRealSized.h:39

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)