BOSS 8.0.0
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:Andre.dos.Anjos@cern.ch">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 */
18static const char* REQUESTED_CHILD_KEY = "Number of the requested child";
19static const char* NUMBER_OF_CHILDREN_KEY = "Total number of children";
20
22 ers::severity_t severity, size_t req,
23 size_t total )
24 : eformat::Issue( context, severity ) {
25 set_value( REQUESTED_CHILD_KEY, req );
26 set_value( NUMBER_OF_CHILDREN_KEY, total );
27 finish_setup( "Requested child is out of bounds" );
28}
29
31 return get_int_value( REQUESTED_CHILD_KEY );
32}
33
35 return get_int_value( NUMBER_OF_CHILDREN_KEY );
36}
Issue(const ers::Context &context, ers::severity_t severity)
NoSuchChildIssue(const ers::Context &context, ers::severity_t severity, size_t req, size_t total)
Source context for Issue.
void set_value(const std::string &key, uint8_t value)
Sets a value 8 bit unsigned.
severity_t severity() const
severity_t of the issue
int get_int_value(const std::string &key, int def=0) const
Get a value of the table as an integer.
void finish_setup(const std::string &message)
Finishes the setup of the Issue.
enum ers::_severity_t severity_t