VR-Link API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
enum16DatatypeRep.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1992-2025 MAK Technologies, Inc
3 ** All rights reserved.
4 *******************************************************************************/
7 #pragma once
8 
9 
10 
11 #include "enumDatatypeRep.h"
12 #include <vlutil/vlString.h>
13 #ifdef DtUSE_UTILITIES_NAMESPACE
14 namespace DtUSE_UTILITIES_NAMESPACE
15 {
16 #endif
17 class DtNetU16;
18 
19 // Data representation type for 16 bit enumerations
21 {
22 public:
23 
25  DtEnum16DatatypeRep(bool useImplicitPadding);
26 
28  virtual ~DtEnum16DatatypeRep();
29 
32 
34  DtEnum16DatatypeRep& operator=(const DtEnum16DatatypeRep& rhs);
35 
37  virtual const char* datatype() const;
38 
40  virtual unsigned int enumVal(const void*, int* size = 0) 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 int sizeNeeded(const void* ptr) const;
50 
52  virtual std::vector<char> valueFromStringRep(const DtString& stringRep) const;
53 
55  virtual int byteAlignment() const { return 2; };
56 
57 protected:
58 
60  const DtNetU16* netValPtr(const void* ptr, int* size=0) const;
61 
62 };
63 
64 #ifdef DtUSE_UTILITIES_NAMESPACE
65 } // end of namespace DtUSE_UTILITIES_NAMESPACE
66 #endif
Definition: enum16DatatypeRep.h:20
Contains the DtString class declaration.
Network-order unsigned 16-bit quantity.
Definition: vlNetTypes.h:52
#define DT_DLL_OMTREADER
Definition: omtReader.h:27
virtual int byteAlignment() const
The alignment size in bytes for this representation.
Definition: enum16DatatypeRep.h:55
Instances of DtString are used to represent strings.
Definition: vlString.h:36
Definition: enumDatatypeRep.h:21

Document ID: Generated on Thu Oct 16 00:12:25 EDT 2025 from SVN revision 280738
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)