#ifndef TAPE_BLOCK_H
#define TAPE_BLOCK_H
+#include <string>
+#include <vector>
+
+using namespace std;
+
/*!
*\brief Tape data block base class.
*
} tb_type_t;
public: // methods
-
- static tape_block *
- gen_from_fd(int fd,
- void(*input_start)(void *)=0,
- void (*input_stop)(void *)=0,
- void * start_stop_arg=0
- );
-
virtual ~tape_block();
+
+ tape_block(tape_block &);
+ void operator=(tape_block &);
+
tb_state_t get_state();
- int get_raw_size();
- unsigned char * get_raw_data();
virtual int get_type();
virtual int get_subtype();
-
-protected: // methods
- tape_block(tape_block &);
-
-private: // methods
-
+ virtual vector<string> get_description();
+ int get_raw_size();
+ int get_discarded_bytes();
+ unsigned char * get_raw_data();
+
+ static tape_block * gen_from_fd(int fd,
+ void(*input_start)(void *)=0,
+ void (*input_stop)(void *)=0,
+ void * start_stop_arg=0
+ );
-private: // methods
+protected: // methods
tape_block();
+ string get_typestring();
+
+private: // methods
tape_block (int fd_p,
void(*input_start)(void *)=0,
void (*input_stop)(void *)=0,
void * start_stop_arg=0
);
+
int init_words(void);
int test_checksum();
protected: // members
int block_type; //!< Type of this block.
tb_state_t init_state; //!< Initialisation state.
- int data_read; //!< Total data consumption during intialisation.
+ int discarded_bytes; //!< Amount of bytes discarded before beginning.
unsigned char * raw_data; //!< Raw block data in bytes.
int raw_size; //!< Size of the raw data.
unsigned short * word_data; //!< Data organized in machine words.
int word_size; //!< Size of the blocks in machine words.
-
-}; // tape_block
+ int poolsize; //!< Amount of data malloc'ed
+}; // class tape_block
#endif