VR-Forces 4.0.4 Class Documentation
include/vrvUtil/DtEventQueueInterface.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2009 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: DtEventQueueInterface.h,v $ $Revision: 1.6 $ $State: Exp $
00007 ******************************************************************************/
00008 
00012 
00013 #ifndef DtEventQueueInterface_H_
00014 #define DtEventQueueInterface_H_
00015 
00016 #include <vrvUtil/vrvUtil.h>
00017 #include <map>
00018 #include <vector>
00019 #include <boost/function.hpp>
00020 #include <vlutil/vlSmartPointers.h>
00021 
00022 namespace makVrv
00023 {
00024    class DtVirtualBaseClass;
00025 
00029    class DT_DLL_VRVUTIL DtEventQueueInterface
00030    {
00031    public:
00032       typedef boost::function< void (DtEventQueueInterface*) > Event;
00033       typedef std::vector<Event> EventList;
00034       typedef DtBoost::shared_ptr<EventList> SharedEventList;
00035 
00036       virtual ~DtEventQueueInterface();
00037 
00039       DtVirtualBaseClass* findInstance(const std::string& className);
00040 
00042       void registerInstance(const std::string& className, DtVirtualBaseClass* instance);
00043 
00045       virtual void postEvent(const Event& signal) = 0;
00046 
00048       virtual void processEvents() = 0;
00049 
00051       void executeEvents(const SharedEventList& signalList);
00052 
00053    protected:
00054       DtEventQueueInterface();
00055 
00056    private:
00057       DtEventQueueInterface(const DtEventQueueInterface&);
00058       DtEventQueueInterface& operator=(const DtEventQueueInterface&);
00059 
00060    protected:
00061       typedef std::map<std::string,DtVirtualBaseClass*> InstanceMap;
00062       InstanceMap myInstanceMap;
00063    };
00064 }
00065 
00066 #endif
00067 

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)