VR-Forces 4.0.4 Class Documentation
include/bhaveSim/bhaveFactories.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2011 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 
00006 #pragma once
00007 
00008 #include <bhaveSim/bhaveSimDefines.h>
00009 
00010 #include <bhaveSim/vrfTaskAgent.h>
00011 #include <bhaveSim/vrfEntityBot.h>
00012 #include <boost/function.hpp>
00013 
00014 namespace BHAVE
00015 {
00016    //Bot Definitions. Tasks are in VRF-TaskAgent
00017    const char BHAVE_BOT[] = "entity-bot";
00018    const char BHAVE_LIFEFORM_BOT[] = "lifeform-bot";
00019    const char BHAVE_GROUND_PLATFORM_BOT[] = "ground-platform-bot";
00020 
00021 typedef boost::function< DtVrfTaskAgent*
00022    (DtVrfEntityBot*, const char*, const char*, const char*, const char*, const char*, const char*)> DtTaskAgentFactory;
00023 
00027 
00028 class DT_DLL_bhaveSim DtBhaveFactories
00029 {
00030 public:
00032    static DtBhaveFactories* instance();
00033 
00036    virtual void initializeTaskFactory();
00037    virtual void initializeBotFactory();
00038 
00041    
00042    std::map<std::string, DtTaskAgentFactory>& taskFactory() { return myTaskFactory;}
00043 
00046    std::map<std::string, boost::function< Kaim::Bot*()> >& botFactory() { return myBotFactory;}
00047 
00048 protected:
00049 
00050    static DtBhaveFactories* theBhaveFactories;
00051   
00052    std::map<std::string, DtTaskAgentFactory> myTaskFactory;
00053    std::map<std::string, boost::function< Kaim::Bot*()> > myBotFactory;
00054 
00056    virtual ~DtBhaveFactories();
00057 private:
00058 
00060    DtBhaveFactories();
00061 
00063    DtBhaveFactories(const DtBhaveFactories& orig);
00064 };
00065 
00066 } 
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)