+/***************************************************************/
+/*!
+ *\brief Get amount of bytes discarded before beginning
+ * of block sensed.
+ *\return Length of unusable tape before block start delimiter.
+ */
+int tape_block::get_discarded_bytes(){
+ return discarded_bytes;
+}
+
+/***************************************************************/
+/*!
+ *\brief Access internal raw data buffer
+ *
+ * The raw data buffer contains all block data except the
+ * block start and end delimiters.
+ *\return Pointer to internal raw data buffer of the block
+ */
+unsigned char * tape_block::get_raw_data(){
+ return raw_data;
+}
+
+/***************************************************************/
+/*!
+ *\brief Dump contents of the block to a file descriptor.
+ *
+ *\param fd A writable file descriptor.
+ *\return Always zero.
+ *\throw io_error_exception A write error occured.
+ */
+int tape_block::dump_to_fd(int fd){
+ int to_write=raw_size;
+ unsigned char * dump_ptr=raw_data;
+ int written;
+ while (to_write) {
+ written=write(fd,dump_ptr,to_write);
+ if (written < 0) throw io_error_exception();
+ to_write-=written;
+ dump_ptr+=written;
+ }
+ return 0;
+}
+
+/***************************************************************/
+/*!
+ *\brief Determine if the block marks the end of an object
+ *\retval true The block marks the end of an object.
+ *\retval false The block does not mark the end of an object.
+ *\note This is only a virtual method returning always false.
+ * Classes which can be the legal last block of an object
+ * will overwrite this method so that it returns true.
+ */
+bool tape_block::is_endblock(){
+ return false;
+}
+
+/***************************************************************/
+/*!
+ *\brief Get exported symbols.
+ *\return A vector containing any symbols exported in this block.
+ *\note This is only a virtual method returning always an empty
+ * vector. Classes describing appropriate data blocks
+ * will override this method.
+ */
+vector<string> tape_block::get_exported_symbols(){
+ vector<string> result;
+ return result;
+}
+
+/***************************************************************/
+/*!
+ *\brief Get called symbols.
+ *\return A vector containing any symbols called in this block.
+ *\note This is only a virtual method returning always an empty
+ * vector. Classes describing appropriate data blocks
+ * will override this method.
+ */
+vector<string> tape_block::get_called_symbols(){
+ vector<string> result;
+ return result;
+}
+
+/***************************************************************/
+/*!
+ *\brief Dump block contents
+ *\return A vector containing Information about the block's
+ * content.
+ */
+vector<string> tape_block::dump_contents(){
+ vector<string> result;
+ result.insert(result.end(),"No known contents.");
+ return result;
+}
+
+/***************************************************************/
+/*!
+ *\brief Determine if the block has a known type.
+ *\return true if type and subtype are known.
+ *\return false if the block type is not one of the valid end
+ * nodes of the type tree.
+ */
+bool tape_block::has_known_type(){
+ return m_has_known_type;
+}
+
+/***************************************************************/
+/*!
+ *\brief Static factory method for tape blocks.
+ *
+ * This method creates a tape_block by using the private
+ * constructor with file descriptor support.\n
+ *
+ * The factory method tries to determine the block's type and then
+ * looks for appropriate subclasses. If there's an appropriate
+ * subclass fitting the newly-created object, an
+ * object of the subclass will be created and a pointer to this
+ * object will be returned to the caller.\n
+ * This allows for easy use of the object using it's virtual
+ * interface methods or a cast of the pointer to a sub type pointer
+ * according to the type information, and then using the subtype's
+ * methods not already present in tape_block.\n
+ * Objects of the following subclasses are automagically generated:\n
+ * - eot_block
+ * - data_block
+ * - data_block_0
+ * - data_block_0_0
+ * - data_block_0_1
+ * - data_block_0_2
+ * - data_block_0_3
+ * - data_block_0_4
+ * - data_block_0_10
+ * - data_block_0_14
+ * - data_block_0_24
+ * - data_block_0_30
+ * - data_block_0_50
+ * - data_block_0_54
+ * - data_block_0_60
+ * - data_block_0_64
+ * - data_block_1
+ * - data_block_2
+ * - data_block_3
+ * - data_block_4
+ * - data_block_5
+ * - data_block_6
+ * - data_block_7
+ *
+ *\return Pointer to an instance of tape_block or a subclass.
+ *\param fd A file descriptor where data can be read from.
+ *\param input_start A pointer to a function
+ * called before reading data from fd.
+ *\param input_stop A pointer to a function
+ * called after reading data from fd.
+ *
+ *\param start_stop_arg A pointer passed to input_start
+ * and input_stop(). Can be anything.
+ */