MAK RTIspy API Documentation for HLA 1.3
objIntStatsXmlBlock.h
Go to the documentation of this file.
00001 /*********************************************************************
00002  ** Copyright (c) 2006 MaK Technologies, Inc.
00003  ** All rights reserved.
00004  *********************************************************************/
00005 /*******************************************************************************
00006  ** $RCSfile: objIntStatsXmlBlock.h,v $ $Revision: 1.11 $ $State: Exp $
00007  *******************************************************************************/
00008 #ifndef DtObjIntStatsXmlBlock_H_
00009 #define DtObjIntStatsXmlBlock_H_
00010 
00011 #include <rtiMsConfig.h>
00012 #include "spyXmlBlock.h"
00013 #include <mtl/env.h>
00014 
00015 #include <vlutil/vlTime.h>
00016 #include <vlutil/vlString.h>
00017 #include <vlutil/vlSmartPointers.h>
00018 
00019 // Define the XML tags used by this block
00020 DtDECLARE_SPY_XML_TAG( DtObjIntStatsXmlTag );
00021 DtDECLARE_SPY_XML_TAG( DtObjIntStatsIsObjectXmlTag );
00022 DtDECLARE_SPY_XML_TAG( DtObjIntStatsFomHandleXmlTag );
00023 DtDECLARE_SPY_XML_TAG( DtObjIntStatsInstanceHandleXmlTag );
00024 DtDECLARE_SPY_XML_TAG( DtObjIntStatsRegisteredNotDiscoveredXmlTag );
00025 DtDECLARE_SPY_XML_TAG( DtObjIntStatsUpdatesReceivedXmlTag );
00026 DtDECLARE_SPY_XML_TAG( DtObjIntStatsBytesReceivedXmlTag );
00027 DtDECLARE_SPY_XML_TAG( DtObjIntStatsUpdatesSentXmlTag );
00028 DtDECLARE_SPY_XML_TAG( DtObjIntStatsBytesSentXmlTag );
00029 DtDECLARE_SPY_XML_TAG( DtObjIntStatsIsDeletedXmlTag );
00030 DtDECLARE_SPY_XML_TAG( DtObjIntStatsIsRemovedXmlTag );
00031                       
00032 class DtObjIntStatsXmlBlock;
00033 typedef DtBoost::shared_ptr<DtObjIntStatsXmlBlock> DtObjIntStatsXmlBlockSP;
00034 typedef DtBoost::weak_ptr<DtObjIntStatsXmlBlock>   DtObjIntStatsXmlBlockWP;
00035 
00036 // The DtObjIntStatsXmlBlock holds the list of active federations
00037 // NOTE: for interactions the instance handle is 0 and the instance name
00038 //       is the handle converted to string
00039 class DT_DLL_WWW DtObjIntStatsXmlBlock : public DtSpyXmlBlock
00040 {
00041 public:
00042 
00043    // Creator method
00044    static DtSpyXmlBlockSP create( DtNodeAndParentPair xmlNodeAndParent );
00045 
00046 public:
00047    
00048    // Ctor to build from XML data
00049    DtObjIntStatsXmlBlock( DtEnvValueSP existingNode, DtEnvValueSP root );
00050 
00051    // Ctor to build from C++ data
00052    DtObjIntStatsXmlBlock( bool isObjNotInter, unsigned int objectHandle,
00053                           unsigned int classHandle, bool isRegistered, DtEnvValueSP root );
00054    virtual ~DtObjIntStatsXmlBlock();
00055 
00056    // Reset data to initial state
00057    virtual void reset();
00058 
00059    // Register sent and received updates or interactions
00060    virtual void received( unsigned int size );
00061    virtual void sent( unsigned int size );
00062 
00063    // Register that the object has been deleted
00064    virtual void deleted();
00065 
00066    // Register that the object has been removed
00067    virtual void removed();
00068 
00069    // Accessors
00070    inline bool isObject() const;
00071    inline unsigned int instanceHandle() const;
00072    inline unsigned int classHandle() const;
00073    inline bool isRegistered() const;
00074    inline unsigned int updatesReceived() const;
00075    inline unsigned int bytesReceived() const;
00076    inline unsigned int updatesSent() const;
00077    inline unsigned int bytesSent() const;
00078    inline bool isDeleted() const;
00079    inline bool isRemoved() const;
00080    
00081 protected:
00082 
00083    DtSpyXmlBlockElement< bool, true > myIsObject;
00084    DtSpyXmlBlockElement< unsigned int, true > myInstanceHandle;
00085    DtSpyXmlBlockElement< bool, true > myRegisteredNotDiscovered;
00086    DtSpyXmlBlockElement< unsigned int, true > myUpdatesReceived;
00087    DtSpyXmlBlockElement< unsigned int, true > myBytesReceived;
00088    DtSpyXmlBlockElement< unsigned int, true > myUpdatesSent;
00089    DtSpyXmlBlockElement< unsigned int, true > myBytesSent;
00090    DtSpyXmlBlockElement< unsigned int, true > myFomHandle;
00091    DtSpyXmlBlockElement< bool, true > myDeleted;
00092    DtSpyXmlBlockElement< bool, true > myRemoved;
00093 };
00094 
00095 
00096 inline bool DtObjIntStatsXmlBlock::isObject() const
00097 {
00098    return myIsObject;
00099 }
00100 
00101 inline unsigned int DtObjIntStatsXmlBlock::instanceHandle() const
00102 {
00103    return myInstanceHandle;
00104 }
00105 
00106 inline unsigned int DtObjIntStatsXmlBlock::classHandle() const
00107 {
00108    return myFomHandle;
00109 }
00110 
00111 inline bool DtObjIntStatsXmlBlock::isRegistered() const
00112 {
00113    return myRegisteredNotDiscovered;
00114 }
00115 
00116 inline unsigned int DtObjIntStatsXmlBlock::updatesReceived() const
00117 {
00118    return myUpdatesReceived;
00119 }
00120 
00121 inline unsigned int DtObjIntStatsXmlBlock::bytesReceived() const
00122 {
00123    return myBytesReceived;
00124 }
00125 
00126 inline unsigned int DtObjIntStatsXmlBlock::updatesSent() const
00127 {
00128    return myUpdatesSent;
00129 }
00130 
00131 inline unsigned int DtObjIntStatsXmlBlock::bytesSent() const
00132 {
00133    return myBytesSent;
00134 }
00135 
00136 inline bool DtObjIntStatsXmlBlock::isDeleted() const
00137 {
00138    return myDeleted;
00139 }
00140 
00141 inline bool DtObjIntStatsXmlBlock::isRemoved() const
00142 {
00143    return myRemoved;
00144 }
00145 
00146 #endif // DtObjIntStatsXmlBlock_H_
00147 

Document ID: Generated on Thu Jun 14 14:15:04 EDT 2012 from SVN revision 116116
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)