![]() |
MAK RTIspy API Documentation for HLA Evolved
|
00001 /********************************************************************* 00002 ** Copyright (c) 1998 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: ambObsList.h,v $ $Revision: 1.10 $ $State: Exp $ 00007 *********************************************************************/ 00008 00011 00012 #ifndef DtRtiAmbObserverList_H_ 00013 #define DtRtiAmbObserverList_H_ 00014 00015 #include "rtiMsConfig.h" 00016 #include <vlutil/vlHashlist.h> 00017 00018 class DtRtiAmbassadorObserver; 00019 00020 class DT_DLL_LRC DtRtiAmbObserverList 00021 { 00022 public: 00023 00024 DtRtiAmbObserverList(); 00025 virtual ~DtRtiAmbObserverList(); 00026 00027 virtual DtRtiAmbassadorObserver* first() const; 00028 00029 virtual void addObserver( 00030 MAKRti::DtString name, DtRtiAmbassadorObserver* observer); 00031 virtual DtRtiAmbassadorObserver* removeObserver(MAKRti::DtString name); 00032 00033 protected: 00034 00035 MAKRti::DtHashlist myHashedObservers; 00036 MAKRti::DtIntrusiveList myObservers; 00037 }; 00038 00039 inline DtRtiAmbassadorObserver* DtRtiAmbObserverList::first() const 00040 { 00041 return myObservers.first() ? 00042 (DtRtiAmbassadorObserver*) myObservers.first()->data() : NULL; 00043 } 00044 00045 #endif //! DtRtiAmbObserverList_H_