MAK Data Logger API Documentation for HLA
hlaTimeStampedAttr.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #if DtHLA
10 #ifndef hlaTimeStampedAttr_H_
11 #define hlaTimeStampedAttr_H_
12 
13 #include "lgrSim.h"
14 
15 #include "absoluteTime.h"
16 
17 #include <vl/rtiNamespace.h>
18 #include <cstring>
19 
20 namespace MAKLogger
21 {
23 
24  typedef DtU32 DtLgrHlaHandle;
25 
29  {
30 
31  public:
32 
35  DtLgrHlaHandle handle,int size,const void* value) :
36  myTime(time),
37  myHandle(handle),
38  mySize(0),
39  myValue(0)
40  {
41  setValue(size,value);
42  }
43 
45  {
46  delete[] myValue;
47  }
48 
49  inline DtAbsoluteTime time() const
50  {
51  return myTime;
52  }
53 
54  inline DtLgrHlaHandle handle() const
55  {
56  return myHandle;
57  }
58 
59  inline int size() const
60  {
61  return mySize;
62  }
63 
64  inline const void* value() const
65  {
66  return myValue;
67  }
68 
69  inline void setValue(int sz,const void* val)
70  {
71  if(sz != mySize)
72  {
73  delete[] myValue;
74  mySize = sz;
75  myValue = new char[mySize];
76  }
77  memcpy(myValue,val,sz);
78  }
79 
80  private:
85 
86  protected:
87 
90  int mySize;
91  char* myValue;
92  };
93 }
94 
95 #endif
96 #endif

Document ID: Generated on Mon Jan 19 08:20:14 EST 2015 from SVN revision 149581
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)