MAK RTIspy API Documentation for HLA Evolved
Home
Modules
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
HLA1516E
RTI
encoding
DataElement.h
Go to the documentation of this file.
1
/***********************************************************************
2
The IEEE hereby grants a general, royalty-free license to copy, distribute,
3
display and make derivative works from this material, for all purposes,
4
provided that any use of the material contains the following
5
attribution: "Reprinted with permission from IEEE 1516.1(TM)-2010".
6
Should you require additional information, contact the Manager, Standards
7
Intellectual Property, IEEE Standards Association (stds-ipr@ieee.org).
8
***********************************************************************/
9
/***********************************************************************
10
IEEE 1516.1 High Level Architecture Interface Specification C++ API
11
File: DataElement.h
12
***********************************************************************/
13
#ifndef RTI_DataElement_h_
14
#define RTI_DataElement_h_
15
16
#include <
RTI/SpecificConfig.h
>
17
#include <
RTI/encoding/EncodingConfig.h
>
18
#include <
RTI/encoding/EncodingExceptions.h
>
19
#include <memory>
20
21
22
namespace
rti1516e
23
{
24
// Forward Declarations
25
class
VariableLengthData;
26
27
// Interface provided by all HLA data elements.
28
class
RTI_EXPORT
DataElement
29
{
30
public
:
31
32
// Destructor
33
virtual
~
DataElement
() = 0;
34
35
// Return a new copy of the DataElement
36
virtual
std::auto_ptr<DataElement> clone ()
const
= 0;
37
38
// Encode this element into a new VariableLengthData
39
virtual
VariableLengthData
encode ()
const
40
throw
(
EncoderException
) = 0;
41
42
// Encode this element into an existing VariableLengthData
43
virtual
void
encode (
44
VariableLengthData
& inData)
const
45
throw
(
EncoderException
) = 0;
46
47
// Encode this element and append it to a buffer
48
virtual
void
encodeInto (
49
std::vector<Octet>& buffer)
const
50
throw
(
EncoderException
) = 0;
51
52
// Decode this element from the RTI's VariableLengthData.
53
virtual
void
decode (
54
VariableLengthData
const
& inData)
55
throw
(
EncoderException
) = 0;
56
57
// Decode this element starting at the index in the provided buffer
58
virtual
size_t
decodeFrom (
59
std::vector<Octet>
const
& buffer,
60
size_t
index)
61
throw
(
EncoderException
) = 0;
62
63
// Return the size in bytes of this element's encoding.
64
virtual
size_t
getEncodedLength ()
const
65
throw
(
EncoderException
) = 0;
66
67
// Return the octet boundary of this element.
68
virtual
unsigned
int
getOctetBoundary ()
const
= 0;
69
70
// Return true if given element is same type as this; otherwise, false.
71
virtual
bool
isSameTypeAs(
72
DataElement
const
& inData )
const
;
73
74
// Return a hash of the encoded data
75
// Provides mechanism to map DataElement discriminants to variants
76
// in VariantRecord.
77
virtual
Integer64
hash()
const
;
78
79
};
80
}
81
82
#endif // RTI_DataElement_h_
83
Document ID: Generated on Fri Sep 27 00:57:56 EDT 2019 from SVN revision 201708
Copyright © 2005-2018 VT MÄK Inc. All Rights Reserved (
www.mak.com
)