VR-Link API Documentation for DIS
tIffInterface.h
Go to the documentation of this file.
00001 //********************************************************************
00004 //********************************************************************
00005 //********************************************************************
00007 //********************************************************************
00008 
00009 #ifndef tIffInterface_H_
00010 #define tIffInterface_H_
00011 
00012 #if DtTENA
00013 
00014 #include "makLromMapExport.h"
00015 #include <vlutil/vlMachineTypes.h>
00016 #include <vl/tObjectInterface.h>
00017 #include <vl/tReflIff.h>
00018 #include <vl/iffSR.h>
00019 #include <vlpi/entityType.h>
00020 #include <vl/globalObjDes.h>
00021 
00023 #include <JNTC/AirTransponder/ServantPtr.h>
00024 #include <JNTC/AirTransponder/ProxyPtr.h>
00025 #include <JNTC/AirTransponder/ImmutablePublicationStatePtr.h>
00026 #include <JNTC/AirTransponder/SubscriptionInfoPtr.h>
00027 
00028 #include <map>
00029 #include <list>
00030 
00034 
00036 //
00043 class DT_DLL_MAKLROM DtIffInterface: public DtObjectInterface
00044 {
00045 protected:
00048    class DtIffServantObject : public DtTenaServantObject
00049    {
00050    public:
00052       DtIffServantObject( JNTC::AirTransponder::ServantPtr sp):myServantPtr(sp){}
00053 
00055       virtual ~DtIffServantObject() {}
00056 
00058       virtual const JNTC::AirTransponder::ServantPtr servant() const { return myServantPtr;}
00059 
00061       virtual JNTC::AirTransponder::ServantPtr servant() { return myServantPtr;}
00062 
00063    protected:
00064        JNTC::AirTransponder::ServantPtr myServantPtr;
00065    };
00066 
00067 public:
00069    DtIffInterface(DtExerciseConn* exConn);
00070 
00072    virtual ~DtIffInterface();
00073 
00074 private:
00076    DtIffInterface(const DtIffInterface &other);
00077 
00079    DtIffInterface& operator=(const DtIffInterface &other);
00080 
00081 public:
00084    virtual DtTenaServantObject* createServantObject(DtExerciseConn* exConn);
00085 
00087    virtual void processServantCleanup(DtTenaServantObject* servantObject);
00088 
00090    virtual void subscribe();
00091 
00093    virtual bool needUpdate(const DtStateRepository& stateRep, 
00094                            const DtStateRepository& asSeenByRemote,
00095                            bool useThresholding = true);
00096 
00098    virtual void decode(const DtTenaServantObject* servant,
00099                        DtStateRepository* stateRep)const;
00100 
00102    virtual void encode(DtTenaServantObject* servant, 
00103                        const DtStateRepository* stateRep,
00104                        TENA::Time::Pointer timeForStamping,
00105                        bool forceUpdate = false);
00106 
00108    virtual DtReflectedObject *createReflectedObject()const;
00109 
00111    virtual void processAddition(JNTC::AirTransponder::ProxyPtr const &proxy);
00112 
00114    virtual void processUpdate(JNTC::AirTransponder::ProxyPtr const &proxy);
00115 
00117    virtual void processRemoval(JNTC::AirTransponder::ProxyPtr const &proxy);
00118 
00119 
00120 protected:
00122    virtual void decode(const JNTC::AirTransponder::ImmutablePublicationStatePtr pubStatePtr,
00123                        DtStateRepository* stateRep)const;
00124 
00125 protected:
00126 
00128    JNTC::AirTransponder::SubscriptionInfoPtr mySubscriptionInfoPtr;
00129    typedef std::map<JNTC::AirTransponder::ProxyPtr, DtReflectedObject *> ProxyToRefObjMap;
00130    ProxyToRefObjMap myRefIffMap;
00131    ProxyToRefObjMap myIffWaitList;
00132 
00133 };
00134 
00135 
00136 #endif
00137 #endif
00138 
00139 
00140 

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)