3 //=============================================================================
7 * Initialize and finalize the ACE library services. You can
8 * generally execute the @a ACE::init() and @a ACE::fini() sequence
9 * multiple times, but be aware that nothing that ACE controls (e.g.,
10 * singletons, thread-specific services, loaded services, etc.) will
11 * survive the @a ACE::fini().
13 //=============================================================================
16 #ifndef ACE_INIT_ACE_H
17 #define ACE_INIT_ACE_H
19 #include /**/ "ace/pre.h"
21 #include /**/ "ace/ACE_export.h"
23 #if !defined (ACE_LACKS_PRAGMA_ONCE)
25 #endif /* ACE_LACKS_PRAGMA_ONCE */
27 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
32 * This method initializes the ACE library services and initializes
33 * ACE's internal resources. Applications should not instantiate
34 * ACE classes or call methods on objects of these classes until @a
35 * ACE::init() returns successfully.
37 * @return Returns 0 on success, -1 on failure, and 1 if it had
38 * already been called.
40 extern ACE_Export
int init ();
43 * Finalize the ACE library services and releases ACE's internal
44 * resources. In general, do not instantiate ACE classes or call
45 * methods on objects of these classes after @a ACE::fini() has been
48 * @return Returns 0 on success, -1 on failure, and 1 if it had already been
51 extern ACE_Export
int fini ();
54 // Used internally, so not exported.
57 * Counter to match init()/fini() calls. init() must increment it;
58 * fini() must decrement it. fini() then does nothing until it
61 extern unsigned int init_fini_count_
;
64 ACE_END_VERSIONED_NAMESPACE_DECL
66 #include /**/ "ace/post.h"
68 #endif /* ACE_INIT_ACE_H */