| 1 | /* |
|---|
| 2 | Copyright (c) 2006-2018 Elmar Pruesse <elmar.pruesse@ucdenver.edu> |
|---|
| 3 | |
|---|
| 4 | This file is part of SINA. |
|---|
| 5 | SINA is free software: you can redistribute it and/or modify it under |
|---|
| 6 | the terms of the GNU General Public License as published by the Free |
|---|
| 7 | Software Foundation, either version 3 of the License, or (at your |
|---|
| 8 | option) any later version. |
|---|
| 9 | |
|---|
| 10 | SINA is distributed in the hope that it will be useful, but WITHOUT ANY |
|---|
| 11 | WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 12 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|---|
| 13 | for more details. |
|---|
| 14 | |
|---|
| 15 | You should have received a copy of the GNU General Public License |
|---|
| 16 | along with SINA. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 17 | |
|---|
| 18 | Additional permission under GNU GPL version 3 section 7 |
|---|
| 19 | |
|---|
| 20 | If you modify SINA, or any covered work, by linking or combining it |
|---|
| 21 | with components of ARB (or a modified version of that software), |
|---|
| 22 | containing parts covered by the terms of the |
|---|
| 23 | ARB-public-library-license, the licensors of SINA grant you additional |
|---|
| 24 | permission to convey the resulting work. Corresponding Source for a |
|---|
| 25 | non-source form of such a combination shall include the source code |
|---|
| 26 | for the parts of ARB used as well as that of the covered work. |
|---|
| 27 | */ |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | #ifndef _ALIGN_H_ |
|---|
| 31 | #define _ALIGN_H_ |
|---|
| 32 | |
|---|
| 33 | #include "tray.h" |
|---|
| 34 | |
|---|
| 35 | #include <vector> |
|---|
| 36 | #include <boost/program_options.hpp> |
|---|
| 37 | |
|---|
| 38 | namespace sina { |
|---|
| 39 | |
|---|
| 40 | /** Parameter Types |
|---|
| 41 | **/ |
|---|
| 42 | enum OVERHANG_TYPE { |
|---|
| 43 | OVERHANG_ATTACH, |
|---|
| 44 | OVERHANG_REMOVE, |
|---|
| 45 | OVERHANG_EDGE |
|---|
| 46 | }; |
|---|
| 47 | std::ostream& operator<<(std::ostream& out, const sina::OVERHANG_TYPE& t); |
|---|
| 48 | void validate(boost::any& v, const std::vector<std::string>& values, |
|---|
| 49 | sina::OVERHANG_TYPE* /*unused*/, int /*unused*/); |
|---|
| 50 | |
|---|
| 51 | enum LOWERCASE_TYPE { |
|---|
| 52 | LOWERCASE_NONE, |
|---|
| 53 | LOWERCASE_ORIGINAL, |
|---|
| 54 | LOWERCASE_UNALIGNED |
|---|
| 55 | }; |
|---|
| 56 | std::ostream& operator<<(std::ostream& out, const sina::LOWERCASE_TYPE& t); |
|---|
| 57 | void validate(boost::any& v, const std::vector<std::string>& values, |
|---|
| 58 | sina::LOWERCASE_TYPE* /*unused*/, int /*unused*/); |
|---|
| 59 | |
|---|
| 60 | enum INSERTION_TYPE { |
|---|
| 61 | INSERTION_SHIFT, |
|---|
| 62 | INSERTION_FORBID, |
|---|
| 63 | INSERTION_REMOVE |
|---|
| 64 | }; |
|---|
| 65 | std::ostream& operator<<(std::ostream& out, const sina::INSERTION_TYPE& t); |
|---|
| 66 | void validate(boost::any& v, const std::vector<std::string>& values, |
|---|
| 67 | sina::INSERTION_TYPE* /*unused*/, int /*unused*/); |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | class aligner { |
|---|
| 71 | struct options; |
|---|
| 72 | public: |
|---|
| 73 | static struct options *opts; |
|---|
| 74 | aligner(); |
|---|
| 75 | aligner(const aligner& rhs); |
|---|
| 76 | ~aligner(); |
|---|
| 77 | aligner& operator=(const aligner& rhs); |
|---|
| 78 | tray operator()(tray t); |
|---|
| 79 | |
|---|
| 80 | static void get_options_description(boost::program_options::options_description& all, |
|---|
| 81 | boost::program_options::options_description& adv); |
|---|
| 82 | static void validate_vm(boost::program_options::variables_map& /*unused*/, |
|---|
| 83 | boost::program_options::options_description& /*unused*/); |
|---|
| 84 | }; |
|---|
| 85 | |
|---|
| 86 | |
|---|
| 87 | } // namespace sina |
|---|
| 88 | |
|---|
| 89 | |
|---|
| 90 | #endif // _ALIGN_H |
|---|
| 91 | |
|---|
| 92 | /* |
|---|
| 93 | Local Variables: |
|---|
| 94 | mode:c++ |
|---|
| 95 | c-file-style:"stroustrup" |
|---|
| 96 | c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . 0)) |
|---|
| 97 | indent-tabs-mode:nil |
|---|
| 98 | fill-column:99 |
|---|
| 99 | End: |
|---|
| 100 | */ |
|---|
| 101 | // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : |
|---|