BOSS
7.0.9
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
20
namespace
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
*/
26
class
NotAlignedIssue
:
public
eformat::Issue
{
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
*/
39
NotAlignedIssue
(
const
ers::Context
& context,
ers::severity_t
severity
,
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 */
eformat::Issue
Definition:
eformat/eformat-00-00-04/eformat/Issue.h:23
eformat::NotAlignedIssue
Definition:
NotAlignedIssue.h:26
eformat::NotAlignedIssue::base
const void * base() const
Definition:
NotAlignedIssue.cxx:35
eformat::NotAlignedIssue::size
size_t size() const
Definition:
NotAlignedIssue.cxx:44
eformat::NotAlignedIssue::~NotAlignedIssue
virtual ~NotAlignedIssue()
Definition:
NotAlignedIssue.h:45
ers::Context
Source context for Issue.
Definition:
Context.h:42
ers::Issue::severity
severity_t severity() const
severity_t of the issue
Definition:
ers/ers-00-00-03/src/Issue.cxx:602
Issue.h
Defines the base eformat Issue.
eformat
Definition:
BadVersionIssue.h:20
ers::severity_t
enum ers::_severity_t severity_t
source
Event
eformat
eformat-00-00-04
eformat
NotAlignedIssue.h
Generated by
1.9.6