blob: 19ec9dd5fbd6885dddce8644d5afec60422518ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
// $Id$
#ifndef ACE_INIT_ACE_H
#define ACE_INIT_ACE_H
#include "ace/pre.h"
#include "ace/OS.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
class ACE_Export ACE_Init_ACE
{
// DESCRIPTION: This class implements the fucntions for the
// initialization and shutting down ACE.
// These functions are called only once per ACE
// invokation.
public:
// Initialize ACE library services. Can be called only once per
// program invocation.
static int init (void);
// Returns 0 on success, -1 on failure, and 1 if it had already been called.
// Shut down ACE library services. Can be called only once per
// program invocation.
static int fini (void);
// Returns 0 on success, -1 on failure, and 1 if it had already been called.
private:
static u_int init_fini_count_;
// Counter to match <init>/<fini> calls. <init> must increment it;
// <fini> must decrement it. <fini> then does nothing until it
// reaches 0.
};
#if !defined (ACE_LACKS_INLINE_FUNCTIONS)
#include "ace/Init_ACE.i"
#endif /* ACE_LACKS_INLINE_FUNCTIONS */
#include "ace/post.h"
#endif /* ACE_INIT_ACE_H */
|