![]() |
MAK RTIspy API Documentation for HLA 1516
|
00001 /********************************************************************* 00002 ** Copyright (c) 2006 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: rtiObjectStateXmlBlock.h,v $ $Revision: 1.6 $ $State: Exp $ 00007 *******************************************************************************/ 00008 #ifndef DtRtiObjectStateXmlBlock_H_ 00009 #define DtRtiObjectStateXmlBlock_H_ 00010 00011 #include <rtiMsConfig.h> 00012 #include "spyXmlBlock.h" 00013 #include <mtl/env.h> 00014 #include <vlutil/vlString.h> 00015 #include <vlutil/vlSmartPointers.h> 00016 00017 // Declare the XML tags used by this block 00018 DtDECLARE_SPY_XML_TAG( DtRtiObjectStateXmlTag ); 00019 DtDECLARE_SPY_XML_TAG( DtInstanceHandleXmlTag ); 00020 DtDECLARE_SPY_XML_TAG( DtRegDiscStatusXmlTag ); 00021 00022 class DtRtiObjectStateXmlBlock; 00023 typedef DtBoost::shared_ptr<DtRtiObjectStateXmlBlock> DtRtiObjectStateXmlBlockSP; 00024 typedef DtBoost::weak_ptr<DtRtiObjectStateXmlBlock> DtRtiObjectStateXmlBlockWP; 00025 00026 00027 // The DtRtiObjectStateXmlBlock represents the current state of a single 00028 // registered or discovered object as known at a specific LRC 00029 class DT_DLL_WWW DtRtiObjectStateXmlBlock : public DtSpyXmlBlock 00030 { 00031 public: 00032 static DtSpyXmlBlockSP create( DtNodeAndParentPair xmlNodeAndParent ); 00033 00034 public: 00035 DtRtiObjectStateXmlBlock( DtEnvValueSP existingNode, DtEnvValueSP root ); 00036 DtRtiObjectStateXmlBlock( const DtString& name, unsigned long handle, bool isRegistered, DtEnvValueSP root ); 00037 virtual ~DtRtiObjectStateXmlBlock(); 00038 00039 inline unsigned long handle() const; 00040 inline bool isRegistered() const; 00041 00042 protected: 00043 00044 DtSpyXmlBlockElement< unsigned long > myHandle; 00045 DtSpyXmlBlockElement< bool > myIsRegistered; 00046 00047 }; 00048 00049 unsigned long DtRtiObjectStateXmlBlock::handle() const { return myHandle; } 00050 bool DtRtiObjectStateXmlBlock::isRegistered() const { return myIsRegistered; } 00051 00052 #endif // DtRtiObjectStateXmlBlock_H_ 00053