![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2010 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: DtAsynchronousAgentManager.h,v $ $Revision: 1.11 $ $State: Exp $ 00007 ******************************************************************************/ 00008 00012 00013 #pragma once 00014 00015 #include <vrvCore/vrvCore.h> 00016 #include <vrvCore/DtAgentManagerInterface.h> 00017 #include <vrvUtil/DtLockedBufferedQueue.h> 00018 #include <boost/function.hpp> 00019 00020 namespace makVrv 00021 { 00022 class DtModelDefinition; 00023 class DtAgentManager; 00024 00027 class DT_DLL_VRVCORE DtAsynchronousAgentManager : public DtAgentManagerInterface 00028 { 00029 public: 00030 typedef boost::function< void (DtAgentManagerInterface*) > 00031 SceneManagerInterfaceFunction; 00032 00033 typedef DtLockedBufferedQueue<SceneManagerInterfaceFunction> 00034 AsyncAgentManagerInterfaceFunctionQueue; 00035 00040 DtAsynchronousAgentManager(DtAgentManager& agentManager, const std::string& ownerName); 00041 00046 virtual ~DtAsynchronousAgentManager(); 00047 00058 virtual void tick(); 00059 00060 //@name Locked asynchronous operations. These functions may take effect performance. 00062 00063 00065 virtual void addModelDefinition(const DtModelDefinition&); 00066 00067 00072 virtual DtModelDefinition* lookupModelDefinition(const std::string& str); 00074 00076 AsyncAgentManagerInterfaceFunctionQueue* asyncFunctionQueue(); 00077 00078 protected: 00079 DtAgentManager& myAgentManager; 00080 AsyncAgentManagerInterfaceFunctionQueue myAsyncFunctionQueue; 00081 }; 00082 }