Lumiera
0.pre.03
»edit your freedom«
nobug-resource-handle-context.hpp
Go to the documentation of this file.
1
/*
2
NOBUG-RESOURCE-HANDLE-CONTEXT.hpp - thread local stack to manage NoBug resource handles
3
4
Copyright (C)
5
2010, Hermann Vosseler <Ichthyostega@web.de>
6
7
**Lumiera** is free software; you can redistribute it and/or modify it
8
under the terms of the GNU General Public License as published by the
9
Free Software Foundation; either version 2 of the License, or (at your
10
option) any later version. See the file COPYING for further details.
11
12
*/
13
34
#ifndef LIB_NOBUG_RESOURCE_HANDLE_CONTEXT_H
35
#define LIB_NOBUG_RESOURCE_HANDLE_CONTEXT_H
36
37
38
#include "
lib/error.hpp
"
39
#include "
lib/diagnostic-context.hpp
"
40
#include "lib/thread-local.hpp"
41
42
#include <nobug.h>
43
44
45
46
namespace
lib
{
47
48
49
50
#ifdef NOBUG_MODE_ALPHA
51
52
57
class
NobugResourceHandleContext
58
: DiagnosticContext<nobug_resource_user*>
59
{
60
public
:
61
};
62
63
64
#else
/* not NOBUG_ALPHA */
65
66
70
class
NobugResourceHandleContext
71
:
util::NonCopyable
72
{
73
74
typedef
nobug_resource_user* Handle;
75
76
public
:
77
78
operator
Handle ()
79
{
80
return
0;
81
}
82
84
static
NobugResourceHandleContext
&
85
access
()
86
{
87
UNIMPLEMENTED (
"how to disable DiagnosticContext with minimum overhead"
);
88
}
89
};
90
#endif
/* NOBUG_ALPHA? */
91
92
93
94
}
// namespace lib
95
#endif
lib::NobugResourceHandleContext::access
static NobugResourceHandleContext & access()
accessing the innermost diagnostic context created
Definition:
nobug-resource-handle-context.hpp:85
util::NonCopyable
Any copy and copy construction prohibited.
Definition:
nocopy.hpp:37
diagnostic-context.hpp
Facility for collecting diagnostic context information explicitly.
lib
Implementation namespace for support and library code.
Definition:
common-services.cpp:54
lib::NobugResourceHandleContext
Disabled placeholder for the Diagnostic context, not used in release builds.
Definition:
nobug-resource-handle-context.hpp:70
error.hpp
Lumiera error handling (C++ interface).
lib
nobug-resource-handle-context.hpp
Generated on Fri Dec 13 2024 05:05:34 for Lumiera by
1.8.13