48 return m_factory_map.insert(CallbackMap::value_type(name,creator)).second;
58 CallbackMap::const_iterator i = m_factory_map.find(name);
59 if (i == m_factory_map.end()) {
77 Issue *i = build(name);
95 ERS_ASSERT(values!=0,
"null value table for original");
101 stream <<
"Issue factory - registered issues\n" ;
102 stream <<
"---------------------------------\n" ;
104 for(CallbackMap::const_iterator pos=m_factory_map.begin();pos!=m_factory_map.end();++pos) {
105 std::string name = pos->first;
106 stream << i <<
")\t" << name << std::endl;
109 stream <<
"---------------------------------\n" ;
#define ERS_ASSERT(expr,...)
#define ERS_PRE_CHECK_PTR(p)
#define ERS_ISSUE_FACTORY_ERROR(name, message)
Place holder Issue class.
static IssueFactory * s_factory
bool register_issue(const std::string &name, CreateIssueCallback creator)
register an issue factory
void write_to(std::ostream &stream) const
writes description to stream
static void print_registered()
prints all registered issue types
static IssueFactory * instance()
method to access singleton
Issue * build(const std::string &name) const
build an empty issue out of a name
void set_values(const string_map_type &values)
sets the value table
const string_map_type * get_value_table() const
extract value table
virtual const char * get_class_name() const
Get key for class (used for serialisation)
efhlt::Interface * factory(void)
std::ostream & operator<<(std::ostream &, const Issue &)
std::map< std::string, std::string > string_map_type