]> Dogcows Code - chaz/yoink/blob - src/moof/backend.hh
configuration cleanup and bugfixes
[chaz/yoink] / src / moof / backend.hh
1
2 /*] Copyright (c) 2009-2010, Charles McGarvey [**************************
3 **] All rights reserved.
4 *
5 * vi:ts=4 sw=4 tw=75
6 *
7 * Distributable under the terms and conditions of the 2-clause BSD license;
8 * see the file COPYING for a complete text of the license.
9 *
10 **************************************************************************/
11
12 #ifndef _MOOF_BACKEND_HH_
13 #define _MOOF_BACKEND_HH_
14
15 /**
16 * \file backend.hh
17 * Initialize the backend libraries and subsystems.
18 */
19
20
21 namespace moof {
22
23
24 /**
25 * Some classes and subsystems require certain backend libraries to be
26 * initialized. This is the mechanism to accomplish that. Classes which
27 * rely on any backend libraries just need to instantiate this class as a
28 * member. Backend cleanup will occur automagically when there are no more
29 * instances.
30 */
31 class backend
32 {
33 public:
34
35 /**
36 * Construct a backend reference, initializing the backend if it hasn't
37 * already been initialized.
38 */
39 backend();
40
41 /**
42 * Get whether or not the backend has been initialized.
43 * \return True if the backend is initialized, false otherwise.
44 */
45 static bool is_initialized();
46
47
48 // The rest of this stuff is to implement the reference counting.
49
50 backend(const backend& backend);
51 backend& operator=(const backend& backend);
52 ~backend();
53 };
54
55
56 } // namespace moof
57
58 #endif // _MOOF_BACKEND_HH_
59
This page took 0.030676 seconds and 4 git commands to generate.