deps/kb_meme/meme-5.0.1/src/data-block-reader.c
/******************************************************************************
 * This function creates an instance of the data block reader UDT.
 * It is only intended to be called by the actual implemenations of the data 
 * block reader interface.
 *
 * Returns a pointer to an instance of a data block reader UDT.
 *****************************************************************************/
This function creates an instance of the data block reader UDT.
It is only intended to be called by the actual implemenations of the data
block reader interface.

Returns a pointer to an instance of a data block reader UDT.
This function creates an instance of the data block reader UDT . It is only intended to be called by the actual implemenations of the data block reader interface . Returns a pointer to an instance of a data block reader UDT .
DATA_BLOCK_READER_T *new_data_block_reader(
  void *data,
  void (*free)(DATA_BLOCK_READER_T *reader),
  bool (*close)(DATA_BLOCK_READER_T *reader),
  bool (*reset)(DATA_BLOCK_READER_T *reader),
  bool (*is_eof)(DATA_BLOCK_READER_T *reader),
  bool (*get_next_block)(
    DATA_BLOCK_READER_T *reader, 
    DATA_BLOCK_T *data_block 
  ),
  bool (*unget_block)(DATA_BLOCK_READER_T *reader),
  bool (*go_to_next_sequence)(DATA_BLOCK_READER_T *reader),
  bool (*get_seq_name)(DATA_BLOCK_READER_T *reader, char **sequence)
) {
  DATA_BLOCK_READER_T *reader = mm_malloc(sizeof(DATA_BLOCK_READER_T) * 1);
  reader->data = data;
  reader->free = free;
  reader->close = close;
  reader->reset = reset;
  reader->is_eof = is_eof;
  reader->get_next_block = get_next_block;
  reader->unget_block = unget_block;
  reader->go_to_next_sequence = go_to_next_sequence;
  reader->get_seq_name = get_seq_name;
  return reader;
}
DATA_BLOCK_READER_T * new_data_block_reader ( void * data , void ( * free ) ( DATA_BLOCK_READER_T * reader ) , bool ( * close ) ( DATA_BLOCK_READER_T * reader ) , bool ( * reset ) ( DATA_BLOCK_READER_T * reader ) , bool ( * is_eof ) ( DATA_BLOCK_READER_T * reader ) , bool ( * get_next_block ) ( DATA_BLOCK_READER_T * reader , DATA_BLOCK_T * data_block ) , bool ( * unget_block ) ( DATA_BLOCK_READER_T * reader ) , bool ( * go_to_next_sequence ) ( DATA_BLOCK_READER_T * reader ) , bool ( * get_seq_name ) ( DATA_BLOCK_READER_T * reader , char * * sequence ) ) { DATA_BLOCK_READER_T * reader = mm_malloc ( sizeof ( DATA_BLOCK_READER_T ) * 1 ) ; reader -> data = data ; reader -> free = free ; reader -> close = close ; reader -> reset = reset ; reader -> is_eof = is_eof ; reader -> get_next_block = get_next_block ; reader -> unget_block = unget_block ; reader -> go_to_next_sequence = go_to_next_sequence ; reader -> get_seq_name = get_seq_name ; return reader ; }
This function creates an instance of the data block reader UDT.
This function creates an instance of the data block reader UDT .