MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
aHandValSet.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1998 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: aHandValSet.h,v $ $Revision: 1.17 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #pragma once
13 
14 #include "aHandValBase.h"
15 #include "rtiMsConfig.h"
16 #include <memory>
17 #include <vector>
18 #if defined(DtIFSPEC1516) || defined(DtIFSPEC1516E)
19 #include "RTI/RTI1516.h"
20 #else
21 #ifdef DtIFSPEC13DLC
22 #include "RTI13.h"
23 #else
24 #include "RTI.hh"
25 #endif
26 #endif
27 #include "internalTypes.h"
28 
29 class DtObjectClassInfo;
30 
31 #if defined( DtIFSPEC1516 ) || defined ( DtIFSPEC1516E )
32 
33 class DT_DLL_LRC DtAhvps : public DtAhvpBase
34 {
35 public:
36 
38  DtAhvps(RTI_IFSPEC::AttributeHandleValueMap* ahvpm_i);
39 
41  virtual ~DtAhvps();
42 
43  virtual MAKRti::DtU32 size() const;
44 
45  virtual DtHandle getHandle(MAKRti::DtU32 i) const;
46 
47  virtual MAKRti::DtU32 getValueLength(MAKRti::DtU32 i) const;
48 
49  virtual void getValue(MAKRti::DtU32 i, char *buff,
50  MAKRti::DtU32& valueLength) const;
51 
52  virtual char *getValuePointer(MAKRti::DtU32 i,
53  MAKRti::DtU32& valueLength) const;
54 
55  virtual void print(DtObjectClassInfo* fomClass) const;
56 
57  virtual void add(DtAttributeHandle h, const char *buff,
58  MAKRti::DtU32 valueLength);
59 
60  virtual void addPointer(DtAttributeHandle h, void const* buff,
61  MAKRti::DtU32 valueLength);
62 
63  virtual void remove(DtAttributeHandle h);
64 
65  virtual void moveFrom(DtAhvps& ahvp, MAKRti::DtU32 &i);
66 
67  virtual void empty();
68 
69  virtual MAKRti::DtU32 start() const;
70  virtual MAKRti::DtU32 valid(MAKRti::DtU32 i) const;
71  virtual MAKRti::DtU32 next(MAKRti::DtU32 i) const;
72 
73  virtual RTI_IFSPEC::AttributeHandleValueMap::const_iterator
74  getConstIterator(MAKRti::DtU32 i) const;
75  virtual RTI_IFSPEC::AttributeHandleValueMap::iterator
76  getIterator(MAKRti::DtU32 i);
77 
78  virtual void print() const;
79 
80  virtual RTI_IFSPEC::AttributeHandleValueMap* getImplementation() const;
81 
82 private:
84  DtAhvps();
85 
87  void buildAhvpCache() const;
88 
90  void invalidateAhvpCache() const;
91 
93  bool testInvariant() const;
94 
95 protected:
96  typedef std::vector< RTI_IFSPEC::AttributeHandleValueMap::iterator >
97  DtAhvpmIteratorList;
98 
99  RTI_IFSPEC::AttributeHandleValueMap* myAhvpMap;
100 
103  mutable DtAhvpmIteratorList myAhvpByIndexCache;
104  mutable bool myAhvpByIndexCacheIsInvalid;
105 };
106 
107 #else
108 
109 #define DtHvps DtAhvps
110 #define DtAhvpBase DtAhvps
111 #define HandleValuePairSet AttributeHandleValuePairSet
112 #define DtDEFINING_AHVPS 1
113 
114 #include "handleValSet.h"
115 
116 #undef DtHvps
117 #undef HandleValuePairSet
118 #undef DtDEFINING_AHVPS
119 
120 #endif
121 

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)