![]() |
MAK RTIspy API Documentation for HLA 1516
|
00001 /********************************************************************* 00002 ** Copyright (c) 2001 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: regObjAttr.h,v $ $Revision: 1.11 $ $State: Exp $ 00007 *********************************************************************/ 00010 00011 #ifndef DtRegObjAttr_H_ 00012 #define DtRegObjAttr_H_ 00013 00014 #ifdef DDM 00015 00016 #include "attrHandSet.h" 00017 #include "internalTypes.h" 00018 #include <vlutil/vlHashlist.h> 00019 00020 class DtObjectClassInfo; 00021 00022 class DT_DLL_LRC DtRegObjAttr 00023 { 00024 public: 00025 DtRegObjAttr(); 00026 DtRegObjAttr(DtObjectInstanceHandle handleValue, 00027 const char* objName, DtObjectClassInfo* classDesc); 00028 DtRegObjAttr(DtRegObjAttr const & rhs); 00029 00030 virtual ~DtRegObjAttr(); 00031 00032 DtRegObjAttr &operator=(DtRegObjAttr const & rhs); 00033 00035 virtual DtObjectInstanceHandle objectHandle(); 00036 00038 virtual const char* objectName(); 00039 00041 virtual void setClassDesc(DtObjectClassInfo* classDesc); 00042 virtual DtObjectClassInfo* classDesc(); 00043 00045 virtual void add(DtAttributeHandle attrHandle); 00046 virtual void remove(DtAttributeHandle attrHandle); 00047 virtual DtAttributeHandleSet& attributes(); 00048 virtual bool isEmpty(); 00049 00050 protected: 00051 00052 DtObjectInstanceHandle myObjectHandle; 00053 MAKRti::DtString myObjectName; 00054 DtObjectClassInfo* myClass; 00055 DtAttributeHandleSet myAttrs; 00056 }; 00057 00058 inline DtObjectInstanceHandle DtRegObjAttr::objectHandle() 00059 { 00060 return myObjectHandle; 00061 } 00062 00063 inline const char* DtRegObjAttr::objectName() 00064 { 00065 return myObjectName.string(); 00066 } 00067 00068 inline DtObjectClassInfo* DtRegObjAttr::classDesc() 00069 { 00070 return myClass; 00071 } 00072 00073 inline DtAttributeHandleSet& DtRegObjAttr::attributes() 00074 { 00075 return myAttrs; 00076 } 00077 00078 inline void DtRegObjAttr::add(DtAttributeHandle attrHandle) 00079 { 00080 if (!myAttrs.isMember(attrHandle)) 00081 { 00082 myAttrs.add(attrHandle); 00083 } 00084 } 00085 00086 inline void DtRegObjAttr::remove(DtAttributeHandle attrHandle) 00087 { 00088 myAttrs.remove(attrHandle); 00089 } 00090 00091 inline bool DtRegObjAttr::isEmpty() 00092 { 00093 return myAttrs.isEmpty(); 00094 } 00095 00096 #endif 00097 #endif