VR-Link API Documentation for DIS
dAggPub.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 *********************************************************************/
00005 #pragma once
00006 
00007 
00008 
00009 #if DtDIS
00010 
00011 
00012 #include "aggregateSR.h"
00013 #include "dObjPub.h"
00014 #include "dAggEnc.h"
00015 #include "dAggDec.h"
00016 
00017 class DT_DLL_VL DtExerciseConn;
00018 
00022 class DT_DLL_VL DtAggregatePublisher : public DtObjectPublisher
00023 {
00026    typedef DtAggregateStateRepository* (*DtStateRepCreator)();
00027 
00028 public:
00029 
00031    DtAggregatePublisher(
00032       DtAggregateStateRepository *stateRepToUse,
00033       DtExerciseConn* conn,
00034       const DtObjectId& id = DtObjectId::nullId());
00035 
00037    DtAggregatePublisher(
00038       DtExerciseConn* conn,
00039       const DtObjectId& id = DtObjectId::nullId());
00040 
00043    DtAggregatePublisher(
00044       const DtEntityType& type,
00045       DtExerciseConn* conn,
00046       const DtObjectId& id = DtObjectId::defaultId());
00047 
00050    DtAggregatePublisher(
00051       const DtEntityType& type,
00052       DtExerciseConn* conn,
00053       DtDeadReckonTypes algorithm,
00054       DtForceType forceId,
00055       const DtObjectId& id = DtObjectId::defaultId());
00056 
00058    virtual ~DtAggregatePublisher();
00059 
00061    virtual void tick();
00062 
00064    virtual void forceUpdate();
00065 
00067    virtual DtAggregateStateRepository* aggregateStateRep();
00068 
00070    virtual DtAggregateStateRepository* asr();
00071 
00073    virtual const DtObjectId& id() const;
00074 
00076    virtual const DtObjectId& localId() const;
00077 
00079    virtual const DtGlobalObjectDesignator& globalId() const;   
00080     
00081 public:
00082 
00084    static void setStateRepCreator(DtStateRepCreator creator);
00085    static DtStateRepCreator setStateRepCreator(void);
00086 
00087    static void setClassDfltTimeThreshold(DtTime threshold);
00088 
00089 protected:
00090 
00092    void init(const DtEntityIdentifier& vehId);
00093 
00095    DtAggregatePublisher(const DtAggregatePublisher& orig);
00096 
00098    DtAggregatePublisher& operator=(const DtAggregatePublisher& orig);
00099 
00100 protected:
00101 
00102    DtObjectId myId;
00103    DtAggregateStateDecoder* myAggregateDecoder;
00104    DtAggregateStateEncoder* myAggregateEncoder;
00105 
00106 protected:
00107    static DtStateRepCreator theStateRepCreator;
00108    static DtTime            theClassDfltTimeThreshold;
00109    static bool              theClassDfltIsSetFlag;
00110 };
00111 
00112 
00113 inline DtAggregateStateRepository* DtAggregatePublisher::asr()
00114 {
00115    return static_cast<DtAggregateStateRepository*>(myStateRep);
00116 }
00117 
00118 inline  const DtObjectId& DtAggregatePublisher::localId() const
00119 {
00120    return id();
00121 }
00122 
00123 
00124 #endif
00125 

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)