VR-Link API Documentation for HLA 1516
tGridDataInterface.h
Go to the documentation of this file.
00001 //********************************************************************
00004 //********************************************************************
00005 //********************************************************************
00007 //********************************************************************
00008 
00009 #ifndef tGridDataInterface_H_
00010 #define tGridDataInterface_H_
00011 
00012 #if DtTENA
00013 
00014 #include "makLromMapExport.h"
00015 #include <vlutil/vlMachineTypes.h>
00016 #include <vl/tObjectInterface.h>
00017 #include <vl/gridDataSR.h>
00018 #include <vl/globalObjDes.h>
00019 
00020 #include <MAK/GriddedData/ServantPtr.h>
00021 #include <MAK/GriddedData/ProxyPtr.h>
00022 #include <MAK/GriddedData/ImmutablePublicationStatePtr.h>
00023 #include <MAK/GriddedData/SubscriptionInfoPtr.h>
00024 #include <TENA/GeocentricSpatialReferenceFrame/Pointer.h>
00025 
00026 #include <map>
00027 #include <list>
00028 
00032 
00034 //
00041 class DT_DLL_MAKLROM DtGriddedDataInterface: public DtObjectInterface
00042 {
00043 protected:
00046    class DtGriddedDataServantObject : public DtTenaServantObject
00047    {
00048    public:
00050       DtGriddedDataServantObject( MAK::GriddedData::ServantPtr sp):myServantPtr(sp){}
00051 
00053       virtual ~DtGriddedDataServantObject() {}
00054 
00056       virtual const MAK::GriddedData::ServantPtr servant() const { return myServantPtr;}
00057 
00059       virtual MAK::GriddedData::ServantPtr servant() { return myServantPtr;}
00060 
00061    protected:
00062        MAK::GriddedData::ServantPtr myServantPtr;
00063    };
00064 
00065 public:
00067    DtGriddedDataInterface(DtExerciseConn* exConn);
00068 
00070    virtual ~DtGriddedDataInterface();
00071 
00072 private:
00074    DtGriddedDataInterface(const DtGriddedDataInterface &other);
00075 
00077    DtGriddedDataInterface& operator=(const DtGriddedDataInterface &other);
00078 
00079 public:
00082    virtual DtTenaServantObject* createServantObject(DtExerciseConn* exConn);
00083 
00085    virtual void processServantCleanup(DtTenaServantObject* servantObject);
00086 
00088    virtual void subscribe();
00089 
00091    virtual bool needUpdate(const DtStateRepository& stateRep, 
00092                            const DtStateRepository& asSeenByRemote,
00093                            bool useThresholding = true);
00094 
00096    virtual void decode(const DtTenaServantObject* servant,
00097                        DtStateRepository* stateRep)const;
00098 
00100    virtual void encode(DtTenaServantObject* servant, 
00101                        const DtStateRepository* stateRep,
00102                        TENA::Time::Pointer timeForStamping,
00103                        bool forceUpdate = false);
00104 
00106    virtual DtReflectedObject *createReflectedObject()const;
00107 
00109    virtual void processAddition(MAK::GriddedData::ProxyPtr const &proxy);
00110 
00112    virtual void processUpdate(MAK::GriddedData::ProxyPtr const &proxy);
00113 
00115    virtual void processRemoval(MAK::GriddedData::ProxyPtr const &proxy);
00116 
00117 
00118 protected:
00120    virtual void decode(const MAK::GriddedData::ImmutablePublicationStatePtr pubStatePtr,
00121                        DtStateRepository* stateRep)const;
00122 
00124    virtual bool needGridAxisInfo(const DtGriddedDataRepository& stateRep,
00125       const DtGriddedDataRepository& asSeenByRemote, int index) const;
00126 
00128    virtual bool needGridDataInfo(const DtGriddedDataRepository& stateRep,
00129       const DtGriddedDataRepository& asSeenByRemote, int index) const;
00130 protected:
00131 
00133    MAK::GriddedData::SubscriptionInfoPtr mySubscriptionInfoPtr;
00134    typedef std::map<MAK::GriddedData::ProxyPtr, DtReflectedObject *> ProxyToRefObjMap;
00135    ProxyToRefObjMap myRefGriddedDataMap;
00136    ProxyToRefObjMap myGriddedDataWaitList;
00137    TENA::GeocentricSpatialReferenceFrame::Pointer myGeocSrf;
00138 };
00139 
00140 
00141 #endif
00142 #endif
00143 
00144 
00145 

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)