BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
NotAlignedIssue.h
Go to the documentation of this file.
1//Dear emacs, this is -*- c++ -*-
2
3/**
4 * @file eformat/NotAlignedIssue.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 the exception where some chunk of memory is not 32-bit
11 * aligned.
12 */
13
14#ifndef EFORMAT_NOTALIGNEDISSUE_H
15#define EFORMAT_NOTALIGNEDISSUE_H
16
17#include "eformat/Issue.h"
18#include <cstdlib>
19
20namespace eformat {
21
22 /**
23 * Describes the out-of-bounds exception, that is thrown when the user
24 * requests a memory location out of the bounds of a buffer.
25 */
27
28 public: //interface
29
30 /**
31 * Builds a new not-aligned 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 base The address of the page
37 * @param size The size of this page, in bytes
38 */
40 const void* base, size_t size);
41
42 /**
43 * Destructor virtualisation
44 */
45 virtual ~NotAlignedIssue() throw() {}
46
47 /**
48 * Access the address of the first page of the IO vector
49 */
50 const void* base () const;
51
52 /**
53 * The size of this block, in bytes
54 */
55 size_t size () const;
56
57 };
58
59}
60
61/**
62 * Simplifies the use of this Issue
63 *
64 * @param req The request child
65 * @param total The total child number available
66 */
67#define EFORMAT_NOT_ALIGNED(base, size) \
68 eformat::NotAlignedIssue(ERS_HERE, ers::error, base, size)
69
70#endif /* EFORMAT_NOTALIGNEDISSUE_H */
const void * base() const
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