bpp-core  2.1.0
 All Classes Namespaces Files Functions Variables Typedefs Friends
bpp::IndexOutOfBoundsException Class Reference

Index out of bounds exception class. More...

#include <Bpp/Exceptions.h>

+ Inheritance diagram for bpp::IndexOutOfBoundsException:
+ Collaboration diagram for bpp::IndexOutOfBoundsException:

Public Member Functions

 IndexOutOfBoundsException (const std::string &text, size_t badInt, size_t lowerBound, size_t upperBound)
 Build a new IndexOutOfBoundsException. More...
 
virtual ~IndexOutOfBoundsException () throw ()
 
std::vector< size_t > getBounds () const
 Get the bounds. More...
 
size_t getBadIndex () const
 
const char * what () const throw ()
 Method to get the message of the exception (STL method redefinition). More...
 

Protected Attributes

size_t badIndex_
 
size_t lowerBound_
 
size_t upperBound_
 
std::string message_
 

Detailed Description

Index out of bounds exception class.

Definition at line 297 of file Exceptions.h.

Constructor & Destructor Documentation

IndexOutOfBoundsException::IndexOutOfBoundsException ( const std::string &  text,
size_t  badInt,
size_t  lowerBound,
size_t  upperBound 
)

Build a new IndexOutOfBoundsException.

Parameters
textA message to be passed to the exception hierarchy.
badIntThe faulty integer.
lowerBoundLower limit.
upperBoundUpper limit.

Definition at line 80 of file Exceptions.cpp.

virtual bpp::IndexOutOfBoundsException::~IndexOutOfBoundsException ( ) throw ()
inlinevirtual

Definition at line 315 of file Exceptions.h.

Member Function Documentation

size_t bpp::IndexOutOfBoundsException::getBadIndex ( ) const
inline

Definition at line 326 of file Exceptions.h.

References badIndex_.

vector< size_t > IndexOutOfBoundsException::getBounds ( ) const

Get the bounds.

Returns
The bounds.

Definition at line 86 of file Exceptions.cpp.

References lowerBound_, and upperBound_.

const char* bpp::Exception::what ( ) const throw ()
inlineinherited

Method to get the message of the exception (STL method redefinition).

Returns
The message passed to the exception hierarchy.

Definition at line 86 of file Exceptions.h.

References bpp::Exception::message_.

Member Data Documentation

size_t bpp::IndexOutOfBoundsException::badIndex_
protected

Definition at line 301 of file Exceptions.h.

Referenced by getBadIndex().

size_t bpp::IndexOutOfBoundsException::lowerBound_
protected

Definition at line 301 of file Exceptions.h.

Referenced by getBounds().

std::string bpp::Exception::message_
protectedinherited

Definition at line 60 of file Exceptions.h.

Referenced by bpp::Exception::what().

size_t bpp::IndexOutOfBoundsException::upperBound_
protected

Definition at line 301 of file Exceptions.h.

Referenced by getBounds().


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