bpp-seq  2.2.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:

Public Member Functions

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

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() [1/2]

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.

◆ AlphabetMismatchException() [2/2]

bpp::AlphabetMismatchException::AlphabetMismatchException ( const AlphabetMismatchException ame)
inline

Definition at line 173 of file AlphabetExceptions.h.

◆ ~AlphabetMismatchException()

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

Definition at line 182 of file AlphabetExceptions.h.

Member Function Documentation

◆ getAlphabets()

vector< const Alphabet * > AlphabetMismatchException::getAlphabets ( ) const

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_.

◆ operator=()

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

Definition at line 174 of file AlphabetExceptions.h.

References alphabet1_, and alphabet2_.

Member Data Documentation

◆ alphabet1_

const Alphabet* bpp::AlphabetMismatchException::alphabet1_
private

Definition at line 160 of file AlphabetExceptions.h.

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

◆ alphabet2_

const Alphabet * bpp::AlphabetMismatchException::alphabet2_
private

Definition at line 160 of file AlphabetExceptions.h.

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


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