Next version of JABA
[jabaws.git] / binaries / src / clustalw / src / general / InvalidCombination.cpp
1 /**
2  * Author: Mark Larkin
3  * 
4  * Copyright (c) 2007 Des Higgins, Julie Thompson and Toby Gibson.  
5  */
6 /**
7  * This class will be used to report invalid combinations of residue type and 
8  * aligntype. Correct values are either 0 or 1.
9  * Note: It will not be possible for a user to cause this exception, only programmer.
10  */
11 #ifdef HAVE_CONFIG_H
12     #include "config.h"
13 #endif
14 #include <ostream>
15 #include <iostream>
16
17 namespace clustalw
18 {
19     class InvalidCombination
20     {
21         public:
22             InvalidCombination(int alignResidueType, int alignType)
23                                 : _alignResidueType(alignResidueType),
24                                   _alignType(alignType) {}
25             void whatHappened(std::ostream &os = std::cerr)
26             {
27                 os << "Incorrect Combination of alignResidueType and alignType.\n"
28                    << "Values should be 0 or 1\n"
29                    << "alignResidueType = " << _alignResidueType << "\n"
30                    << "alignType = " << _alignType << "\n";
31             }
32         private:
33             int _alignResidueType;
34             int _alignType;
35     };
36 }
37
38