BOSS
8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Event/eformat/include/eformat/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: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
* @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
* Builds a new not-aligned exception
31
*
32
* @param context The Error Reporting System context to be used to identify
33
* the spot where this issue was created
34
* @param severity The severity of this issue
35
* @param base The address of the page
36
* @param size The size of this page, in bytes
37
*/
38
NotAlignedIssue
(
const
ers::Context
& context,
ers::severity_t
severity
,
const
void
*
base
,
39
size_t
size
);
40
41
/**
42
* Destructor virtualisation
43
*/
44
virtual
~NotAlignedIssue
() throw() {}
45
46
/**
47
* Access the address of the first page of the IO vector
48
*/
49
const
void
*
base
()
const
;
50
51
/**
52
* The size of this block, in bytes
53
*/
54
size_t
size
()
const
;
55
};
56
57
}
// namespace eformat
58
59
/**
60
* Simplifies the use of this Issue
61
*
62
* @param req The request child
63
* @param total The total child number available
64
*/
65
#define EFORMAT_NOT_ALIGNED( base, size ) \
66
eformat::NotAlignedIssue( ERS_HERE, ers::error, base, size )
67
68
#endif
/* EFORMAT_NOTALIGNEDISSUE_H */
eformat::Issue
Definition
Event/eformat/include/eformat/Issue.h:23
eformat::NotAlignedIssue::NotAlignedIssue
NotAlignedIssue(const ers::Context &context, ers::severity_t severity, const void *base, size_t size)
Definition
NotAlignedIssue.cxx:23
eformat::NotAlignedIssue::base
const void * base() const
Definition
NotAlignedIssue.cxx:34
eformat::NotAlignedIssue::size
size_t size() const
Definition
NotAlignedIssue.cxx:42
eformat::NotAlignedIssue::~NotAlignedIssue
virtual ~NotAlignedIssue()
Definition
Event/eformat/include/eformat/NotAlignedIssue.h:44
ers::Context
Source context for Issue.
Definition
Event/ers/include/ers/Context.h:41
ers::Issue::severity
severity_t severity() const
severity_t of the issue
Definition
ers/src/Issue.cxx:584
eformat
Definition
Event/eformat/include/eformat/BadVersionIssue.h:20
ers::severity_t
enum ers::_severity_t severity_t
8.0.0
BOSS_Source
Event
eformat
include
eformat
NotAlignedIssue.h
Generated by
1.16.1