67
When a CNKMemoryBuf or CNKBackingFileBuf, is passed to one of the
CNKProc::setInputBuf or CNKProc::setOutputBuf methods, this
actually creates an instance of
CNKMemoryBufReader or
CNKBackingFileBufReader (subclasses of CNKBufReader) or
CNKMemoryBufWriter or CNKBackingFileBufWriter (subclasses of
CNKBufWriter). These subclasses implement exactly the same
methods as their parent classes, so it is not normally necessary to be
aware of the exact class created.
CNKBuf Methods The main buffer class is CNKBuf.
CNKBuf::
virtual ~CNKBuf();
virtual void init();
These are the CNKBuf destructor and init() methods. A CNKBuf is
created with new
CNKMemoryBuf() or new CNKBackingFileBuf() (as
described above), 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.
CNKBuf::
virtual int isCNKMemoryBuf();
virtual int isCNKBackingFileBuf();
virtual CNKMemoryBuf* getCNKMemoryBuf();
virtual CNKBackingFileBuf* getCNKBackingFileBuf();
These methods can be used if it is necessary to determine the
particular class used to implement a
CNKBuf. isCNKMemoryBuf() and
isCNKBackingFileBuf() return non-zero if the object is of the
paticular subclass.
getCNKMemoryBuf() and getCNKBackingFileBuf()
return the coerced object if it has the given subclass, otherwise they
return
NULL.
CNKBuf::
virtual int isMultiPass();
virtual int isRandomAccess();
These methods return non-zero if the buf supports multi-pass access,
or random-access by readers. Currently, these both return
1 for
CNKBackingFileBuf, and 0 for CNKMemoryBuf. In the future, there
may be other classes that support multi-pass access but not random-
access.
Comentarios a estos manuales