| 136 | CLI::~CLI() { delete pListener; } |
| 137 | |
| 138 | int CLI::start(void) { |
| 139 | using namespace std; |
| 140 | if (options.has("help")) { |
| 141 | options.putHelpTo(cout); |
| 142 | return ERRCODE_HELP; |
| 143 | } |
| 144 | if (options.has("version")) { |
| 145 | options.putVersionTo(cout); |
| 146 | return ERRCODE_VERSION; |
| 147 | } |
| 148 | string srcFile; |
| 149 | if (options.disassembleFile(srcFile)) { |
| 150 | return disassemble(srcFile); |
| 151 | } |
| 152 | if (options.specFile(srcFile)) { |
| 153 | assembler.loadAnimationSpec(srcFile); |
| 154 | return assemble(); |
| 155 | } |
| 156 | |
| 157 | assembler.setLoops(options.getLoops()); |
| 158 | assembler.setSkipFirst(options.has("skip")); |
| 159 | return assemble(); |
| 160 | } |
| 161 | |
| 162 | int CLI::assemble(void) { |
| 163 | using std::cout; |
no test coverage detected