BOSS
7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
NoSuchChildIssue.cxx
Go to the documentation of this file.
1
//Dear emacs, this is -*- c++ -*-
2
3
/**
4
* @file NoSuchChildIssue.cxx
5
* @author <a href="mailto:
[email protected]
">Andre DOS ANJOS</a>
6
* $Author: zhangy $
7
* $Revision: 1.1.1.1 $
8
* $Date: 2009/06/19 07:35:41 $
9
*
10
* Implements the no-such-child exception object.
11
*/
12
13
#include "
eformat/NoSuchChildIssue.h
"
14
15
/**
16
* Strings to identify keys in ERS
17
*/
18
static
const
char
* REQUESTED_CHILD_KEY =
"Number of the requested child"
;
19
static
const
char
* NUMBER_OF_CHILDREN_KEY =
"Total number of children"
;
20
21
eformat::NoSuchChildIssue::NoSuchChildIssue
(
const
ers::Context
& context,
22
ers::severity_t
severity,
23
size_t
req,
size_t
total)
24
:
eformat
::
Issue
(context,severity)
25
{
26
set_value
(REQUESTED_CHILD_KEY, req);
27
set_value
(NUMBER_OF_CHILDREN_KEY,
total
);
28
finish_setup
(
"Requested child is out of bounds"
);
29
}
30
31
size_t
eformat::NoSuchChildIssue::requested
()
const
32
{
33
return
get_int_value(REQUESTED_CHILD_KEY);
34
}
35
36
size_t
eformat::NoSuchChildIssue::total
()
const
37
{
38
return
get_int_value(NUMBER_OF_CHILDREN_KEY);
39
}
NoSuchChildIssue.h
Exception thrown when the position of a child doesn't exist in the current fragment.
eformat::Issue
Definition
eformat/eformat-00-01-00/eformat/Issue.h:23
eformat::NoSuchChildIssue::requested
size_t requested(void) const
Definition
NoSuchChildIssue.cxx:31
eformat::NoSuchChildIssue::NoSuchChildIssue
NoSuchChildIssue(const ers::Context &context, ers::severity_t severity, size_t req, size_t total)
Definition
NoSuchChildIssue.cxx:21
eformat::NoSuchChildIssue::total
size_t total(void) const
Definition
NoSuchChildIssue.cxx:36
ers::Context
Source context for Issue.
Definition
Context.h:42
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
eformat
Definition
BadVersionIssue.h:20
ers::severity_t
enum ers::_severity_t severity_t
7.1.2
Event
eformat
eformat-00-01-00
src
NoSuchChildIssue.cxx
Generated by
1.12.0