MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
regObjAttr.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2001 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: regObjAttr.h,v $ $Revision: 1.11 $ $State: Exp $
7 *********************************************************************/
10 
11 #ifndef DtRegObjAttr_H_
12 #define DtRegObjAttr_H_
13 
14 #ifdef DDM
15 
16 #include "attrHandSet.h"
17 #include "internalTypes.h"
18 #include <vlutil/vlHashlist.h>
19 
20 class DtObjectClassInfo;
21 
22 class DT_DLL_LRC DtRegObjAttr
23 {
24 public:
25  DtRegObjAttr();
26  DtRegObjAttr(DtObjectInstanceHandle handleValue,
27  const char* objName, DtObjectClassInfo* classDesc);
28  DtRegObjAttr(DtRegObjAttr const & rhs);
29 
30  virtual ~DtRegObjAttr();
31 
32  DtRegObjAttr &operator=(DtRegObjAttr const & rhs);
33 
35  virtual DtObjectInstanceHandle objectHandle();
36 
38  virtual const char* objectName();
39 
41  virtual void setClassDesc(DtObjectClassInfo* classDesc);
42  virtual DtObjectClassInfo* classDesc();
43 
45  virtual void add(DtAttributeHandle attrHandle);
46  virtual void remove(DtAttributeHandle attrHandle);
47  virtual DtAttributeHandleSet& attributes();
48  virtual bool isEmpty();
49 
50 protected:
51 
52  DtObjectInstanceHandle myObjectHandle;
53  MAKRti::DtString myObjectName;
54  DtObjectClassInfo* myClass;
55  DtAttributeHandleSet myAttrs;
56 };
57 
58 inline DtObjectInstanceHandle DtRegObjAttr::objectHandle()
59 {
60  return myObjectHandle;
61 }
62 
63 inline const char* DtRegObjAttr::objectName()
64 {
65  return myObjectName.string();
66 }
67 
68 inline DtObjectClassInfo* DtRegObjAttr::classDesc()
69 {
70  return myClass;
71 }
72 
73 inline DtAttributeHandleSet& DtRegObjAttr::attributes()
74 {
75  return myAttrs;
76 }
77 
78 inline void DtRegObjAttr::add(DtAttributeHandle attrHandle)
79 {
80  if (!myAttrs.isMember(attrHandle))
81  {
82  myAttrs.add(attrHandle);
83  }
84 }
85 
86 inline void DtRegObjAttr::remove(DtAttributeHandle attrHandle)
87 {
88  myAttrs.remove(attrHandle);
89 }
90 
91 inline bool DtRegObjAttr::isEmpty()
92 {
93  return myAttrs.isEmpty();
94 }
95 
96 #endif
97 #endif

Document ID: Generated on Mon Jul 9 10:30:41 EDT 2018 from SVN revision 190224
Copyright © 2005-2018 VT MÄK Inc. All Rights Reserved (www.mak.com)