bpp-seq  2.1.0
bpp::AlphabetMismatchException Class Reference

Exception thrown when two alphabets do not match. More...

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

+ Inheritance diagram for bpp::AlphabetMismatchException:
+ Collaboration diagram for bpp::AlphabetMismatchException:

List of all members.

Public Member Functions

 AlphabetMismatchException (const std::string &text="", const Alphabet *alpha1=0, const Alphabet *alpha2=0)
 Build a new AlphabetMismatchException object.
 AlphabetMismatchException (const AlphabetMismatchException &ame)
AlphabetMismatchExceptionoperator= (const AlphabetMismatchException &ame)
virtual ~AlphabetMismatchException () throw ()
std::vector< const Alphabet * > getAlphabets () const
 Get the alphabets that do not match.
const char * what () const

Protected Attributes

std::string message_

Private Attributes

const Alphabetalphabet1_
const Alphabetalphabet2_

Detailed Description

Exception thrown when two alphabets do not match.

Typically, this may occur when you try to add a bad sequence to a container, or concatenate two kinds of sequences, and so on.

Definition at line 157 of file AlphabetExceptions.h.


Constructor & Destructor Documentation

AlphabetMismatchException::AlphabetMismatchException ( const std::string &  text = "",
const Alphabet alpha1 = 0,
const Alphabet alpha2 = 0 
)

Build a new AlphabetMismatchException object.

Parameters:
textA message to be passed to the exception hierarchy.
alpha1A const pointer toward the first alphabet.
alpha2A const pointer toward the second alphabet, i.e. the one which does not match with the first.

Definition at line 74 of file AlphabetExceptions.cpp.

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

Definition at line 182 of file AlphabetExceptions.h.


Member Function Documentation

Get the alphabets that do not match.

Returns:
a vector of pointers toward the alphabets.

Definition at line 79 of file AlphabetExceptions.cpp.

References alphabet1_, and alphabet2_.

AlphabetMismatchException& bpp::AlphabetMismatchException::operator= ( const AlphabetMismatchException ame) [inline]

Definition at line 174 of file AlphabetExceptions.h.

References alphabet1_, and alphabet2_.


Member Data Documentation

Definition at line 160 of file AlphabetExceptions.h.

Referenced by getAlphabets(), and operator=().

Definition at line 160 of file AlphabetExceptions.h.

Referenced by getAlphabets(), and operator=().


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