MAK Data Logger API Documentation for HLA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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 class DtNetFloat32;
15 
20 {
21 public:
23 
25  DtFloatDatatypeRep(bool useImplicitPadding);
26 
28  virtual ~DtFloatDatatypeRep();
29 
32 
35 
37  virtual const char* datatype() const;
38 
40  virtual float floatVal(const void*) const;
41 
43  virtual DtString stringRep(const void* ptr, int* size = 0) const;
44 
46  virtual double numberRep(const void* ptr, int* size = 0) const;
47 
49  virtual std::vector<char> valueFromStringRep(const DtString& stringRep) const;
50 
52  virtual int byteAlignment() const { return 4; };
53 
54 protected:
55 
57  const DtNetFloat32* netValPtr(const void* ptr, int* size=0) const;
58 
59 };
60 
61 
62 
63 
A type of datatype that can turn itself into a number (double) representation.
Definition: numberDatatypeRep.h:15
virtual std::vector< char > valueFromStringRep(const DtString &stringRep) const =0
The reverse of string rep, given a character string, this returns an unformatted byte stream...
#define DT_DLL_OMTREADER
Definition: omtReader.h:23
virtual int byteAlignment() const
The alignment size in bytes for this representation.
Definition: floatDatatypeRep.h:52
DtDatatypeRep & operator=(const DtDatatypeRep &rhs)
Assignment Operator.
Definition: datatypeRep.h:67
virtual double numberRep(const void *ptr, int *size=0) const =0
virtual const char * datatype() const =0
OMT Datatype of type Float - in network format which means Big Endian representation.
Definition: floatDatatypeRep.h:19
static int defaultFloatPrecision
Definition: floatDatatypeRep.h:22
virtual DtString stringRep(const void *ptr, int *size=0) const =0
Given a byte string, returns a character string in a format that is easily read by a person...

Document ID: Generated on Mon Mar 22 15:30:17 EDT 2021 from SVN revision 226440
Copyright © 2021 MAK Technologies. All Rights Reserved (www.mak.com)