CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
EntityNotFoundIssue.cxx
Go to the documentation of this file.
1/*
2 * EntityNotFoundIssue.cxx
3 * Test
4 *
5 * Created by Matthias Wiesmann on 09.02.05.
6 * Copyright 2005 CERN. All rights reserved.
7 *
8 */
9
11
12#include <sstream>
13
14const char* const ers::EntityNotFoundIssue::CLASS_NAME = "ers::EntityNotFoundIssue" ;
15const char* const ers::EntityNotFoundIssue::ENTITY_NAME_KEY = "ENTITY_NAME" ;
16const char* const ers::EntityNotFoundIssue::ENTITY_TYPE_KEY = "ENTITY_TYPE" ;
17const char* const ers::EntityNotFoundIssue::ENTITY_CONTEXT_KEY = "ENTITY_KEY" ;
18
19namespace {
20 ers::Issue *create_issue() { return new ers::EntityNotFoundIssue(); }
22}
23
24const char * ers::EntityNotFoundIssue::get_class_name() const throw() { return CLASS_NAME ; }
25
26/** \overload */
28
29/** \overload */
31
32/** Constructor
33 * \brief entity not found constructor
34 * \param c the ers context where the issue occured
35 * \param s the ers severity_t of the issue
36 * \param entity_name the name of the entity that was not found
37 * \param entity_type the type of the entity that was not found
38 * \param entity_context the name of the context where the entity was searched for
39 */
40
41ers::EntityNotFoundIssue::EntityNotFoundIssue(const ers::Context &c, ers::severity_t s, const std::string &entity_name, const std::string &entity_type, const std::string &entity_context) : Issue(c,s) {
42 set_value(ENTITY_NAME_KEY,entity_name);
43 set_value(ENTITY_TYPE_KEY,entity_type);
44 set_value(ENTITY_CONTEXT_KEY,entity_context) ;
45 std::ostringstream stream ;
46 stream << "Cannot find " << entity_type << "\"" << entity_name << "\" in " << entity_context ;
47 finish_setup(stream.str());
48} // EntityNotFoundIssue
XmlRpcServer s
Source context for Issue.
Definition Context.h:42
virtual const char * get_class_name() const
Get key for class (used for serialisation)
static const char *const ENTITY_CONTEXT_KEY
static const char *const ENTITY_NAME_KEY
static const char *const ENTITY_TYPE_KEY
static const char *const CLASS_NAME
Class name.
bool register_issue(const std::string &name, CreateIssueCallback creator)
register an issue factory
static IssueFactory * instance()
method to access singleton
Root Issue class.
void set_value(const std::string &key, uint8_t value)
Sets a value 8 bit unsigned.
void finish_setup(const std::string &message)
Finishes the setup of the Issue.
enum ers::_severity_t severity_t