BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
eformat::OutOfBoundsIssue Class Reference

#include <OutOfBoundsIssue.h>

Inheritance diagram for eformat::OutOfBoundsIssue:

Public Member Functions

 OutOfBoundsIssue (const ers::Context &context, ers::severity_t severity, size_t size, size_t pos)
virtual ~OutOfBoundsIssue () throw ()
size_t size (void) const
size_t pos (void) const
 OutOfBoundsIssue (const ers::Context &context, ers::severity_t severity, size_t size, size_t pos)
virtual ~OutOfBoundsIssue () throw ()
size_t size (void) const
size_t pos (void) const
 OutOfBoundsIssue (const ers::Context &context, ers::severity_t severity, size_t size, size_t pos)
virtual ~OutOfBoundsIssue () throw ()
size_t size (void) const
size_t pos (void) const
Public Member Functions inherited from eformat::Issue
 Issue (const ers::Context &context, ers::severity_t severity)
virtual ~Issue () throw ()
 Issue (const ers::Context &context, ers::severity_t severity)
virtual ~Issue () throw ()
 Issue (const ers::Context &context, ers::severity_t severity)
virtual ~Issue () throw ()
Public Member Functions inherited from ers::Issue
 Issue ()
 Issue (const Issue &issue)
 Issue (const string_map_type &values)
 Issue (const Context &context, severity_t s, const std::string &message)
 Issue (const Context &context, severity_t s, const std::exception *cause)
Issueclone () const
const Issuecause () const throw ()
 return the cause Issue of this Issue
void cause (const std::exception *cause=0)
 Initialises the cause field.
 operator std::string () const
 Converts the issue into a string.
Issue operator= (const Issue &issue)
 Affectation operator.
bool operator== (const Issue &other) const throw ()
 Equality operator.
const std::string & operator[] (const std::string &key) const throw ()
const std::string & get_value (const std::string &key, const std::string &def) const throw ()
 Reads the property list.
const std::string & get_value (const std::string &key) const throw ()
int get_int_value (const std::string &key, int def=0) const throw ()
 Get a value of the table as an integer.
long get_long_value (const std::string &key, long def=0) const throw ()
 Get a value of the table as a long integer.
double get_double_value (const std::string key, double def) const throw ()
 Get a value of the table as double.
void set_value (const std::string &key, uint8_t value) throw ()
 Sets a value 8 bit unsigned.
void set_value (const std::string &key, uint16_t value) throw ()
void set_value (const std::string &key, uint32_t value) throw ()
void set_value (const std::string &key, uint64_t value) throw ()
void set_value (const std::string &key, int8_t value) throw ()
void set_value (const std::string &key, int16_t value) throw ()
void set_value (const std::string &key, int32_t value) throw ()
void set_value (const std::string &key, int64_t value) throw ()
void set_value (const std::string &key, double value) throw ()
 Sets a value (double float).
void set_value (const std::string &key, const std::string &value) throw ()
 Sets a value (string).
void set_value (const std::string &key, const char *value) throw ()
 Sets a value (c-string).
void set_value (const std::string &key, const void *ptr) throw ()
int values_number () const
 How many key / values.
virtual const char * get_class_name () const throw ()
 Get key for class (used for serialisation).
const string_map_typeget_value_table () const
 extract value table
severity_t severity () const throw ()
 severity_t of the issue
void severity (severity_t s)
 sets the severity_t of the issue
bool is_error ()
 is the issue an error (or fatal).
std::string severity_message () const
 message associated with the severity_t of the issue
void responsibility (responsibility_t r)
 set the responsability of the issue
responsibility_t responsibility () const throw ()
 get the responsability level of the issue
void transience (bool tr)
 sets if the issue is transient
int transience () const throw ()
 is the issue transient
const std::string & human_description () const throw ()
 Human description message.
const char * what () const throw ()
 Human description message.
const std::string & message () const throw ()
 Message.
virtual int exit_value () const throw ()
 value to pass to exit
void add_qualifier (const std::string &qualif)
 adds a qualifier to the issue
std::vector< std::string > qualifiers () const
 return array of qualifiers
 Issue ()
 Issue (const Issue &issue)
 Issue (const string_map_type &values)
 Issue (const Context &context, severity_t s, const std::string &message)
 Issue (const Context &context, severity_t s, const std::exception *cause)
Issueclone () const
const Issuecause () const throw ()
 return the cause Issue of this Issue
void cause (const std::exception *cause=0)
 Initialises the cause field.
 operator std::string () const
 Converts the issue into a string.
Issue operator= (const Issue &issue)
 Affectation operator.
bool operator== (const Issue &other) const throw ()
 Equality operator.
const std::string & operator[] (const std::string &key) const throw ()
const std::string & get_value (const std::string &key, const std::string &def) const throw ()
 Reads the property list.
const std::string & get_value (const std::string &key) const throw ()
int get_int_value (const std::string &key, int def=0) const throw ()
 Get a value of the table as an integer.
long get_long_value (const std::string &key, long def=0) const throw ()
 Get a value of the table as a long integer.
double get_double_value (const std::string key, double def) const throw ()
 Get a value of the table as double.
void set_value (const std::string &key, uint8_t value) throw ()
 Sets a value 8 bit unsigned.
void set_value (const std::string &key, uint16_t value) throw ()
void set_value (const std::string &key, uint32_t value) throw ()
void set_value (const std::string &key, uint64_t value) throw ()
void set_value (const std::string &key, int8_t value) throw ()
void set_value (const std::string &key, int16_t value) throw ()
void set_value (const std::string &key, int32_t value) throw ()
void set_value (const std::string &key, int64_t value) throw ()
void set_value (const std::string &key, double value) throw ()
 Sets a value (double float).
void set_value (const std::string &key, const std::string &value) throw ()
 Sets a value (string).
void set_value (const std::string &key, const char *value) throw ()
 Sets a value (c-string).
void set_value (const std::string &key, const void *ptr) throw ()
int values_number () const
 How many key / values.
virtual const char * get_class_name () const throw ()
 Get key for class (used for serialisation).
const string_map_typeget_value_table () const
 extract value table
severity_t severity () const throw ()
 severity_t of the issue
void severity (severity_t s)
 sets the severity_t of the issue
bool is_error ()
 is the issue an error (or fatal).
std::string severity_message () const
 message associated with the severity_t of the issue
void responsibility (responsibility_t r)
 set the responsability of the issue
responsibility_t responsibility () const throw ()
 get the responsability level of the issue
void transience (bool tr)
 sets if the issue is transient
int transience () const throw ()
 is the issue transient
const std::string & human_description () const throw ()
 Human description message.
const char * what () const throw ()
 Human description message.
const std::string & message () const throw ()
 Message.
virtual int exit_value () const throw ()
 value to pass to exit
void add_qualifier (const std::string &qualif)
 adds a qualifier to the issue
std::vector< std::string > qualifiers () const
 return array of qualifiers
 Issue ()
 Issue (const Issue &issue)
 Issue (const string_map_type &values)
 Issue (const Context &context, severity_t s, const std::string &message)
 Issue (const Context &context, severity_t s, const std::exception *cause)
Issueclone () const
const Issuecause () const throw ()
 return the cause Issue of this Issue
void cause (const std::exception *cause=0)
 Initialises the cause field.
 operator std::string () const
 Converts the issue into a string.
Issue operator= (const Issue &issue)
 Affectation operator.
bool operator== (const Issue &other) const throw ()
 Equality operator.
const std::string & operator[] (const std::string &key) const throw ()
const std::string & get_value (const std::string &key, const std::string &def) const throw ()
 Reads the property list.
const std::string & get_value (const std::string &key) const throw ()
int get_int_value (const std::string &key, int def=0) const throw ()
 Get a value of the table as an integer.
long get_long_value (const std::string &key, long def=0) const throw ()
 Get a value of the table as a long integer.
double get_double_value (const std::string key, double def) const throw ()
 Get a value of the table as double.
void set_value (const std::string &key, uint8_t value) throw ()
 Sets a value 8 bit unsigned.
void set_value (const std::string &key, uint16_t value) throw ()
void set_value (const std::string &key, uint32_t value) throw ()
void set_value (const std::string &key, uint64_t value) throw ()
void set_value (const std::string &key, int8_t value) throw ()
void set_value (const std::string &key, int16_t value) throw ()
void set_value (const std::string &key, int32_t value) throw ()
void set_value (const std::string &key, int64_t value) throw ()
void set_value (const std::string &key, double value) throw ()
 Sets a value (double float).
void set_value (const std::string &key, const std::string &value) throw ()
 Sets a value (string).
void set_value (const std::string &key, const char *value) throw ()
 Sets a value (c-string).
void set_value (const std::string &key, const void *ptr) throw ()
int values_number () const
 How many key / values.
virtual const char * get_class_name () const throw ()
 Get key for class (used for serialisation).
const string_map_typeget_value_table () const
 extract value table
severity_t severity () const throw ()
 severity_t of the issue
void severity (severity_t s)
 sets the severity_t of the issue
bool is_error ()
 is the issue an error (or fatal).
std::string severity_message () const
 message associated with the severity_t of the issue
void responsibility (responsibility_t r)
 set the responsability of the issue
responsibility_t responsibility () const throw ()
 get the responsability level of the issue
void transience (bool tr)
 sets if the issue is transient
int transience () const throw ()
 is the issue transient
const std::string & human_description () const throw ()
 Human description message.
const char * what () const throw ()
 Human description message.
const std::string & message () const throw ()
 Message.
virtual int exit_value () const throw ()
 value to pass to exit
void add_qualifier (const std::string &qualif)
 adds a qualifier to the issue
std::vector< std::string > qualifiers () const
 return array of qualifiers

Additional Inherited Members

Static Public Attributes inherited from ers::Issue
static const char *const CLASS_KEY = "ISSUE_CLASS"
 key for class information
static const char *const COMPILATION_TIME_KEY = "COMPILATION_TIME"
 key for compilation time
static const char *const COMPILATION_TARGET_KEY = "COMPILATION_TARGET"
 key for compilation target
static const char *const COMPILER_KEY = "COMPILER"
 key for compilator type
static const char *const COMPILATION_DEBUG_LVL_KEY = "COMPILATION_DEBUG_LVL"
static const char *const CPP_CLASS_KEY = "ISSUE_CPP_CLASS"
 key for c++ class (might be mangled)
static const char *const ERS_VERSION_KEY = "ERS_VERSION"
 key for ERS version
static const char *const HOST_NAME_KEY = "HOST_NAME"
 key for hostname
static const char *const HOST_TYPE_KEY = "HOST_TYPE"
 key for host type (architecture / os)
static const char *const HOST_IP_ADDR_KEY = "HOST_IP"
 key for host ip address
static const char *const MESSAGE_KEY = "MESSAGE"
 key for human readable
static const char *const PROCESS_ID_KEY = "PROCESS_ID"
 key for the process id (number)
static const char *const PROCESS_PWD_KEY = "PROCESS_PWD"
 key for the process working directory
static const char *const PROGRAM_NAME_KEY = "PROGRAM_NAME"
 key for the name of the program
static const char *const RESPONSIBILITY_KEY = "RESPONSIBILITY"
 key for the responsibility of the issue (text)
static const char *const SEVERITY_KEY = "SEVERITY"
 key for the severity_t of the issue
static const char *const SOURCE_POSITION_KEY = "SOURCE_POSITION"
 key for position in the source code
static const char *const SOURCE_PACKAGE_KEY = "SOURCE_PACKAGE"
 package name associated with source code
static const char *const TIME_KEY = "TIME"
 key for the time of the issue (text)
static const char *const TRANSIENCE_KEY = "TRANSIENCE"
 key for the transience of the issue (text)
static const char *const USER_ID_KEY = "USER_ID"
 key for the user-id of the owner of the process
static const char *const USER_NAME_KEY = "USER_NAME"
 key for the user-name of the owner of the process
static const char *const CAUSE_PSEUDO_KEY = "CAUSE"
 key used when serializing the cause issue, this key is not used in the value table
static const char *const CAUSE_TEXT_KEY = "CAUSE_TEXT"
 key used to store the cause issue's message
static const char *const QUALIFIER_LIST_KEY = "QUALIFIERS"
 key used to store the qualifier list
static const char *const EXIT_VALUE_KEY = "EXIT_VALUE"
 key used to store the exit value
static const char *const ISSUE_CLASS_NAME = "ers::issue"
 name of the class, used for serialisation
Protected Member Functions inherited from ers::Issue
void insert (const Context *context) throw ()
 Inserts the context.
void insert_time () throw ()
 Inserts current time.
void setup_common (const Context *context) throw ()
 Sets up the common fields.
void finish_setup (const std::string &message) throw ()
 Finishes the setup of the Issue.
 Issue (const Context &context, severity_t s)
 Constructor for subclasses.
void set_values (const string_map_type &values) throw ()
 sets the value table
void insert (const Context *context) throw ()
 Inserts the context.
void insert_time () throw ()
 Inserts current time.
void setup_common (const Context *context) throw ()
 Sets up the common fields.
void finish_setup (const std::string &message) throw ()
 Finishes the setup of the Issue.
 Issue (const Context &context, severity_t s)
 Constructor for subclasses.
void set_values (const string_map_type &values) throw ()
 sets the value table
void insert (const Context *context) throw ()
 Inserts the context.
void insert_time () throw ()
 Inserts current time.
void setup_common (const Context *context) throw ()
 Sets up the common fields.
void finish_setup (const std::string &message) throw ()
 Finishes the setup of the Issue.
 Issue (const Context &context, severity_t s)
 Constructor for subclasses.
void set_values (const string_map_type &values) throw ()
 sets the value table
Protected Attributes inherited from ers::Issue
Issuem_cause
 Issue that caused the current issue.
std::string m_class_name
 class name
std::string m_human_description
 Human readable description (cache).
string_map_type m_value_table
 Optional properties.

Detailed Description

This exception is supposed to be thrown when the user is looking for a region of memory not covered inside the buffer area.

Definition at line 25 of file Event/eformat/include/eformat/OutOfBoundsIssue.h.

Constructor & Destructor Documentation

◆ OutOfBoundsIssue() [1/3]

eformat::OutOfBoundsIssue::OutOfBoundsIssue ( const ers::Context & context,
ers::severity_t severity,
size_t size,
size_t pos )

Builds a new out-of-bounds issue

Parameters
contextThe Error Reporting System context to be used to identify the spot where this issue was created
severityThe severity of this issue
sizeThe current buffer size
posThe requested position

Definition at line 21 of file OutOfBoundsIssue.cxx.

24 : eformat::Issue( context, severity ) {
25 set_value( BUFFER_SIZE_KEY, size );
26 set_value( REQUESTED_BYTE_KEY, pos );
27 finish_setup( "Requested buffer position is out of bounds" );
28}
void set_value(const std::string &key, uint8_t value)
Sets a value 8 bit unsigned.
severity_t severity() const
severity_t of the issue
void finish_setup(const std::string &message)
Finishes the setup of the Issue.

◆ ~OutOfBoundsIssue() [1/3]

virtual eformat::OutOfBoundsIssue::~OutOfBoundsIssue ( )
throw ( )
inlinevirtual

Destructor virtualisation

Definition at line 43 of file Event/eformat/include/eformat/OutOfBoundsIssue.h.

43{}

◆ OutOfBoundsIssue() [2/3]

eformat::OutOfBoundsIssue::OutOfBoundsIssue ( const ers::Context & context,
ers::severity_t severity,
size_t size,
size_t pos )

Builds a new out-of-bounds issue

Parameters
contextThe Error Reporting System context to be used to identify the spot where this issue was created
severityThe severity of this issue
sizeThe current buffer size
posThe requested position

◆ ~OutOfBoundsIssue() [2/3]

virtual eformat::OutOfBoundsIssue::~OutOfBoundsIssue ( )
throw ( )
inlinevirtual

Destructor virtualisation

Definition at line 43 of file InstallArea/x86_64-el9-gcc13-dbg/include/eformat/OutOfBoundsIssue.h.

43{}

◆ OutOfBoundsIssue() [3/3]

eformat::OutOfBoundsIssue::OutOfBoundsIssue ( const ers::Context & context,
ers::severity_t severity,
size_t size,
size_t pos )

Builds a new out-of-bounds issue

Parameters
contextThe Error Reporting System context to be used to identify the spot where this issue was created
severityThe severity of this issue
sizeThe current buffer size
posThe requested position

◆ ~OutOfBoundsIssue() [3/3]

virtual eformat::OutOfBoundsIssue::~OutOfBoundsIssue ( )
throw ( )
inlinevirtual

Destructor virtualisation

Definition at line 43 of file InstallArea/x86_64-el9-gcc13-opt/include/eformat/OutOfBoundsIssue.h.

43{}

Member Function Documentation

◆ pos() [1/3]

size_t eformat::OutOfBoundsIssue::pos ( void ) const

Access the requested position to access

Definition at line 32 of file OutOfBoundsIssue.cxx.

32{ return get_int_value( REQUESTED_BYTE_KEY ); }
int get_int_value(const std::string &key, int def=0) const
Get a value of the table as an integer.

Referenced by OutOfBoundsIssue().

◆ pos() [2/3]

size_t eformat::OutOfBoundsIssue::pos ( void ) const

Access the requested position to access

◆ pos() [3/3]

size_t eformat::OutOfBoundsIssue::pos ( void ) const

Access the requested position to access

◆ size() [1/3]

size_t eformat::OutOfBoundsIssue::size ( void ) const

Access the size of the initial buffer, in bytes

Definition at line 30 of file OutOfBoundsIssue.cxx.

30{ return get_int_value( BUFFER_SIZE_KEY ); }

Referenced by OutOfBoundsIssue().

◆ size() [2/3]

size_t eformat::OutOfBoundsIssue::size ( void ) const

Access the size of the initial buffer, in bytes

◆ size() [3/3]

size_t eformat::OutOfBoundsIssue::size ( void ) const

Access the size of the initial buffer, in bytes


The documentation for this class was generated from the following files: