74
single buf reader can access the data sequentially, or read the data in
multiple passes or via random access. As different parts of the data
are accessed, they are read into memory from the backing file.
A
CNKBackingFileBuf backing file (also called a "data cache file")
contains a packed binary representation of the data values. In order
for a
CNKBackingFileBuf to read an existing data cache file, it must
be set with the same column specification as was used to create it, so it
knows the number of columns, factor levels, etc.
CNKBackingFileBuf::
CNKBackingFileBuf();
virtual ~CNKBackingFileBuf();
virtual void init();
These are the CNKBackingFileBuf constructor, destructor and init()
methods. A
CNKBackingFileBuf object is created with
CNKBackingFileBuf(), then the properties of the columns and the
readers and writers are created, and then
init() is called to initialize
it, which allocates the storage for the buffer data, and opens the
backing file.
CNKBackingFileBuf::
void setBackingFileName(const char* nam);
const char* getBackingFileName();
Access the name of the backing file. If this is set to NULL, an error is
set on
init().
CNKBackingFileBuf::
void setBackingFileTotalRows(INT64 val);
INT64 getBackingFileTotalRows();
Set/get the initial number of rows in the backing file. When using a
CNKBackingFileBuf to write a backing file, this should be set to 0.
When using a
CNKBackingFileBuf to read a backing file, this should
be set to the number of rows of data in the file.
CNKBackingFileBuf::
long getBackingFileRowBytes();
long getBackingFileColumnOffsetBytes(int colNum);
int getBackingFileColumnWidthBytes(int colNum);
Komentáře k této Příručce