MAK Data Logger API Documentation for HLA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
databaseDriverFactory.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #ifndef databaseDriverFactory_H_
10 #define databaseDriverFactory_H_
11 
12 #include "vlDatabase.h"
13 
14 #include <map>
15 #include <vlutil/vlMutex.h>
16 #include <vector>
17 
18 class DtString;
19 
20 class DtDatabaseDriver;
21 
24 {
25 public:
28 
30  static std::vector<DtString> getInstalledDrivers();
31 
34  static const DtDatabaseDriver* getDriver(const DtString& driverName);
35 
40  static void registerDriver(DtDatabaseDriver* driver);
41 
45  static void replaceDriver(DtDatabaseDriver* driver);
46 
48  static std::vector<DtString> getDataSources(const DtString& driver);
49 
50 private:
55 
56 
57 protected:
58 
60  static DtDatabaseDriverFactory* acquire();
61 
63  static void release();
64 
66  explicit DtDatabaseDriverFactory();
67 
69  DtDatabaseDriver* lookupDriverByName(const DtString& driverName);
70 
73  bool registerDriver(DtDatabaseDriver* driver,bool allowReplace);
74 
75  static DtMutex theFactoryMutex;
77 
78  typedef std::map<DtString,DtDatabaseDriver*> DriverMap;
80 };
81 
82 #endif

Document ID: Generated on Thu Apr 7 20:50:59 EDT 2016 from SVN revision 163818
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)