log4cpp
1.1.6
Toggle main menu visibility
Loading...
Searching...
No Matches
AppendersFactory.hh
Go to the documentation of this file.
1
/*
2
* Copyright 2002, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
3
* Copyright 2002, Bastiaan Bakker. All rights reserved.
4
*
5
* See the COPYING file for the terms of usage and distribution.
6
*/
7
8
#if !defined(h_738a42b1_1502_4483_948a_a69e7bbbee6a)
9
#define h_738a42b1_1502_4483_948a_a69e7bbbee6a
10
11
#include "
Appender.hh
"
12
#include "
FactoryParams.hh
"
13
#include "
Portability.hh
"
14
#include <map>
15
#include <memory>
16
#include <string>
17
18
namespace
log4cpp
{
19
class
LOG4CPP_EXPORT
AppendersFactory {
20
public
:
21
typedef
FactoryParams
params_t
;
22
typedef
std::LOG4CPP_UNIQUE_PTR<Appender> (*
create_function_t
)(
const
params_t
& params);
23
24
static
AppendersFactory&
getInstance
();
25
void
registerCreator
(
const
std::string& class_name,
create_function_t
create_function);
26
std::LOG4CPP_UNIQUE_PTR<Appender>
create
(
const
std::string& class_name,
const
params_t
& params);
27
bool
registered
(
const
std::string& class_name)
const
;
28
29
private
:
30
AppendersFactory() {};
31
32
typedef
std::map<std::string, create_function_t> creators_t;
33
typedef
creators_t::const_iterator const_iterator;
34
35
creators_t creators_;
36
};
37
}
// namespace log4cpp
38
39
#endif
// h_738a42b1_1502_4483_948a_a69e7bbbee6a
Appender.hh
LOG4CPP_EXPORT
#define LOG4CPP_EXPORT
Definition
Export.hh:26
FactoryParams.hh
Portability.hh
log4cpp::AppendersFactory::getInstance
static AppendersFactory & getInstance()
Definition
AppendersFactory.cpp:24
log4cpp::AppendersFactory::create_function_t
std::auto_ptr< Appender >(* create_function_t)(const params_t ¶ms)
Definition
AppendersFactory.hh:22
log4cpp::AppendersFactory::registered
bool registered(const std::string &class_name) const
Definition
AppendersFactory.cpp:80
log4cpp::AppendersFactory::registerCreator
void registerCreator(const std::string &class_name, create_function_t create_function)
Definition
AppendersFactory.cpp:64
log4cpp::AppendersFactory::params_t
FactoryParams params_t
Definition
AppendersFactory.hh:21
log4cpp::AppendersFactory::create
std::auto_ptr< Appender > create(const std::string &class_name, const params_t ¶ms)
Definition
AppendersFactory.cpp:72
log4cpp::FactoryParams
Definition
FactoryParams.hh:52
log4cpp
The top level namespace for all 'Log for C++' types and classes.
Definition
AbortAppender.hh:16
include
log4cpp
AppendersFactory.hh
Generated by
1.17.0