MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
intDatatypeRep.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1992-2024 MAK Technologies, Inc
3 ** All rights reserved.
4 *******************************************************************************/
7 #pragma once
8 
9 
10 
11 #include "numberDatatypeRep.h"
12 
13 #include <vlutil/vlString.h>
14 class DtNetU32;
18 {
19 public:
20 
22  DtIntDatatypeRep(bool useImplicitPadding, bool unsign = false);
23 
25  virtual ~DtIntDatatypeRep();
26 
29 
32 
34  virtual const char* datatype() const;
35 
37  virtual int intVal(const void*);
38 
40  virtual unsigned unsignedIntVal(const void*) const;
41 
43  virtual DtString stringRep(const void* ptr, int* size = 0) const;
44 
47  virtual double numberRep(const void* ptr, int* size = 0) const;
48 
50  virtual int sizeNeeded(const void* ptr) const;
51 
53  virtual void setUnsigned(bool);
54 
56  virtual std::vector<char> valueFromStringRep(const DtString& stringRep) const;
57 
59  virtual int byteAlignment() const { return 4; };
60 
61 public:
62 
67  static int intValFromBuffer(const void*);
68 
69 protected:
70 
72  const DtNetU32* netValPtr(const void* ptr, int* size=0) const;
73 
74 protected:
76 };
77 
78 
79 
80 
A type of datatype that can turn itself into a number (double) representation.
Definition: numberDatatypeRep.h:17
OMT Datatype of type Integer - in network format which means Big Endian representation.
Definition: intDatatypeRep.h:17
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: intDatatypeRep.h:59
DtDatatypeRep & operator=(const DtDatatypeRep &rhs)
Assignment Operator.
Definition: datatypeRep.h:67
virtual double numberRep(const void *ptr, int *size=nullptr) const =0
virtual const char * datatype() const =0
bool myIsUnsigned
Definition: intDatatypeRep.h:75
virtual int sizeNeeded(const void *ptr) const =0
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 Thu Oct 3 15:35:11 EDT 2024 from SVN revision 270037
Copyright © 2024 MAK Technologies. All Rights Reserved (www.mak.com)