MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
VariableLengthData.h
Go to the documentation of this file.
1 /***********************************************************************
2  IEEE 1516.1 High Level Architecture Interface Specification C++ API
3  File: RTI/VariableLengthData.h
4 ***********************************************************************/
5 
6 #ifndef RTI_VariableLengthData_h
7 #define RTI_VariableLengthData_h
8 
9 #include <RTI/SpecificConfig.h>
10 
11 // A class to hold an arbitrary array of bytes for encoded values,
12 // attribute values, parameter values, etc. The class provides
13 // several ways of setting data, allowing tradeoffs between
14 // efficiency and memory management reponsibility.
15 
16 namespace rti1516
17 {
18  // Forward declaration for the RTI-internal class
19  // used to implement VariableLengthData
20  class VariableLengthDataImplementation;
21 
23  {
24  public:
26 
27  // Caller is free to delete inData after the call
28  VariableLengthData(void const * inData, unsigned long inSize);
29 
30  // Caller is free to delete rhs after the call
32 
34 
35  // Caller is free to delete rhs after the call
37  operator=(VariableLengthData const & rhs);
38 
39  // This pointer should not be expected to be valid past the
40  // lifetime of this object, or past the next time this object
41  // is given new data
42  void const * data() const;
43  unsigned long size() const;
44 
45  // Caller is free to delete inData after the call
46  void setData(void const * inData, unsigned long inSize);
47 
48  // Caller is responsible for ensuring that the data that is
49  // pointed to is valid for the lifetime of this object, or past
50  // the next time this object is given new data.
51  void setDataPointer(void* inData, unsigned long inSize);
52 
53  // Caller gives up ownership of inData to this object.
54  // This object assumes the responsibility of deleting inData
55  // when it is no longer needed.
56  void takeDataPointer(void* inData, unsigned long inSize);
57 
58  private:
59 
60  // Friend declaration for an RTI-internal class that
61  // can access the implementation of a VariableLengthValue
62  friend class VariableLengthDataFriend;
63 
64  VariableLengthDataImplementation* _impl;
65  };
66 }
67 
68 #endif // RTI_VariableLengthData_h
#define RTI_EXPORT
Definition: SpecificConfig.h:55
VariableLengthDataImplementation * _impl
Definition: VariableLengthData.h:64
This file contains definitions that are used to isolate platform-specific elements of the API...
Definition: VariableLengthData.h:22

Document ID: Generated on Wed Jul 8 16:20:32 EDT 2026 from SVN revision 291616
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)