log4cpp
1.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
include
log4cpp
NDC.hh
Go to the documentation of this file.
1
/*
2
* NDC.hh
3
*
4
* Copyright 2000, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
5
* Copyright 2000, Bastiaan Bakker. All rights reserved.
6
*
7
* See the COPYING file for the terms of usage and distribution.
8
*/
9
10
#ifndef _LOG4CPP_NDC_HH
11
#define _LOG4CPP_NDC_HH
12
13
#include <
log4cpp/Portability.hh
>
14
#include <string>
15
#include <vector>
16
17
namespace
log4cpp {
69
class
LOG4CPP_EXPORT
NDC
{
70
public
:
71
72
struct
DiagnosticContext
{
73
DiagnosticContext
(
const
std::string& message);
74
DiagnosticContext
(
const
std::string& message,
75
const
DiagnosticContext
& parent);
76
77
std::string
message
;
78
std::string
fullMessage
;
79
};
80
81
typedef
std::vector<DiagnosticContext>
ContextStack
;
82
91
static
void
clear();
92
106
static
ContextStack
* cloneStack();
107
112
static
const
std::string&
get
();
113
118
static
size_t
getDepth();
119
120
static
void
inherit(
ContextStack
* stack);
121
132
static
std::string pop();
133
142
static
void
push(
const
std::string& message);
143
150
static
void
setMaxDepth(
int
maxDepth);
151
156
static
NDC
& getNDC();
157
158
NDC
();
159
virtual
~
NDC
();
160
161
public
:
162
virtual
void
_clear();
163
virtual
ContextStack
* _cloneStack();
164
virtual
const
std::string& _get()
const
;
165
virtual
size_t
_getDepth()
const
;
166
virtual
void
_inherit(
ContextStack
* stack);
167
virtual
std::string _pop();
168
virtual
void
_push(
const
std::string& message);
169
virtual
void
_setMaxDepth(
int
maxDepth);
170
171
ContextStack
_stack
;
172
};
173
}
174
175
#endif // _LOG4CPP_NDC_HH
Generated on Fri Nov 9 2012 03:21:30 for log4cpp by
1.8.2