Crypto++
5.6.5
Free C++ class library of cryptographic schemes
|
Go to the documentation of this file.
7 #ifndef CRYPTOPP_QUEUE_H
8 #define CRYPTOPP_QUEUE_H
36 {
return CurrentSize();}
41 byte * CreatePutSpace(
size_t &size);
42 size_t Put2(
const byte *inString,
size_t length,
int messageEnd,
bool blocking);
44 size_t Get(
byte &outByte);
45 size_t Get(
byte *outString,
size_t getMax);
47 size_t Peek(
byte &outByte)
const;
48 size_t Peek(
byte *outString,
size_t peekMax)
const;
54 void SetNodeSize(
size_t nodeSize);
56 lword CurrentSize()
const;
61 void Unget(
byte inByte);
62 void Unget(
const byte *inString,
size_t length);
64 const byte * Spy(
size_t &contiguousSize)
const;
66 void LazyPut(
const byte *inString,
size_t size);
67 void LazyPutModifiable(
byte *inString,
size_t size);
68 void UndoLazyPut(
size_t size);
69 void FinalizeLazyPut();
74 byte operator[](lword i)
const;
85 : m_queue(queue), m_node(NULL), m_position(0), m_offset(0), m_lazyString(NULL), m_lazyLength(0)
88 lword GetCurrentPosition() {
return m_position;}
91 {
return m_queue.CurrentSize() - m_position;}
95 size_t Get(
byte &outByte);
96 size_t Get(
byte *outString,
size_t getMax);
98 size_t Peek(
byte &outByte)
const;
99 size_t Peek(
byte *outString,
size_t peekMax)
const;
109 const byte *m_lazyString;
116 void CleanupUsedNodes();
125 bool m_lazyStringModifiable;
133 : m_bq(bq) {bq.LazyPut(inString, size);}
147 :
LazyPutter(bq) {bq.LazyPutModifiable(inString, size);}
154 template<>
inline void swap(CryptoPP::ByteQueue &a, CryptoPP::ByteQueue &b)
use this to make sure LazyPut is finalized in event of exception
lword MaxRetrievable() const
Provides the number of bytes ready for retrieval.
Data structure used to store byte strings.
Walker(const ByteQueue &queue)
Construct a ByteQueue Walker.
#define CRYPTOPP_ASSERT(exp)
Debugging and diagnostic assertion.
const std::string DEFAULT_CHANNEL
Default channel for BufferedTransformation.
Classes providing basic library services.
Base class for all exceptions thrown by the library.
bool operator==(const OID &lhs, const OID &rhs)
Compare two OIDs for equality.
like LazyPutter, but does a LazyPutModifiable instead
lword MaxRetrievable() const
Provides the number of bytes ready for retrieval.
Base class for bufferless filters.
bool AnyRetrievable() const
Determines whether bytes are ready for retrieval.
Crypto++ library namespace.
bool operator!=(const OID &lhs, const OID &rhs)
Compare two OIDs for inequality.
Interface for retrieving values given their names.
Abstract base classes that provide a uniform interface to this library.