diff options
author | lloyd <[email protected]> | 2006-07-02 14:22:18 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-07-02 14:22:18 +0000 |
commit | c36e79af0a4df9f71189918040545146ebac365e (patch) | |
tree | 54513934743a4574d47ea4c65de2373b0e71f9b9 | |
parent | 9fc2248a9689dcb1bc43157e4955347c6fd9c996 (diff) |
Move InitializerOptions out of the Init namespace
Alter the initialization functions to take an InitializerOptions object
instead of a std::string
-rw-r--r-- | include/init.h | 23 | ||||
-rw-r--r-- | src/init_def.cpp | 7 | ||||
-rw-r--r-- | src/init_opt.cpp | 4 |
3 files changed, 15 insertions, 19 deletions
diff --git a/include/init.h b/include/init.h index 7104df49c..f00f97f9e 100644 --- a/include/init.h +++ b/include/init.h @@ -11,8 +11,6 @@ namespace Botan { -namespace Init { - /************************************************* * Options for initializing the library * *************************************************/ @@ -31,23 +29,26 @@ class InitializerOptions }; /************************************************* -* Main Library Initialization/Shutdown Functions * -*************************************************/ -void initialize(const std::string& = ""); -void deinitialize(); - -} - -/************************************************* * Library Initialization/Shutdown Object * *************************************************/ class LibraryInitializer { public: - LibraryInitializer(const std::string& = ""); + LibraryInitializer(const InitializerOptions&); ~LibraryInitializer(); }; +namespace Init { + +/************************************************* +* Main Library Initialization/Shutdown Functions * +*************************************************/ +void initialize(const InitializerOptions&); +void deinitialize(); + +} + + } #endif diff --git a/src/init_def.cpp b/src/init_def.cpp index efb23d439..13687116f 100644 --- a/src/init_def.cpp +++ b/src/init_def.cpp @@ -17,9 +17,9 @@ namespace Botan { /************************************************* * Library Initialization * *************************************************/ -LibraryInitializer::LibraryInitializer(const std::string& arg_string) +LibraryInitializer::LibraryInitializer(const InitializerOptions& args) { - Init::initialize(arg_string); + Init::initialize(args); } /************************************************* @@ -35,9 +35,8 @@ namespace Init { /************************************************* * Library Initialization * *************************************************/ -void initialize(const std::string& arg_string) +void initialize(const InitializerOptions& args) { - InitializerOptions args(arg_string); Builtin_Modules modules(false); Mutex_Factory* mutex_factory = 0; diff --git a/src/init_opt.cpp b/src/init_opt.cpp index 25eabf4f0..cce5f65f6 100644 --- a/src/init_opt.cpp +++ b/src/init_opt.cpp @@ -8,8 +8,6 @@ namespace Botan { -namespace Init { - /************************************************* * Check for an arbitrary boolean-valued option * *************************************************/ @@ -72,5 +70,3 @@ InitializerOptions::InitializerOptions(const std::string& arg_string) } } - -} |