MAK RTIspy API Documentation for HLA 1.3
ambImpBase.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2010 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 
00006 #pragma once
00007 
00010 
00011 #include "rtiMsConfig.h"
00012 
00013 #include <vlutil/vlTime.h>
00014 #include <vlutil/vlSmartPointers.h>
00015 
00016 #include <vector>
00017 
00018 class DtRtiAmbassadorObserver;
00019 class DtRtiAmbObserverList;
00020 class DtFedAmbWrapper;
00021 class DtFederateMgr;
00022 class DtConnectionMgr;
00023 class DtObjectMgr;
00024 class DtInteractionMgr;
00025 class DtFomClassMgr;
00026 class DtRIDParameters;
00027 class DtRtiAssistantLrcClient;
00028 class DtAssistantPrinter;
00029 #ifndef DT_NO_PLUGINS
00030 class DtRtiPluginManager;
00031 #endif
00032 
00033 namespace MAKRti
00034 {
00035    class DtString;
00036    class DtFilePrinter;
00037 }
00038 
00045 class DT_DLL_LRC DtRtiAmbassadorBaseImplementor
00046 {
00047 protected:
00048 
00050    DtRtiAmbassadorBaseImplementor();
00051 
00052 public:
00053 
00055    virtual ~DtRtiAmbassadorBaseImplementor();
00056 
00057 private:
00058    
00060    DtRtiAmbassadorBaseImplementor(DtRtiAmbassadorBaseImplementor const& );
00061 
00063    DtRtiAmbassadorBaseImplementor& operator= (DtRtiAmbassadorBaseImplementor const& );
00064 
00065 public:
00066 
00067 
00069    virtual void addObserver(MAKRti::DtString const& name, DtRtiAmbassadorObserver* observer);
00070    virtual DtRtiAmbassadorObserver* removeObserver(MAKRti::DtString const& name);
00071 
00073    virtual void addFedAmbWrapper(MAKRti::DtString const& name, DtFedAmbWrapper* wrapper);
00074    virtual DtFedAmbWrapper* removeFedAmbWrapper(MAKRti::DtString const& name);
00075 
00079 
00080    virtual DtFederateMgr* validateIsJoined(const MAKRti::DtString& serviceCallName);
00081    virtual const DtFederateMgr* validateIsJoined(const MAKRti::DtString& serviceCallName) const;
00083 
00088    virtual bool enterServiceCall(const MAKRti::DtString& serviceCallName);
00089 
00091    virtual void exitServiceCall(const MAKRti::DtString& serviceCallName);
00092 
00094    virtual bool isConnected() const;
00095 
00097    virtual DtRIDParameters* params();
00098 
00101    virtual DtFederateMgr* validatedFedMgr();
00102 
00105    virtual DtFederateMgr* nakedFedMgr();
00106 
00109    virtual DtConnectionMgr* validatedConnectMgr();
00110 
00113    virtual DtObjectMgr* objMgr();
00114 
00117    virtual DtInteractionMgr* interMgr();
00118 
00121    virtual DtFomClassMgr* fomMgr();
00122 
00124    virtual DtRtiAmbObserverList* observers();
00125 
00127    virtual const DtRtiAmbObserverList* observers() const;
00128 
00131    virtual void enableLogging();
00132 
00134    virtual DtBoost::shared_ptr< MAKRti::DtFilePrinter > logPrinter();
00135 
00136    unsigned long flags() const;
00137 
00138 protected:
00139 
00141    virtual void setupConnection(const std::vector<MAKRti::DtString>& rid);
00142 
00147    virtual bool completeConnection(MAKRti::DtString& errorMessage);
00148 
00150    virtual void clearConnection();
00151 
00154    virtual bool performMulticastDiscovery();
00155 
00157    virtual void printDisabledService( const MAKRti::DtString & service );
00158 
00161    virtual unsigned long incrementServiceCallCount();
00162 
00164    virtual bool tickOnce();
00165 
00167    virtual void throwInternalError(const MAKRti::DtString & errorMessage) const = 0;
00168 
00170    virtual void throwNotConnected(const MAKRti::DtString & errorMessage) const = 0;
00171 
00173    virtual void throwNotJoined(const MAKRti::DtString & errorMessage) const = 0;
00174 
00175 protected:
00176 
00178    DtRIDParameters* myParams;
00179 
00181    DtConnectionMgr* myConnectMgr;
00182 
00184    DtFederateMgr* myFedMgr;
00185 
00186 #ifndef DT_NO_PLUGINS
00187 
00188    DtRtiPluginManager* myPluginMgr;
00189 #endif
00190 
00192    DtRtiAmbObserverList* myObservers;
00193 
00195    DtBoost::shared_ptr<DtRtiAssistantLrcClient> myAssistantClient;
00196 
00198    DtBoost::shared_ptr< MAKRti::DtFilePrinter > myLogPrinter;
00199 
00201    DtBoost::shared_ptr< DtAssistantPrinter > myAssistantPrinter;
00202 
00204    bool myCallbacksEnabled;
00205 
00207    MAKRti::DtClock myClock;
00208 
00209    unsigned long myFlags;
00210 
00211    bool myUseBusyWaitForTick;
00212 };

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)