![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2010 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: DtDriverFactory.h,v $ $Revision: 1.15 $ $State: Exp $ 00007 ******************************************************************************/ 00008 00012 00013 #ifndef DtDriverFactory_H_ 00014 #define DtDriverFactory_H_ 00015 00016 #include <vrvCore/vrvCore.h> 00017 #include <vrvUtil/DtVirtualBaseClass.h> 00018 #include <map> 00019 #include <string> 00020 00021 namespace makVrv 00022 { 00023 class DtDriver; 00024 class DtDriverCreator; 00025 class DtDe; 00026 00027 00030 class DT_DLL_VRVCORE DtDriverFactory : public DtVirtualBaseClass 00031 { 00032 public: 00033 00034 typedef std::map<std::string,DtDriverCreator*> CreatorMap; 00035 00037 static DtDriverFactory& instance(DtDe& de); 00038 00040 virtual ~DtDriverFactory(); 00041 00043 virtual void addDriverCreator(const std::string& creatorName, 00044 DtDriverCreator* creator); 00045 00047 DtDriver* createDriver(const std::string& creatorName, 00048 const std::string& instanceName ); 00049 00051 const CreatorMap& creators() const; 00052 00053 protected: 00054 00056 DtDriverFactory(DtDe& de); 00057 00058 DtDe& myDe; 00059 CreatorMap myCreators; 00060 00061 }; 00062 } 00063 00064 #endif 00065