BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Event/ers/include/ers/RangeIssue.h
Go to the documentation of this file.
1/*
2 * RangeIssue.h
3 * ers
4 *
5 * Created by Matthias Wiesmann on 15.02.05.
6 * Copyright 2005 CERN. All rights reserved.
7 *
8 */
9
10#ifndef ERS_RANGE_ISSUE
11#define ERS_RANGE_ISSUE
12
13#include "ers/InvalidReferenceIssue.h"
14namespace ers {
16 protected:
18
19 public:
20 static void set_range( ers::Issue& issue, int64_t index, int64_t min_index,
21 int64_t max_index, const char* entity_name = 0 );
22 static void check_range( const ers::Context& c, int64_t min, int64_t value, int64_t max,
23 const char* entity_name = 0 );
24 static const char* const CLASS_NAME;
25 static const char* const INDEX_REFERENCE_TYPE;
26 static const char* const RANGE_MIN_KEY;
27 static const char* const RANGE_MAX_KEY;
28 RangeIssue();
29 RangeIssue( const ers::Context& c, ers::severity_t s, int64_t min_index, int64_t index,
30 int64_t max_index, const char* entity_name = 0 );
31 virtual const char* get_class_name() const throw();
32
33 }; // RangeIssue
34
35} // namespace ers
36
37#if ( !defined( N_ERS_ASSERT ) )
38# define ERS_RANGE_CHECK( min, value, max ) \
39 ers::RangeIssue::check_range( ERS_HERE, min, value, max, #value )
40#else
41# define ERS_RANGE_CHECK( min, value, max )
42#endif
43#endif
#define min(a, b)
#define max(a, b)
XmlRpcServer s
Source context for Issue.
InvalidReferenceIssue(const Context &context, severity_t s)
Root Issue class.
static const char *const INDEX_REFERENCE_TYPE
static const char *const RANGE_MAX_KEY
static const char *const RANGE_MIN_KEY
RangeIssue(const ers::Context &c, ers::severity_t s)
static void set_range(ers::Issue &issue, int64_t index, int64_t min_index, int64_t max_index, const char *entity_name=0)
static const char *const CLASS_NAME
virtual const char * get_class_name() const
Get key for class (used for serialisation).
static void check_range(const ers::Context &c, int64_t min, int64_t value, int64_t max, const char *entity_name=0)
enum ers::_severity_t severity_t