VR-Link API Documentation for HLA 1516
tAggInterface.h
Go to the documentation of this file.
00001 //********************************************************************
00004 //********************************************************************
00005 //********************************************************************
00007 //********************************************************************
00008 
00009 #ifndef tAggInterface_H_
00010 #define tAggInterface_H_
00011 
00012 #if DtTENA
00013 
00014 #include "makLromMapExport.h"
00015 #include <vlutil/vlMachineTypes.h>
00016 #include <vl/tObjectInterface.h>
00017 #include <vl/aggregateSR.h>
00018 #include <vl/globalObjDes.h>
00019 
00021 #include <MAK/Aggregate/ServantPtr.h>
00022 #include <MAK/Aggregate/ProxyPtr.h>
00023 #include <MAK/Aggregate/ImmutablePublicationStatePtr.h>
00024 #include <MAK/Aggregate/SubscriptionInfoPtr.h>
00025 #include <TENA/GeocentricSpatialReferenceFrame/Pointer.h>
00026 
00027 #include <map>
00028 #include <list>
00029 
00033 
00034 
00036 //
00042 class DT_DLL_MAKLROM DtAggregateInterface: public DtObjectInterface
00043 {
00044 protected:
00045 
00048    class DtAggregateServantObject : public DtTenaServantObject
00049    {
00050    public:
00052       DtAggregateServantObject( MAK::Aggregate::ServantPtr sp):myServantPtr(sp){}
00053 
00055       virtual ~DtAggregateServantObject() {}
00056 
00058       virtual const MAK::Aggregate::ServantPtr servant() const { return myServantPtr;}
00059 
00061       virtual MAK::Aggregate::ServantPtr servant() { return myServantPtr;}
00062 
00063    protected:
00064        MAK::Aggregate::ServantPtr myServantPtr;
00065    };
00066 
00067 public:
00068 
00070    DtAggregateInterface(DtExerciseConn* exConn);
00071 
00073    virtual ~DtAggregateInterface();
00074 
00075 private:
00076 
00078    DtAggregateInterface(const DtAggregateInterface &other);
00079 
00081    DtAggregateInterface& operator=(const DtAggregateInterface &other);
00082 
00083 public:
00086    virtual DtTenaServantObject* createServantObject(DtExerciseConn* exConn);
00087 
00089    virtual void processServantCleanup(DtTenaServantObject* servantObject);
00090 
00092    virtual void subscribe();
00093 
00095    virtual bool needUpdate(const DtStateRepository& stateRep, 
00096                            const DtStateRepository& asSeenByRemote,
00097                            bool useThresholding = true);
00098 
00100    virtual void decode(const DtTenaServantObject* servant,
00101                        DtStateRepository* stateRep)const;
00102 
00104    virtual void encode(DtTenaServantObject* servant, 
00105                        const DtStateRepository* stateRep,
00106                        TENA::Time::Pointer timeForStamping,
00107                        bool forceUpdate = false);
00108 
00110    virtual DtReflectedObject *createReflectedObject()const;
00111 
00113    virtual void processAddition(MAK::Aggregate::ProxyPtr const &proxy);
00114 
00116    virtual void processUpdate(MAK::Aggregate::ProxyPtr const &proxy);
00117 
00119    virtual void processRemoval(MAK::Aggregate::ProxyPtr const &proxy);
00120 
00121 
00122 protected:
00123 
00125    virtual void decode(const MAK::Aggregate::ImmutablePublicationStatePtr pubStatePtr,
00126                        DtStateRepository* stateRep)const;
00127 protected:
00128 
00130    MAK::Aggregate::SubscriptionInfoPtr mySubscriptionInfoPtr;
00131    typedef std::map<MAK::Aggregate::ProxyPtr, DtReflectedObject *> ProxyToRefObjMap;
00132    ProxyToRefObjMap myRefAggregateMap;
00133    ProxyToRefObjMap myAggregateWaitList;
00134    TENA::GeocentricSpatialReferenceFrame::Pointer myGeocSrf;
00135 };
00136 
00137 
00138 #endif
00139 #endif
00140 
00141 
00142 

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)