X-Git-Url: http://gitweb.hachti.de/?a=blobdiff_plain;f=pc-tools%2Fldc2%2Fsrc%2Fdiscard_block.cpp;h=ee50ec49bb3c7341a87984c85406d2ac236c77a4;hb=909d36034504f2511a5bc4ef7e50d407964e247a;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hpb=6c06db96fb1c7482f8cb7e1d14eee91603fbb894;p=h316.git diff --git a/pc-tools/ldc2/src/discard_block.cpp b/pc-tools/ldc2/src/discard_block.cpp index e69de29..ee50ec4 100644 --- a/pc-tools/ldc2/src/discard_block.cpp +++ b/pc-tools/ldc2/src/discard_block.cpp @@ -0,0 +1,68 @@ +#include +#include + +#include "discard_block.hh" +#include "tape_block.hh" + +using namespace std; + +/***************************************************************/ +/*! + *\brief Copy constructor. + */ +discard_block::discard_block(discard_block & org){ + operator=(org); +} + +/***************************************************************/ +/*! + *\brief Get a cleartext description of the block. + *\return ldc style descriptive line for the block + */ +vector discard_block::get_description(){ + string r_string; + switch(init_state){ + case TBS_OK: + r_string="***** (X-XX) Discard block, init_status OK,\ + this is an illegal condition!"; + break; + case TBS_EOF_LEGAL: + r_string=" (EOF) Legal EOF"; + break; + case TBS_EOF_ILLEGAL: + r_string=" (EOF) Illegal EOF while in block!"; + break; + case TBS_CHECKSUM: + r_string=" (CHK) Checksum error in Block!"; + break; + case TBS_IOERR: + r_string=" (IOE) IO-Error during initialisation!"; + break; + case TBS_DEFAULT: + r_string="***** (X-XX) Discard block, init_status not set,\ + this is an illegal condition!"; + break; + default: + r_string="***** (X-XX) Discard block, init_status unknown,\ + this is an illegal condition!"; + break; + } + vector result; + result.insert(result.end(),r_string); + return result; +} + +/***************************************************************/ +/*! + *\brief Specialisation constructor + */ +discard_block::discard_block(tape_block & org) + : tape_block(org) +{ +} + +/***************************************************************/ +/*! + *\brief Default constructor. + */ +discard_block::discard_block(){}