diff options
author | lloyd <[email protected]> | 2008-06-30 02:28:47 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-06-30 02:28:47 +0000 |
commit | a01d19fd314804f3466737b3c6314bec0d511990 (patch) | |
tree | 7d8e24004d0d9c7a8852a2faa1f8c0612eee90dd /include/libstate.h | |
parent | 954e01df3c99836d13f2a188193b0bdbf660856a (diff) |
Remove the Config class.
In reality, Config was a singleton, with the only owner being the
Library_State object. Theoretically one could create and use another Config
instance, but in practice it was never done. Reflect the reality and inline
the members and public functions of Config in Library_State, removing Config
entirely.
Diffstat (limited to 'include/libstate.h')
-rw-r--r-- | include/libstate.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/include/libstate.h b/include/libstate.h index 63c01d270..f6a616bba 100644 --- a/include/libstate.h +++ b/include/libstate.h @@ -43,13 +43,23 @@ class BOTAN_DLL Library_State Allocator* get_allocator(const std::string& = "") const; void add_allocator(Allocator*); - void set_default_allocator(const std::string&) const; + void set_default_allocator(const std::string&); + + std::string get(const std::string&, const std::string&) const; + bool is_set(const std::string&, const std::string&) const; + void set(const std::string&, const std::string&, + const std::string&, bool = true); - class Config& config() const; std::string option(const std::string&) const; + void set_option(const std::string, const std::string&); + + void add_alias(const std::string&, const std::string&); + std::string deref_alias(const std::string&) const; class Mutex* get_mutex() const; private: + void load_default_config(); + Library_State(const Library_State&) {} Library_State& operator=(const Library_State&) { return (*this); } @@ -57,7 +67,8 @@ class BOTAN_DLL Library_State class Mutex_Factory* mutex_factory; - mutable class Config* config_obj; + std::map<std::string, std::string> config; + class Mutex* config_lock; class Mutex* allocator_lock; std::map<std::string, Allocator*> alloc_factory; |