VR-Link API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
floatDatatypeRep.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *******************************************************************************/
7 #pragma once
8 
9 
10 
11 #include "numberDatatypeRep.h"
12 
13 #include <vlutil/vlString.h>
14 #ifdef DtUSE_UTILITIES_NAMESPACE
15 namespace DtUSE_UTILITIES_NAMESPACE
16 {
17 #endif
18 class DtNetFloat32;
19 
24 {
25 public:
27 
29  DtFloatDatatypeRep(bool useImplicitPadding);
30 
32  virtual ~DtFloatDatatypeRep();
33 
36 
38  DtFloatDatatypeRep& operator=(const DtFloatDatatypeRep& rhs);
39 
41  virtual const char* datatype() const;
42 
44  virtual float floatVal(const void*) const;
45 
47  virtual DtString stringRep(const void* ptr, int* size = 0) const;
48 
50  virtual double numberRep(const void* ptr, int* size = 0) const;
51 
53  virtual std::vector<char> valueFromStringRep(const DtString& stringRep) const;
54 
56  virtual int byteAlignment() const { return 4; };
57 
58 protected:
59 
61  const DtNetFloat32* netValPtr(const void* ptr, int* size=0) const;
62 
63 };
64 
65 
66 #ifdef DtUSE_UTILITIES_NAMESPACE
67 } // end of namespace DtUSE_UTILITIES_NAMESPACE
68 #endif
A type of datatype that can turn itself into a number (double) representation.
Definition: numberDatatypeRep.h:19
Contains the DtString class declaration.
#define DT_DLL_OMTREADER
Definition: omtReader.h:27
virtual int byteAlignment() const
The alignment size in bytes for this representation.
Definition: floatDatatypeRep.h:56
OMT Datatype of type Float - in network format which means Big Endian representation.
Definition: floatDatatypeRep.h:23
Network-order 32-bit IEEE-754 floating-point quantity.
Definition: vlNetTypes.h:147
Instances of DtString are used to represent strings.
Definition: vlString.h:29
static int defaultFloatPrecision
Definition: floatDatatypeRep.h:26

Document ID: Generated on Tue Aug 10 00:12:31 EDT 2021 from SVN revision 232765
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)