BOSS 8.0.0
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
10#include "ers/EntityNotFoundIssue.h"
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(); }
23} // namespace
24
25const char* ers::EntityNotFoundIssue::get_class_name() const throw() { return CLASS_NAME; }
26
27/** \overload */
29
30/** \overload */
33
34/** Constructor
35 * \brief entity not found constructor
36 * \param c the ers context where the issue occured
37 * \param s the ers severity_t of the issue
38 * \param entity_name the name of the entity that was not found
39 * \param entity_type the type of the entity that was not found
40 * \param entity_context the name of the context where the entity was searched for
41 */
42
44 const std::string& entity_name,
45 const std::string& entity_type,
46 const std::string& entity_context )
47 : Issue( c, s ) {
48 set_value( ENTITY_NAME_KEY, entity_name );
49 set_value( ENTITY_TYPE_KEY, entity_type );
50 set_value( ENTITY_CONTEXT_KEY, entity_context );
51 std::ostringstream stream;
52 stream << "Cannot find " << entity_type << "\"" << entity_name << "\" in " << entity_context;
53 finish_setup( stream.str() );
54} // EntityNotFoundIssue
XmlRpcServer s
Source context for Issue.
virtual const char * get_class_name() const
Get key for class (used for serialisation).
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.
Issue(const Context &context, severity_t s)
Constructor for subclasses.
enum ers::_severity_t severity_t