aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-09-20 08:20:31 +0000
committerlloyd <[email protected]>2006-09-20 08:20:31 +0000
commit869fa8a3fa7dfedc55ec4c9ece7be00d1118c309 (patch)
tree6b83f57dd0f6b8dc3a5998a1621d958d098aff82 /include
parentde37a33633c96366216644a898b8c23fcd0f29a4 (diff)
Make the initialization/deinitialization functions static members of
the LibraryInitializer class, rather than global functions floating around inside the Init namespace. Allow callers to provide an alternative Modules object.
Diffstat (limited to 'include')
-rw-r--r--include/init.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/include/init.h b/include/init.h
index 1f8c3d742..db3dd24f7 100644
--- a/include/init.h
+++ b/include/init.h
@@ -37,22 +37,16 @@ class InitializerOptions
class LibraryInitializer
{
public:
- LibraryInitializer(const std::string& = "");
- LibraryInitializer(const InitializerOptions&);
- ~LibraryInitializer();
+ static void initialize(const std::string& = "");
+ static void initialize(const InitializerOptions&);
+ static void initialize(const InitializerOptions&, class Modules&);
+ static void deinitialize();
+
+ LibraryInitializer(const std::string& args = "") { initialize(args); }
+ LibraryInitializer(const InitializerOptions& args) { initialize(args); }
+ ~LibraryInitializer() { deinitialize(); }
};
-namespace Init {
-
-/*************************************************
-* Main Library Initialization/Shutdown Functions *
-*************************************************/
-void initialize(const InitializerOptions&);
-void deinitialize();
-
-}
-
-
}
#endif