bpp-core3  3.0.0
bpp::DimensionException Class Reference

Exception thrown when a dimension problem occured. More...

#include <Bpp/Numeric/VectorExceptions.h>

+ Inheritance diagram for bpp::DimensionException:
+ Collaboration diagram for bpp::DimensionException:

Public Member Functions

 DimensionException (const std::string &text, size_t dimension, size_t correctDimension)
 
size_t getDimension () const
 
size_t getCorrectDimension () const
 
const char * what () const noexcept override
 Method to get the message of the exception (STL method redefinition). More...
 
const std::string & message () const noexcept
 Access the message as a std::string. More...
 

Private Attributes

std::size_t dimension_
 
std::size_t correctDimension_
 
std::string message_
 

Detailed Description

Exception thrown when a dimension problem occured.

Definition at line 80 of file VectorExceptions.h.

Constructor & Destructor Documentation

◆ DimensionException()

bpp::DimensionException::DimensionException ( const std::string &  text,
size_t  dimension,
size_t  correctDimension 
)
inline

Definition at line 87 of file VectorExceptions.h.

Member Function Documentation

◆ getCorrectDimension()

size_t bpp::DimensionException::getCorrectDimension ( ) const
inline

Definition at line 94 of file VectorExceptions.h.

References correctDimension_.

◆ getDimension()

size_t bpp::DimensionException::getDimension ( ) const
inline

Definition at line 93 of file VectorExceptions.h.

References dimension_.

◆ message()

const std::string & bpp::Exception::message ( ) const
noexceptinherited

Access the message as a std::string.

Definition at line 119 of file Exceptions.cpp.

References bpp::Exception::message_.

◆ what()

const char * bpp::Exception::what ( ) const
overridenoexceptinherited

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

Returns
The message passed to the exception hierarchy.

Definition at line 118 of file Exceptions.cpp.

References bpp::Exception::message_.

Member Data Documentation

◆ correctDimension_

std::size_t bpp::DimensionException::correctDimension_
private

Definition at line 84 of file VectorExceptions.h.

Referenced by getCorrectDimension().

◆ dimension_

std::size_t bpp::DimensionException::dimension_
private

Definition at line 83 of file VectorExceptions.h.

Referenced by getDimension().

◆ message_

std::string bpp::Exception::message_
privateinherited

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