A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/classCDataChunkReader.html below:

NCBI C++ ToolKit: CDataChunkReader Class Reference

Search Toolkit Book for CDataChunkReader

Definition at line 75 of file split_info_utils.cpp.

◆ TChunks ◆ CDataChunkReader() ◆ PendingCount() virtual ERW_Result CDataChunkReader::PendingCount ( size_t *  count ) inlineoverridevirtual

Via parameter "count" (which is guaranteed to be supplied non-NULL) return the number of bytes that are ready to be read from the input device without blocking.

Return eRW_Success if the number of pending bytes has been stored at the location pointed to by "count". Return eRW_NotImplemented if the number cannot be determined. Otherwise, return other eRW_... condition to reflect the problem ("*count" does not need to be updated in the case of non-eRW_Success). Note that if reporting 0 bytes ready, the method may return either both eRW_Success and zero "*count", or return eRW_NotImplemented alone.

Implements IReader.

Definition at line 105 of file split_info_utils.cpp.

References count, eRW_Eof, eRW_Success, x_Advance(), and x_AvaliableCount().

◆ Read() virtual ERW_Result CDataChunkReader::Read ( void *  buf, size_t  count, size_t *  bytes_read = 0  ) inlineoverridevirtual

Read as many as "count" bytes into a buffer pointed to by the "buf" argument.

Always store the number of bytes actually read (0 if read none) via the pointer "bytes_read", if provided non-NULL. Return non-eRW_Success code if EOF / error condition has been encountered during the operation (some data may have been read, nevertheless, and reflected in "*bytes_read"). Special case: if "count" is passed as 0, then the value of "buf" must be ignored, and no change should be made to the state of the input device (but may return non-eRW_Success to indicate that the input device has already been in an error condition).

Note
Apparently, may not return eRW_Success if hasn't been able to read "count" bytes as requested, and "bytes_read" was provided as NULL.
When returning "*bytes_read" as zero for a non-zero "count" requested, the return status should not indicate eRW_Success.
Warning
"*bytes_read" may never be returned greater than "count".
Attention
It is implementation-dependent whether the call blocks until the entire buffer is read or the call returns when at least some data are available. In general, it is advised that this call is made within a loop that checks for EOF condition and proceeds with the reading until the required amount of data has been retrieved.

Implements IReader.

Definition at line 88 of file split_info_utils.cpp.

References buf, count, eRW_Eof, eRW_Success, m_CurrentChunkPos, min(), x_Advance(), x_AvaliableCount(), and x_GetCurrentDataPtr().

◆ x_Advance() bool CDataChunkReader::x_Advance ( ) inlineprivate ◆ x_AvaliableCount() size_t CDataChunkReader::x_AvaliableCount ( ) const inlineprivate ◆ x_GetCurrentDataPtr() const char* CDataChunkReader::x_GetCurrentDataPtr ( ) const inlineprivate ◆ m_CurrentChunk ◆ m_CurrentChunkPos size_t CDataChunkReader::m_CurrentChunkPos private ◆ m_EndOfChunks

The documentation for this class was generated from the following file:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4