BOSS 7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
TooBigCountIssue.h
Go to the documentation of this file.
1//Dear emacs, this is -*- c++ -*-
2
3/**
4 * @file eformat/TooBigCountIssue.h
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 * @brief Describes an exception that happens when the total number of blocks
11 * I'm managing is bigger than the one I was asked to manage initially.
12 */
13
14#ifndef EFORMAT_TOOBIGCOUNTISSUE_H
15#define EFORMAT_TOOBIGCOUNTISSUE_H
16
17#include "eformat/Issue.h"
18#include <stdint.h>
19
20namespace eformat {
21
22 /**
23 * This exception is supposed to be thrown when the user is trying to add
24 * more blocks than the number of blocks I can handle.
25 */
27
28 public: //interface
29
30 /**
31 * Builds a new size-check exception
32 *
33 * @param context The Error Reporting System context to be used to identify
34 * the spot where this issue was created
35 * @param severity The severity of this issue
36 * @param count The number of blocks I was asked to deal with
37 * @param maxcount The maximum number of blocks I can deal with
38 */
40 size_t count, size_t maxcount);
41
42
43 /**
44 * Destructor virtualisation
45 */
46 virtual ~TooBigCountIssue() throw() {}
47
48 /**
49 * The number of blocks I have to deal with
50 */
51 size_t count () const;
52
53 /**
54 * The maximum number of blocks I can deal with
55 */
56 size_t max_count () const;
57
58 };
59
60}
61
62/**
63 * Simplifies the use of this Issue
64 *
65 * @param count The number of blocks I was asked to deal with
66 * @param maxcount The maximum number of blocks I can deal with
67 */
68#define EFORMAT_TOO_BIG_COUNT(count, maxcount) \
69 eformat::TooBigCountIssue(ERS_HERE, ers::error, count, maxcount)
70
71#endif /* EFORMAT_TOOBIGCOUNTISSUE_H */
Source context for Issue.
Definition: Context.h:42
severity_t severity() const
severity_t of the issue
Defines the base eformat Issue.
enum ers::_severity_t severity_t