VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
intDatatypeRep.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1992-2010 MAK Technologies, Inc
3 ** All rights reserved.
4 *******************************************************************************/
7 #pragma once
8 
9 
10 
11 #include "datatypeRep.h"
12 
13 #include <vlutil/vlString.h>
14 #ifdef DtUSE_UTILITIES_NAMESPACE
15 namespace DtUSE_UTILITIES_NAMESPACE
16 {
17 #endif
18 class DtNetU32;
23 {
24 public:
25 
27  DtIntDatatypeRep(bool useImplicitPadding, bool unsign = false);
28 
30  virtual ~DtIntDatatypeRep();
31 
34 
36  DtIntDatatypeRep& operator=(const DtIntDatatypeRep& rhs);
37 
39  virtual const char* datatype() const;
40 
45  virtual int intVal(const void*);
46 
48  virtual unsigned unsignedIntVal(const void*) const;
49 
51  virtual DtString stringRep(const void* ptr, int* size = 0) const;
52 
54  virtual double numberRep(const void* ptr, int* size = 0) const;
55 
56  virtual void setUnsigned(bool);
57 
59  virtual std::vector<char> valueFromStringRep(const DtString& stringRep) const;
60 
62  virtual int byteAlignment() const { return 4; };
63 
64 public:
65 
70  static int intValFromBuffer(const void*);
71 
72 protected:
73 
75  const DtNetU32* netValPtr(const void* ptr, int* size=0) const;
76 
77 protected:
79 };
80 
81 
82 #ifdef DtUSE_UTILITIES_NAMESPACE
83 } // end of namespace DtUSE_UTILITIES_NAMESPACE
84 #endif
OMT Datatype of type Integer - in network format which means Big Endian representation.
Definition: intDatatypeRep.h:22
Contains the DtString class declaration.
Network-order unsigned 32-bit quantity.
Definition: vlNetTypes.h:99
#define DT_DLL_OMTREADER
Definition: omtReader.h:27
A Datatype Representation is a class that can take a group of bytes and display them in a certain typ...
Definition: datatypeRep.h:24
virtual int byteAlignment() const
The alignment size in bytes for this representation.
Definition: intDatatypeRep.h:62
bool myIsUnsigned
Definition: intDatatypeRep.h:78
Instances of DtString are used to represent strings.
Definition: vlString.h:29

Document ID: Generated on Wed Mar 27 02:04:30 EDT 2024 from SVN revision 264570
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)