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