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