bpp-seq  2.1.0
bpp::BadCharException Class Reference

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

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

+ Inheritance diagram for bpp::BadCharException:
+ Collaboration diagram for bpp::BadCharException:

List of all members.

Public Member Functions

 BadCharException (const std::string &badChar, const std::string &text="", const Alphabet *alpha=0)
 Build a new BadCharException.
virtual ~BadCharException () throw ()
virtual std::string getBadChar () const
 Get the character that threw the exception.
virtual const AlphabetgetAlphabet () const
 Get the alphabet that threw the exception.
const char * what () const

Protected Attributes

std::string c_
std::string message_

Detailed Description

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

Definition at line 95 of file AlphabetExceptions.h.


Constructor & Destructor Documentation

BadCharException::BadCharException ( const std::string &  badChar,
const std::string &  text = "",
const Alphabet alpha = 0 
)

Build a new BadCharException.

Parameters:
badCharThe faulty character.
textA message to be passed to the exception hierarchy.
alphaA const pointer toward the alphabet that threw the exception.

Definition at line 58 of file AlphabetExceptions.cpp.

virtual bpp::BadCharException::~BadCharException ( ) throw () [inline, virtual]

Definition at line 111 of file AlphabetExceptions.h.


Member Function Documentation

virtual const Alphabet* bpp::AlphabetException::getAlphabet ( ) const [inline, virtual, inherited]

Get the alphabet that threw the exception.

Returns:
a const pointer toward the alphabet.

Definition at line 89 of file AlphabetExceptions.h.

References bpp::AlphabetException::alphabet_.

string BadCharException::getBadChar ( ) const [virtual]

Get the character that threw the exception.

Returns:
the faulty character.

Definition at line 62 of file AlphabetExceptions.cpp.

References c_.


Member Data Documentation

std::string bpp::BadCharException::c_ [protected]

Definition at line 99 of file AlphabetExceptions.h.

Referenced by getBadChar().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Friends