Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

AxPipe::CPipeBlock Class Reference

Accept pushed segments n blocks of m bytes at a time (except last). More...

#include <AxPipe.h>

Inheritance diagram for AxPipe::CPipeBlock:

Inheritance graph
Collaboration diagram for AxPipe::CPipeBlock:

Collaboration graph
List of all members.

Public Member Functions

 CPipeBlock ()
 Initialize member variables.

virtual ~CPipeBlock ()
 Destruct additional member data.

CPipeBlockInit (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.

CSegPartialBlock ()
 Get the partial block pointer.

Private Attributes

 Buffer partial blocks, always m_cbBlockSize in size.

size_t m_cbBlockSize
 The size of the blocks in bytes.

Detailed Description

Accept pushed segments n blocks of m bytes at a time (except last).

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.

Member Function Documentation

CPipeBlock * AxPipe::CPipeBlock::Init size_t  cbBlockSize  ) 

Set the size of the blocks to be provided to CPipeBlock::Out().

cbBlockSize The size in bytes of the blocks to be provided.

Definition at line 51 of file CPipeBlock.cpp.

References m_cbBlockSize, and m_pBlockPart.

void AxPipe::CPipeBlock::OutPump CSeg pSeg  )  [virtual]

Internal framework override to handle the blocking.

Ensures that Out() will only be called with segments a multiple of the m_cbBlockSize.

pSeg The segment provided from upstream that we preprocess to ensure the blocking.

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().

CSeg * AxPipe::CPipeBlock::PartialBlock  ) 

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.

Pointer to partial block, or NULL if none.

Definition at line 113 of file CPipeBlock.cpp.

References m_pBlockPart.

The documentation for this class was generated from the following files:
Generated on Mon Feb 2 13:19:27 2004 for AxPipe by doxygen 1.3.5