| 1 | #include <string> |
| 2 | #include <vector> |
| 3 | |
| 4 | #include "discard_block.hh" |
| 5 | #include "tape_block.hh" |
| 6 | |
| 7 | using namespace std; |
| 8 | |
| 9 | /***************************************************************/ |
| 10 | /*! |
| 11 | *\brief Copy constructor. |
| 12 | */ |
| 13 | discard_block::discard_block(discard_block & org){ |
| 14 | operator=(org); |
| 15 | } |
| 16 | |
| 17 | /***************************************************************/ |
| 18 | /*! |
| 19 | *\brief Get a cleartext description of the block. |
| 20 | *\return ldc style descriptive line for the block |
| 21 | */ |
| 22 | vector<string> discard_block::get_description(){ |
| 23 | string r_string; |
| 24 | switch(init_state){ |
| 25 | case TBS_OK: |
| 26 | r_string="***** (X-XX) Discard block, init_status OK,\ |
| 27 | this is an illegal condition!"; |
| 28 | break; |
| 29 | case TBS_EOF_LEGAL: |
| 30 | r_string=" (EOF) Legal EOF"; |
| 31 | break; |
| 32 | case TBS_EOF_ILLEGAL: |
| 33 | r_string=" (EOF) Illegal EOF while in block!"; |
| 34 | break; |
| 35 | case TBS_CHECKSUM: |
| 36 | r_string=" (CHK) Checksum error in Block!"; |
| 37 | break; |
| 38 | case TBS_IOERR: |
| 39 | r_string=" (IOE) IO-Error during initialisation!"; |
| 40 | break; |
| 41 | case TBS_DEFAULT: |
| 42 | r_string="***** (X-XX) Discard block, init_status not set,\ |
| 43 | this is an illegal condition!"; |
| 44 | break; |
| 45 | default: |
| 46 | r_string="***** (X-XX) Discard block, init_status unknown,\ |
| 47 | this is an illegal condition!"; |
| 48 | break; |
| 49 | } |
| 50 | vector<string> result; |
| 51 | result.insert(result.end(),r_string); |
| 52 | return result; |
| 53 | } |
| 54 | |
| 55 | /***************************************************************/ |
| 56 | /*! |
| 57 | *\brief Specialisation constructor |
| 58 | */ |
| 59 | discard_block::discard_block(tape_block & org) |
| 60 | : tape_block(org) |
| 61 | { |
| 62 | } |
| 63 | |
| 64 | /***************************************************************/ |
| 65 | /*! |
| 66 | *\brief Default constructor. |
| 67 | */ |
| 68 | discard_block::discard_block(){} |