log4cplus
2.0.6
include
log4cplus
msttsappender.h
Go to the documentation of this file.
1
// -*- C++ -*-
2
// Module: Log4cplus
3
// File: msttsappender.h
4
// Created: 10/2012
5
// Author: Vaclav Zeman
6
//
7
//
8
// Copyright (C) 2012-2017, Vaclav Zeman. All rights reserved.
9
//
10
// Redistribution and use in source and binary forms, with or without modifica-
11
// tion, are permitted provided that the following conditions are met:
12
//
13
// 1. Redistributions of source code must retain the above copyright notice,
14
// this list of conditions and the following disclaimer.
15
//
16
// 2. Redistributions in binary form must reproduce the above copyright notice,
17
// this list of conditions and the following disclaimer in the documentation
18
// and/or other materials provided with the distribution.
19
//
20
// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
21
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
22
// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23
// APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
24
// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
25
// DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
26
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
27
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31
32
//
33
36
#ifndef LOG4CPLUS_MSTTSAPPENDER_H
37
#define LOG4CPLUS_MSTTSAPPENDER_H
38
39
#include <
log4cplus/config.hxx
>
40
41
#if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE)
42
#pragma once
43
#endif
44
45
#include <
log4cplus/appender.h
>
46
47
48
#if defined (_WIN32)
49
#if defined (log4cplusqt4debugappender_EXPORTS) \
50
|| defined (log4cplusqt4debugappenderU_EXPORTS) \
51
|| (defined (DLL_EXPORT) && defined (INSIDE_LOG4CPLUS_MSTTSAPPENDER))
52
#undef LOG4CPLUS_MSTTSAPPENDER_BUILD_DLL
53
#define LOG4CPLUS_MSTTSAPPENDER_BUILD_DLL
54
#endif
55
#if defined (LOG4CPLUS_MSTTSAPPENDER_BUILD_DLL)
56
#if defined (INSIDE_LOG4CPLUS_MSTTSAPPENDER)
57
#define LOG4CPLUS_MSTTSAPPENDER_EXPORT __declspec(dllexport)
58
#else
59
#define LOG4CPLUS_MSTTSAPPENDER_EXPORT __declspec(dllimport)
60
#endif
61
#else
62
#define LOG4CPLUS_MSTTSAPPENDER_EXPORT
63
#endif
64
#else
65
#if defined (INSIDE_LOG4CPLUS_MSTTSAPPENDER)
66
#define LOG4CPLUS_MSTTSAPPENDER_EXPORT LOG4CPLUS_DECLSPEC_EXPORT
67
#else
68
#define LOG4CPLUS_MSTTSAPPENDER_EXPORT LOG4CPLUS_DECLSPEC_IMPORT
69
#endif // defined (INSIDE_LOG4CPLUS_MSTTSAPPENDER)
70
#endif // !_WIN32
71
72
73
namespace
log4cplus
74
{
75
76
77
class
LOG4CPLUS_MSTTSAPPENDER_EXPORT
MSTTSAppender
78
:
public
Appender
79
{
80
public
:
81
MSTTSAppender
();
82
explicit
MSTTSAppender
(
helpers::Properties
const
&);
83
virtual
~
MSTTSAppender
();
84
85
virtual
void
close ();
86
87
static
void
registerAppender ();
88
89
protected
:
90
virtual
void
append (
spi::InternalLoggingEvent
const
&);
91
92
struct
Data;
93
94
Data *
data
;
95
96
private
:
97
LOG4CPLUS_PRIVATE
void
init (
long
const
* rate = 0,
98
unsigned
long
const
* volume = 0,
bool
speak_punc =
false
,
99
bool
async =
false
);
100
101
MSTTSAppender
(
MSTTSAppender
const
&);
102
MSTTSAppender
& operator = (
MSTTSAppender
const
&);
103
};
104
105
106
typedef
helpers::SharedObjectPtr<MSTTSAppender>
MSTTSAppenderPtr
;
107
108
109
}
// namespace log4cplus
110
111
112
#endif // LOG4CPLUS_MSTTSAPPENDER_H
log4cplus::MSTTSAppenderPtr
helpers::SharedObjectPtr< MSTTSAppender > MSTTSAppenderPtr
Definition:
msttsappender.h:106
log4cplus
Definition:
appender.h:46
log4cplus::helpers::SharedObjectPtr
Definition:
pointer.h:100
log4cplus::MSTTSAppender
Definition:
msttsappender.h:77
LOG4CPLUS_MSTTSAPPENDER_EXPORT
#define LOG4CPLUS_MSTTSAPPENDER_EXPORT
Definition:
msttsappender.h:62
config.hxx
log4cplus::helpers::Properties
Definition:
property.h:43
log4cplus::spi::InternalLoggingEvent
The internal representation of logging events.
Definition:
loggingevent.h:51
appender.h
LOG4CPLUS_PRIVATE
#define LOG4CPLUS_PRIVATE
Definition:
config.hxx:53
log4cplus::Appender
Extend this class for implementing your own strategies for printing log statements.
Definition:
appender.h:137
log4cplus::MSTTSAppender::data
Data * data
Definition:
msttsappender.h:92
Generated on Fri Jun 18 2021 08:46:20 for log4cplus by
1.8.17