#include <AxPipe.h>
Inheritance diagram for AxPipe::CPipeBlock:
Public Member Functions | |
CPipeBlock () | |
Initialize member variables. | |
virtual | ~CPipeBlock () |
Destruct additional member data. | |
CPipeBlock * | Init (size_t cbBlockSize) |
Set the size of the blocks to be provided to CPipeBlock::Out(). | |
void | OutPump (CSeg *pSeg) |
Internal framework override to handle the blocking. | |
CSeg * | PartialBlock () |
Get the partial block pointer. | |
Private Attributes | |
CSeg * | m_pBlockPart |
Buffer partial blocks, always m_cbBlockSize in size. | |
size_t | m_cbBlockSize |
The size of the blocks in bytes. |
Buffer data and work on them in blocks of m bytes. Each segment may be a multiple of m bytes long. This simplifies working with block oriented data streams or processes, such as block ciphers. If there's a partial block, it'll be available from CPipeBlock::BlockPart() when CPipeBlock::OutClose() is called.
Definition at line 350 of file AxPipe.h.
|
Set the size of the blocks to be provided to CPipeBlock::Out().
Definition at line 51 of file CPipeBlock.cpp. References m_cbBlockSize, and m_pBlockPart. |
|
Internal framework override to handle the blocking. Ensures that Out() will only be called with segments a multiple of the m_cbBlockSize.
Reimplemented from AxPipe::CSink. Definition at line 63 of file CPipeBlock.cpp. References AxPipe::CSeg::Clone(), AxPipe::CSeg::Drop(), AxPipe::CSeg::Len(), m_cbBlockSize, m_pBlockPart, AxPipe::CSeg::PtrRd(), AxPipe::CSeg::PtrWr(), and AxPipe::CSeg::Release(). |
|
Get the partial block pointer. Call from your derived OutFlush() and/or OutClose(), depending on your semantics if you want to handle a final partial block.
Definition at line 113 of file CPipeBlock.cpp. References m_pBlockPart. |