Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ByteQueue Class Reference

Byte Queue. More...

#include <queue.h>

Inheritance diagram for ByteQueue:

BufferedTransformation DERGeneralEncoder DERSequenceEncoder DERSetEncoder List of all members.

Public Methods

 ByteQueue (unsigned int m_nodeSize=256)
 ByteQueue (const ByteQueue &copy)
 ~ByteQueue ()
unsigned long MaxRetrievable ()const
 returns number of bytes that is currently ready for retrieval. More...

bool AnyRetrievable ()const
 returns whether any bytes are currently ready for retrieval. More...

void Put (byte inByte)
 input a byte for processing. More...

void Put (const byte *inString,unsigned int length)
 input multiple bytes. More...

unsigned int Get (byte &outByte)
 try to retrieve a single byte. More...

unsigned int Get (byte *outString,unsigned int getMax)
 try to retrieve multiple bytes. More...

unsigned int Peek (byte &outByte)const
 peek at the next byte without removing it from the output buffer. More...

unsigned int Peek (byte *outString,unsigned int peekMax)const
 peek at multiple bytes without removing them from the output buffer. More...

unsigned long Skip (unsigned long skipMax=ULONG_MAX)
 discard skipMax bytes from the output buffer. More...

unsigned long TransferTo (BufferedTransformation &target,unsigned long transferMax=ULONG_MAX)
 move transferMax bytes of the buffered output to target as input. More...

unsigned long CopyTo (BufferedTransformation &target,unsigned long copyMax=ULONG_MAX)const
 copy copyMax bytes of the buffered output to target as input. More...

unsigned long CurrentSize ()const
bool IsEmpty ()const
void Clear ()
void Unget (byte inByte)
void Unget (const byte *inString,unsigned int length)
const byte* Spy (unsigned int &contiguousSize)const
byte* MakeNewSpace (unsigned int &contiguousSize)
void OccupyNewSpace (unsigned int size)
void LazyPut (const byte *inString,unsigned int size)
void FinalizeLazyPut ()
ByteQueue& operator= (const ByteQueue &rhs)
bool operator== (const ByteQueue &rhs)const
byte operator[] (unsigned long i)const
void swap (ByteQueue &rhs)

Friends

class  Walker

Detailed Description

Byte Queue.

Definition at line 16 of file queue.h.


Constructor & Destructor Documentation

ByteQueue::ByteQueue ( unsigned int m_nodeSize = 256 )
 

Definition at line 132 of file queue.cpp.

ByteQueue::ByteQueue ( const ByteQueue & copy )
 

Definition at line 138 of file queue.cpp.

ByteQueue::~ByteQueue ( )
 

Definition at line 160 of file queue.cpp.


Member Function Documentation

bool ByteQueue::AnyRetrievable ( ) const [inline, virtual]
 

returns whether any bytes are currently ready for retrieval.

Reimplemented from BufferedTransformation.

Definition at line 25 of file queue.h.

void ByteQueue::Clear ( )
 

Definition at line 191 of file queue.cpp.

unsigned long ByteQueue::CopyTo ( BufferedTransformation & target,
unsigned long copyMax = ULONG_MAX ) const [virtual]
 

copy copyMax bytes of the buffered output to target as input.

Reimplemented from BufferedTransformation.

Definition at line 320 of file queue.cpp.

Referenced by MessageQueue::CopyTo(), and Peek().

unsigned long ByteQueue::CurrentSize ( ) const
 

Definition at line 176 of file queue.cpp.

Referenced by NetworkSink::Put().

void ByteQueue::FinalizeLazyPut ( )
 

Definition at line 247 of file queue.cpp.

unsigned int ByteQueue::Get ( byte * outString,
unsigned int getMax ) [virtual]
 

try to retrieve multiple bytes.

Reimplemented from BufferedTransformation.

Definition at line 272 of file queue.cpp.

unsigned int ByteQueue::Get ( byte & outByte ) [virtual]
 

try to retrieve a single byte.

Reimplemented from BufferedTransformation.

Definition at line 254 of file queue.cpp.

bool ByteQueue::IsEmpty ( ) const
 

Definition at line 186 of file queue.cpp.

void ByteQueue::LazyPut ( const byte * inString,
unsigned int size )
 

Definition at line 239 of file queue.cpp.

byte * ByteQueue::MakeNewSpace ( unsigned int & contiguousSize )
 

Definition at line 365 of file queue.cpp.

unsigned long ByteQueue::MaxRetrievable ( ) const [inline, virtual]
 

returns number of bytes that is currently ready for retrieval.

All retrieval functions return the actual number of bytes retrieved, which is the lesser of the request number and MaxRetrievable().

Reimplemented from BufferedTransformation.

Definition at line 23 of file queue.h.

void ByteQueue::OccupyNewSpace ( unsigned int size )
 

Definition at line 380 of file queue.cpp.

unsigned int ByteQueue::Peek ( byte * outString,
unsigned int peekMax ) const [virtual]
 

peek at multiple bytes without removing them from the output buffer.

Reimplemented from BufferedTransformation.

Definition at line 291 of file queue.cpp.

unsigned int ByteQueue::Peek ( byte & outByte ) const [virtual]
 

peek at the next byte without removing it from the output buffer.

Reimplemented from BufferedTransformation.

Definition at line 278 of file queue.cpp.

void ByteQueue::Put ( const byte * inString,
unsigned int length ) [virtual]
 

input multiple bytes.

Reimplemented from BufferedTransformation.

Definition at line 211 of file queue.cpp.

void ByteQueue::Put ( byte inByte ) [virtual]
 

input a byte for processing.

Reimplemented from BufferedTransformation.

Definition at line 198 of file queue.cpp.

Referenced by MessageQueue::Put(), and FilterWithInputQueue::Put().

unsigned long ByteQueue::Skip ( unsigned long skipMax = ULONG_MAX ) [virtual]
 

discard skipMax bytes from the output buffer.

Reimplemented from BufferedTransformation.

Definition at line 297 of file queue.cpp.

const byte * ByteQueue::Spy ( unsigned int & contiguousSize ) const
 

Definition at line 353 of file queue.cpp.

unsigned long ByteQueue::TransferTo ( BufferedTransformation & target,
unsigned long transferMax = ULONG_MAX ) [virtual]
 

move transferMax bytes of the buffered output to target as input.

Reimplemented from BufferedTransformation.

Definition at line 302 of file queue.cpp.

Referenced by Get(), DERGeneralEncoder::MessageEnd(), Skip(), and MessageQueue::TransferTo().

void ByteQueue::Unget ( const byte * inString,
unsigned int length )
 

Definition at line 339 of file queue.cpp.

void ByteQueue::Unget ( byte inByte )
 

Definition at line 334 of file queue.cpp.

ByteQueue & ByteQueue::operator= ( const ByteQueue & rhs )
 

Definition at line 386 of file queue.cpp.

bool ByteQueue::operator== ( const ByteQueue & rhs ) const
 

Definition at line 393 of file queue.cpp.

byte ByteQueue::operator[] ( unsigned long i ) const
 

Definition at line 410 of file queue.cpp.

void ByteQueue::swap ( ByteQueue & rhs )
 

Definition at line 424 of file queue.cpp.


Friends And Related Function Documentation

class Walker [friend]
 

Definition at line 94 of file queue.h.


The documentation for this class was generated from the following files:
Generated at Mon Jan 15 01:16:42 2001 for Crypto++ by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000