bpp-seq3  3.0.0
bpp::BadIntException Class Reference

An alphabet exception thrown when trying to specify a bad int to the alphabet. More...

#include <Bpp/Seq/Alphabet/AlphabetExceptions.h>

+ Inheritance diagram for bpp::BadIntException:
+ Collaboration diagram for bpp::BadIntException:

Public Member Functions

 BadIntException (int badInt, const std::string &text, const Alphabet *alpha)
 Build a new BadIntException. More...
 
 BadIntException (int badInt, const std::string &text, std::shared_ptr< const Alphabet > alpha)
 Build a new BadIntException. More...
 
virtual ~BadIntException ()
 
virtual int getBadInt () const
 Get the integer that threw the exception. More...
 
virtual const AlphabetgetAlphabet () const
 Get the alphabet that threw the exception. More...
 
const char * what () const noexcept override
 
const std::string & message () const noexcept
 

Protected Attributes

int i_
 

Private Attributes

const Alphabetalphabet_
 
std::string message_
 

Detailed Description

An alphabet exception thrown when trying to specify a bad int to the alphabet.

Definition at line 110 of file AlphabetExceptions.h.

Constructor & Destructor Documentation

◆ BadIntException() [1/2]

BadIntException::BadIntException ( int  badInt,
const std::string &  text,
const Alphabet alpha 
)

Build a new BadIntException.

Parameters
badIntThe faulty integer.
textA message to be passed to the exception hierarchy.
alphaA const pointer toward the alphabet that threw the exception.

Definition at line 40 of file AlphabetExceptions.cpp.

References toString().

◆ BadIntException() [2/2]

BadIntException::BadIntException ( int  badInt,
const std::string &  text,
std::shared_ptr< const Alphabet alpha 
)

Build a new BadIntException.

Parameters
badIntThe faulty integer.
textA message to be passed to the exception hierarchy.
alphaA const pointer toward the alphabet that threw the exception.

Definition at line 44 of file AlphabetExceptions.cpp.

References toString().

◆ ~BadIntException()

virtual bpp::BadIntException::~BadIntException ( )
inlinevirtual

Definition at line 133 of file AlphabetExceptions.h.

Member Function Documentation

◆ getAlphabet()

virtual const Alphabet* bpp::AlphabetException::getAlphabet ( ) const
inlinevirtualinherited

Get the alphabet that threw the exception.

Returns
a const pointer toward the alphabet.

Definition at line 65 of file AlphabetExceptions.h.

References bpp::AlphabetException::alphabet_.

◆ getBadInt()

int BadIntException::getBadInt ( ) const
virtual

Get the integer that threw the exception.

Returns
the faulty integer.

Definition at line 48 of file AlphabetExceptions.cpp.

References i_.

Member Data Documentation

◆ alphabet_

const Alphabet* bpp::AlphabetException::alphabet_
privateinherited

◆ i_

int bpp::BadIntException::i_
protected

Definition at line 114 of file AlphabetExceptions.h.

Referenced by getBadInt().


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