log4cpp
1.1.4
Toggle main menu visibility
Loading...
Searching...
No Matches
LayoutsFactory.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_409ac787_0acf_47ff_ac15_3e9024d40315)
9
#define h_409ac787_0acf_47ff_ac15_3e9024d40315
10
11
#include <string>
12
#include <map>
13
#include <memory>
14
#include "
Portability.hh
"
15
#include "
Layout.hh
"
16
#include "
FactoryParams.hh
"
17
18
namespace
log4cpp
19
{
20
class
LOG4CPP_EXPORT
LayoutsFactory
21
{
22
public
:
23
typedef
FactoryParams
params_t
;
24
typedef
std::LOG4CPP_UNIQUE_PTR<Layout> (*
create_function_t
)(
const
params_t
& params);
25
26
static
LayoutsFactory&
getInstance
();
27
void
registerCreator
(
const
std::string& class_name,
create_function_t
create_function);
28
std::LOG4CPP_UNIQUE_PTR<Layout>
create
(
const
std::string& class_name,
const
params_t
& params);
29
bool
registed
(
const
std::string& class_name)
const
;
30
31
private
:
32
LayoutsFactory(){};
33
34
typedef
std::map<std::string, create_function_t> creators_t;
35
typedef
creators_t::const_iterator const_iterator;
36
37
creators_t creators_;
38
};
39
}
40
41
42
#endif
// h_409ac787_0acf_47ff_ac15_3e9024d40315
LOG4CPP_EXPORT
#define LOG4CPP_EXPORT
Definition
Export.hh:26
FactoryParams.hh
Layout.hh
Portability.hh
log4cpp::FactoryParams
Definition
FactoryParams.hh:62
log4cpp::LayoutsFactory::params_t
FactoryParams params_t
Definition
LayoutsFactory.hh:23
log4cpp::LayoutsFactory::create
std::auto_ptr< Layout > create(const std::string &class_name, const params_t ¶ms)
Definition
LayoutsFactory.cpp:44
log4cpp::LayoutsFactory::getInstance
static LayoutsFactory & getInstance()
Definition
LayoutsFactory.cpp:20
log4cpp::LayoutsFactory::registerCreator
void registerCreator(const std::string &class_name, create_function_t create_function)
Definition
LayoutsFactory.cpp:35
log4cpp::LayoutsFactory::registed
bool registed(const std::string &class_name) const
Definition
LayoutsFactory.cpp:53
log4cpp::LayoutsFactory::create_function_t
std::auto_ptr< Layout >(* create_function_t)(const params_t ¶ms)
Definition
LayoutsFactory.hh:24
log4cpp
The top level namespace for all 'Log for C++' types and classes.
Definition
AbortAppender.hh:16
include
log4cpp
LayoutsFactory.hh
Generated by
1.17.0