![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /****************************************************************************** 00002 ** Copyright (c) 2010 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 ******************************************************************************/ 00005 /****************************************************************************** 00006 ** $RCSfile: DtLibraryLoader.h,v $ $Revision: 1.19 $ $State: Exp $ 00007 ******************************************************************************/ 00008 00012 00013 #ifndef DtLibraryLoader_H_ 00014 #define DtLibraryLoader_H_ 00015 00016 #include <vrvCore/vrvCore.h> 00017 00018 #include <map> 00019 #include <list> 00020 #include <string> 00021 00022 class DtDynamicLibrary; 00023 00024 namespace makVrv 00025 { 00026 class DtDe; 00027 00030 class DT_DLL_VRVCORE DtLibraryLoader 00031 { 00032 public: 00033 00035 DtLibraryLoader(DtDe&); 00036 00038 virtual ~DtLibraryLoader(); 00039 00041 void getLibrariesInDirectory(const std::string& dir, 00042 std::list<std::string>& files) const; 00043 00045 void loadAllInDirectory(const std::string& dir); 00046 00048 void loadLibary(const std::string& library); 00049 00051 void initializeLibraries(); 00052 00053 protected: 00054 00055 typedef bool (*IgInitFunction)(DtDe*); 00056 static const char* theIgInitFunction; 00057 00059 virtual bool initializeLibrary(DtDynamicLibrary* lib); 00060 00062 virtual bool isLibraryIGCompatible(DtDynamicLibrary* lib); 00063 00064 DtDe* myDe; 00065 00066 typedef std::map<std::string, DtDynamicLibrary*> LibraryMap; 00067 LibraryMap myLibraries; 00068 00069 }; 00070 } 00071 00072 #endif 00073