7 #ifndef CRYPTOPP_QUEUE_H 8 #define CRYPTOPP_QUEUE_H 36 {
return CurrentSize();}
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;
50 size_t TransferTo2(BufferedTransformation &target,
lword &transferBytes,
const std::string &channel=
DEFAULT_CHANNEL,
bool blocking=
true);
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();
85 :
m_queue(queue), m_node(NULL), m_position(0), m_offset(0), m_lazyString(NULL), m_lazyLength(0)
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;
101 size_t TransferTo2(BufferedTransformation &target,
lword &transferBytes,
const std::string &channel=
DEFAULT_CHANNEL,
bool blocking=
true);
116 void CleanupUsedNodes();
133 : m_bq(bq) {bq.
LazyPut(inString, size);}
Base class for all exceptions thrown by the library.
LazyPutter(ByteQueue &bq, const byte *inString, size_t size)
const byte * m_lazyString
void LazyPutModifiable(byte *inString, size_t size)
use this to make sure LazyPut is finalized in event of exception
Classes providing basic library services.
#define NAMESPACE_BEGIN(x)
Abstract base classes that provide a uniform interface to this library.
std::hash for asio::adress
like LazyPutter, but does a LazyPutModifiable instead
lword MaxRetrievable() const
Provides the number of bytes ready for retrieval.
concurrent_queue< JitTask > m_queue
bool operator==(const ::CryptoPP::OID &lhs, const ::CryptoPP::OID &rhs)
const std::string DEFAULT_CHANNEL
Default channel for BufferedTransformation.
const ByteQueue & m_queue
LazyPutterModifiable(ByteQueue &bq, byte *inString, size_t size)
bool operator!=(const ByteQueue &rhs) const
lword MaxRetrievable() const
Provides the number of bytes ready for retrieval.
const ByteQueueNode * m_node
#define CRYPTOPP_ASSERT(exp)
Data structure used to store byte strings.
bool AnyRetrievable() const
Determines whether bytes are ready for retrieval.
uint8_t const size_t const size
LazyPutter(ByteQueue &bq)
std::vector< char * > parameters
void LazyPut(const byte *inString, size_t size)
lword GetCurrentPosition()
bool m_lazyStringModifiable
Walker(const ByteQueue &queue)
Construct a ByteQueue Walker.
Base class for bufferless filters.
Interface for retrieving values given their names.
NAMESPACE_END void swap(CryptoPP::ByteQueue &a, CryptoPP::ByteQueue &b)