BOSS
7.0.6
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
14
const
char
*
const
ers::EntityNotFoundIssue::CLASS_NAME
=
"ers::EntityNotFoundIssue"
;
15
const
char
*
const
ers::EntityNotFoundIssue::ENTITY_NAME_KEY
=
"ENTITY_NAME"
;
16
const
char
*
const
ers::EntityNotFoundIssue::ENTITY_TYPE_KEY
=
"ENTITY_TYPE"
;
17
const
char
*
const
ers::EntityNotFoundIssue::ENTITY_CONTEXT_KEY
=
"ENTITY_KEY"
;
18
19
namespace
{
20
ers::Issue
*create_issue() {
return
new
ers::EntityNotFoundIssue
(); }
21
bool
registered =
ers::IssueFactory::instance
()->
register_issue
(
ers::EntityNotFoundIssue::CLASS_NAME
,create_issue) ;
22
}
23
24
const
char
*
ers::EntityNotFoundIssue::get_class_name
()
const
throw() {
return
CLASS_NAME
; }
25
26
/** \overload */
27
ers::EntityNotFoundIssue::EntityNotFoundIssue
() :
ers
::
Issue
() {}
28
29
/** \overload */
30
ers::EntityNotFoundIssue::EntityNotFoundIssue
(
const
ers::Context
&c,
ers::severity_t
s
) :
ers
::
Issue
(c,
s
) {}
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
41
ers::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
EntityNotFoundIssue.h
s
XmlRpcServer s
Definition:
HelloServer.cpp:11
ers::Context
Source context for Issue.
Definition:
Context.h:42
ers::EntityNotFoundIssue
Definition:
EntityNotFoundIssue.h:21
ers::EntityNotFoundIssue::get_class_name
virtual const char * get_class_name() const
Get key for class (used for serialisation)
Definition:
EntityNotFoundIssue.cxx:24
ers::EntityNotFoundIssue::EntityNotFoundIssue
EntityNotFoundIssue()
Definition:
EntityNotFoundIssue.cxx:27
ers::EntityNotFoundIssue::ENTITY_CONTEXT_KEY
static const char *const ENTITY_CONTEXT_KEY
Definition:
EntityNotFoundIssue.h:29
ers::EntityNotFoundIssue::ENTITY_NAME_KEY
static const char *const ENTITY_NAME_KEY
Definition:
EntityNotFoundIssue.h:27
ers::EntityNotFoundIssue::ENTITY_TYPE_KEY
static const char *const ENTITY_TYPE_KEY
Definition:
EntityNotFoundIssue.h:28
ers::EntityNotFoundIssue::CLASS_NAME
static const char *const CLASS_NAME
Class name.
Definition:
EntityNotFoundIssue.h:26
ers::IssueFactory::register_issue
bool register_issue(const std::string &name, CreateIssueCallback creator)
register an issue factory
Definition:
IssueFactory.cxx:47
ers::IssueFactory::instance
static IssueFactory * instance()
method to access singleton
Definition:
IssueFactory.cxx:28
ers::Issue
Root Issue class.
Definition:
ers/ers-00-00-03/ers/Issue.h:40
ers::Issue::set_value
void set_value(const std::string &key, uint8_t value)
Sets a value 8 bit unsigned.
Definition:
ers/ers-00-00-03/src/Issue.cxx:371
ers::Issue::finish_setup
void finish_setup(const std::string &message)
Finishes the setup of the Issue.
Definition:
ers/ers-00-00-03/src/Issue.cxx:568
ers
Definition:
Event/ers/ers-00-00-03/ers/Assertion.h:20
ers::severity_t
enum ers::_severity_t severity_t
source
Event
ers
ers-00-00-03
src
EntityNotFoundIssue.cxx
Generated by
1.9.6