eccLib 1.1.0
Python library for bioinformatics written in C
|
Reader base struct. More...
#include <reader.h>
Data Fields | ||
union { | ||
FILE * file | ||
The FILE that is being read. More... | ||
PyObject * fileObj | ||
The file object that is being read using PyFile_GetLine. More... | ||
}; | ||
char * | buff | |
The buffer for getline to write to. | ||
size_t | buffSize | |
The size of the buff, garbage if buff is NULL. | ||
Reader base struct.
This struct holds either a Python file object, or a C FILE pointer. Which is actually used depends on whether buff is NULL. Regardless of that, both use cases allow for iterative line-by-line reading.
union { ... } reader |
char* reader::buff |
The buffer for getline to write to.
size_t reader::buffSize |
The size of the buff, garbage if buff is NULL.
FILE* reader::file |
The FILE that is being read.
During iteration this object is used to access file contents via fgets(). buff is used to store the line read, and buffSize is used to store the size of the buffer.
PyObject* reader::fileObj |
The file object that is being read using PyFile_GetLine.