Nemiver
0.3
src
common
nmv-scope-logger.h
Go to the documentation of this file.
1
/* -*- Mode: C++; indent-tabs-mode:nil; c-basic-offset:4; -*- */
2
3
/*Copyright (c) 2005-2006 Dodji Seketeli
4
*
5
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
6
* software and associated documentation files (the "Software"),
7
* to deal in the Software without restriction, including without limitation
8
* the rights to use, copy, modify, merge, publish, distribute,
9
* sublicense, and/or sell copies of the Software, and to permit
10
* persons to whom the Software is furnished to do so,
11
* subject to the following conditions:
12
*
13
* The above copyright notice and this permission notice shall be included in all copies
14
* or substantial portions of the Software.
15
*
16
* THE SOFTWARE IS PROVIDED "AS IS",
17
* WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
18
* INCLUDING BUT NOT LIMITED TO THE
19
* WARRANTIES OF MERCHANTABILITY,
20
* FITNESS FOR A PARTICULAR PURPOSE
21
* AND NONINFRINGEMENT.
22
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
23
* HOLDERS BE LIABLE FOR ANY CLAIM,
24
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
25
* CONTRACT, TORT OR OTHERWISE,
26
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
27
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
*
29
*/
30
#ifndef __NMV_SCOPE_LOGGER_H__
31
#define __NMV_SCOPE_LOGGER_H__
32
33
#include "
nmv-api-macros.h
"
34
#include "
nmv-log-stream-utils.h
"
35
#include "
nmv-safe-ptr-utils.h
"
36
37
namespace
nemiver
{
38
namespace
common
{
39
40
struct
ScopeLoggerPriv;
41
class
NEMIVER_API
ScopeLogger
42
{
43
friend
struct
ScopeLoggerPriv;
44
45
SafePtr<ScopeLoggerPriv>
m_priv;
46
//forbid copy/assignation
47
ScopeLogger
(
ScopeLogger
const
&);
48
ScopeLogger
& operator= (
ScopeLogger
const
&);
49
ScopeLogger
();
50
51
public
:
52
53
ScopeLogger
(
const
char
*a_scope_name,
54
enum
LogStream::LogLevel
a_level=
LogStream::LOG_LEVEL_NORMAL
,
55
const
UString
&a_log_domain=
NMV_GENERAL_DOMAIN
,
56
bool
a_use_default_log_stream=
true
);
57
58
virtual
~
ScopeLogger
();
59
60
};
//class ScopeLogger
61
62
}
//end namespace common
63
}
//end namespace nemiver
64
65
#endif
66
nmv-safe-ptr-utils.h
nemiver
Definition:
nmv-address.h:31
NEMIVER_API
#define NEMIVER_API
Definition:
nmv-api-macros.h:53
nmv-api-macros.h
nemiver::common::LogStream::LogLevel
LogLevel
Definition:
nmv-log-stream.h:82
nemiver::common::UString
Definition:
nmv-ustring.h:45
nemiver::common::LogStream::LOG_LEVEL_NORMAL
@ LOG_LEVEL_NORMAL
Definition:
nmv-log-stream.h:83
NMV_GENERAL_DOMAIN
#define NMV_GENERAL_DOMAIN
Definition:
nmv-log-stream.h:47
nemiver::common::ScopeLogger
Definition:
nmv-scope-logger.h:41
nemiver::common::SafePtr< ScopeLoggerPriv >
nmv-log-stream-utils.h
common
Definition:
nmv-proc-list-dialog.h:32
Generated by
1.8.17