log4cpp 1.1.6
Loading...
Searching...
No Matches
TriggeringEventEvaluatorFactory.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_dd233b8b_5c59_4956_9393_6581c95f9779)
9#define h_dd233b8b_5c59_4956_9393_6581c95f9779
10
11#include "FactoryParams.hh"
12#include "Portability.hh"
14#include <map>
15#include <memory>
16#include <string>
17
18namespace log4cpp {
19 class LOG4CPP_EXPORT TriggeringEventEvaluatorFactory {
20 public:
22 typedef std::LOG4CPP_UNIQUE_PTR<TriggeringEventEvaluator> (*create_function_t)(const params_t& params);
23
24 static TriggeringEventEvaluatorFactory& getInstance();
25 void registerCreator(const std::string& class_name, create_function_t create_function);
26 std::LOG4CPP_UNIQUE_PTR<TriggeringEventEvaluator> create(const std::string& class_name, const params_t& params);
27 bool registered(const std::string& class_name) const;
28
29 private:
30 TriggeringEventEvaluatorFactory() {};
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_dd233b8b_5c59_4956_9393_6581c95f9779
#define LOG4CPP_EXPORT
Definition Export.hh:26
Definition FactoryParams.hh:52
std::auto_ptr< TriggeringEventEvaluator > create(const std::string &class_name, const params_t &params)
Definition TriggeringEventEvaluatorFactory.cpp:35
bool registered(const std::string &class_name) const
Definition TriggeringEventEvaluatorFactory.cpp:43
static TriggeringEventEvaluatorFactory & getInstance()
Definition TriggeringEventEvaluatorFactory.cpp:14
FactoryParams params_t
Definition TriggeringEventEvaluatorFactory.hh:21
std::auto_ptr< TriggeringEventEvaluator >(* create_function_t)(const params_t &params)
Definition TriggeringEventEvaluatorFactory.hh:22
void registerCreator(const std::string &class_name, create_function_t create_function)
Definition TriggeringEventEvaluatorFactory.cpp:24
The top level namespace for all 'Log for C++' types and classes.
Definition AbortAppender.hh:16