Crypto++ 8.7
Free C++ class library of cryptographic schemes
Public Member Functions | List of all members
SecBlockWithHint< T, S, A > Class Template Reference

Stack-based SecBlock that grows into the heap. More...

#include <secblock.h>

+ Inheritance diagram for SecBlockWithHint< T, S, A >:

Public Member Functions

 SecBlockWithHint (size_t size)
 construct a SecBlockWithHint with a count of elements More...
 
- Public Member Functions inherited from SecBlock< T, FixedSizeAllocatorWithCleanup< T, S, AllocatorWithCleanup< T > > >
 SecBlock (size_type size=0)
 Construct a SecBlock with space for size elements. More...
 
 SecBlock (const SecBlock< T, FixedSizeAllocatorWithCleanup< T, S, AllocatorWithCleanup< T > > > &t)
 Copy construct a SecBlock from another SecBlock. More...
 
 SecBlock (const T *ptr, size_type len)
 Construct a SecBlock from an array of elements. More...
 
 operator const void * () const
 Cast operator. More...
 
 operator void * ()
 Cast operator. More...
 
 operator const T * () const
 Cast operator. More...
 
 operator T* ()
 Cast operator. More...
 
iterator begin ()
 Provides an iterator pointing to the first element in the memory block. More...
 
const_iterator begin () const
 Provides a constant iterator pointing to the first element in the memory block. More...
 
iterator end ()
 Provides an iterator pointing beyond the last element in the memory block. More...
 
const_iterator end () const
 Provides a constant iterator pointing beyond the last element in the memory block. More...
 
A::pointer data ()
 Provides a pointer to the first element in the memory block. More...
 
A::const_pointer data () const
 Provides a pointer to the first element in the memory block. More...
 
size_type size () const
 Provides the count of elements in the SecBlock. More...
 
bool empty () const
 Determines if the SecBlock is empty. More...
 
byteBytePtr ()
 Provides a byte pointer to the first element in the memory block. More...
 
const byteBytePtr () const
 Return a byte pointer to the first element in the memory block. More...
 
size_type SizeInBytes () const
 Provides the number of bytes in the SecBlock. More...
 
void Assign (const T *ptr, size_type len)
 Set contents and size from an array. More...
 
void Assign (size_type count, T value)
 Set contents from a value. More...
 
void Assign (const SecBlock< T, FixedSizeAllocatorWithCleanup< T, S, AllocatorWithCleanup< T > > > &t)
 Copy contents from another SecBlock. More...
 
void Append (const T *ptr, size_type len)
 Append contents from an array. More...
 
void Append (const SecBlock< T, FixedSizeAllocatorWithCleanup< T, S, AllocatorWithCleanup< T > > > &t)
 Append contents from another SecBlock. More...
 
void Append (size_type count, T value)
 Append contents from a value. More...
 
void SetMark (size_t count)
 Sets the number of elements to zeroize. More...
 
SecBlock< T, FixedSizeAllocatorWithCleanup< T, S, AllocatorWithCleanup< T > > > & operator= (const SecBlock< T, FixedSizeAllocatorWithCleanup< T, S, AllocatorWithCleanup< T > > > &t)
 Assign contents from another SecBlock. More...
 
SecBlock< T, FixedSizeAllocatorWithCleanup< T, S, AllocatorWithCleanup< T > > > & operator+= (const SecBlock< T, FixedSizeAllocatorWithCleanup< T, S, AllocatorWithCleanup< T > > > &t)
 Append contents from another SecBlock. More...
 
SecBlock< T, FixedSizeAllocatorWithCleanup< T, S, AllocatorWithCleanup< T > > > operator+ (const SecBlock< T, FixedSizeAllocatorWithCleanup< T, S, AllocatorWithCleanup< T > > > &t)
 Construct a SecBlock from this and another SecBlock. More...
 
bool operator== (const SecBlock< T, FixedSizeAllocatorWithCleanup< T, S, AllocatorWithCleanup< T > > > &t) const
 Bitwise compare two SecBlocks. More...
 
bool operator!= (const SecBlock< T, FixedSizeAllocatorWithCleanup< T, S, AllocatorWithCleanup< T > > > &t) const
 Bitwise compare two SecBlocks. More...
 
void New (size_type newSize)
 Change size without preserving contents. More...
 
void CleanNew (size_type newSize)
 Change size without preserving contents. More...
 
void Grow (size_type newSize)
 Change size and preserve contents. More...
 
void CleanGrow (size_type newSize)
 Change size and preserve contents. More...
 
void resize (size_type newSize)
 Change size and preserve contents. More...
 
void swap (SecBlock< T, FixedSizeAllocatorWithCleanup< T, S, AllocatorWithCleanup< T > > > &b)
 Swap contents with another SecBlock. More...
 

Additional Inherited Members

- Public Types inherited from SecBlock< T, FixedSizeAllocatorWithCleanup< T, S, AllocatorWithCleanup< T > > >
typedef A::value_type value_type
 
typedef A::pointer iterator
 
typedef A::const_pointer const_iterator
 
typedef A::size_type size_type
 
- Static Public Attributes inherited from SecBlock< T, FixedSizeAllocatorWithCleanup< T, S, AllocatorWithCleanup< T > > >
static const size_type ELEMS_MAX
 Returns the maximum number of elements the block can hold. More...
 

Detailed Description

template<class T, unsigned int S, class A = FixedSizeAllocatorWithCleanup<T, S, AllocatorWithCleanup<T> >>
class SecBlockWithHint< T, S, A >

Stack-based SecBlock that grows into the heap.

Template Parameters
Tclass or type
Sfixed-size of the stack-based memory block, in elements
AAllocatorBase derived class for allocation and cleanup

Definition at line 1267 of file secblock.h.

Constructor & Destructor Documentation

◆ SecBlockWithHint()

template<class T , unsigned int S, class A = FixedSizeAllocatorWithCleanup<T, S, AllocatorWithCleanup<T> >>
SecBlockWithHint< T, S, A >::SecBlockWithHint ( size_t  size)
inlineexplicit

construct a SecBlockWithHint with a count of elements

Definition at line 1271 of file secblock.h.


The documentation for this class was generated from the following file: