bpp-core  2.2.0
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 298 of file Exceptions.h.

Constructor & Destructor Documentation

◆ IndexOutOfBoundsException()

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.

◆ ~IndexOutOfBoundsException()

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

Definition at line 316 of file Exceptions.h.

Member Function Documentation

◆ getBadIndex()

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

Definition at line 327 of file Exceptions.h.

References badIndex_.

◆ getBounds()

vector< size_t > IndexOutOfBoundsException::getBounds ( ) const

Get the bounds.

Returns
The bounds.

Definition at line 86 of file Exceptions.cpp.

References lowerBound_, and upperBound_.

◆ what()

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 87 of file Exceptions.h.

References bpp::Exception::message_.

Member Data Documentation

◆ badIndex_

size_t bpp::IndexOutOfBoundsException::badIndex_
protected

Definition at line 302 of file Exceptions.h.

Referenced by getBadIndex().

◆ lowerBound_

size_t bpp::IndexOutOfBoundsException::lowerBound_
protected

Definition at line 302 of file Exceptions.h.

Referenced by getBounds().

◆ message_

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

Definition at line 61 of file Exceptions.h.

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

◆ upperBound_

size_t bpp::IndexOutOfBoundsException::upperBound_
protected

Definition at line 302 of file Exceptions.h.

Referenced by getBounds().


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