![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2012 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: DtExampleEventSignaler.h,v $ $Revision: 1.4 $ $State: Exp $ 00007 ******************************************************************************/ 00008 00009 //\file DtExampleEventSignaler.h 00010 //\brief Contains DtExampleEventSignaler class. 00012 //An event signaler is a class that is used to signal boost style signals from 00013 //the gui thread to the networking thread 00014 00015 #pragma once 00016 00017 #include <vrfGuiCore/vrfGuiCore.h> 00018 #include <vrvUtil/event_signal.h> 00019 #include <vrvUtil/DtVirtualBaseClass.h> 00020 #include <vrvUtil/signalslib.h> 00021 00022 namespace makVrv 00023 { 00024 class DtDe; 00025 class DtSharedSettingsManager; 00026 } 00027 00028 class DtExampleEventSignaler : public makVrv::DtVirtualBaseClass 00029 { 00030 public: 00031 00032 //Get an instance of the simulation settings automatically from the 00033 //settings manager. this will return a different signaler depending 00034 //on what thread this function is called from. 00035 static DtExampleEventSignaler& instance(const makVrv::DtSharedSettingsManager&); 00036 00037 //Get an instance of the simulation settings from the event queue 00038 //interface. This will return the same signaler independent of the thread. 00039 static DtExampleEventSignaler& instance(makVrv::DtEventQueueInterface&); 00040 00041 //Find an instance of the signaler, for an interface, if one does not 00042 //exist it will not be created. 00043 //\retval NULL if the instance does not exist. 00044 static DtExampleEventSignaler* findInstance( 00045 makVrv::DtEventQueueInterface*); 00046 00047 //DTOR 00048 virtual ~DtExampleEventSignaler(); 00049 00050 //@name Signals 00052 00053 //\brief Signal to send a pdu from the network thread 00054 makVrv::event_signal<void ()> signal_sendPdu; 00056 00057 protected: 00058 DtExampleEventSignaler(makVrv::DtEventQueueInterface& eqi); 00059 00060 private: 00061 DtExampleEventSignaler(const DtExampleEventSignaler&); 00062 DtExampleEventSignaler& operator=(const DtExampleEventSignaler&); 00063 };