SIde-Channel Analysis toolKit (SICAK)
Software toolkit for side-channel analysis
|
A class representing a vector, stored in the machine's free space. More...
#include <types_basic.hpp>
Public Member Functions | |
Vector () | |
Constructs an empty Vector with no elements. Needs to be initialized first (init). | |
Vector (size_t length) | |
Constructs a Vector with 'length' elements. | |
Vector (size_t length, T initVal) | |
Constructs a Vector with 'length' elements and fills it with 'initVal'. | |
Vector (Vector &&other) | |
Move constructor. | |
Vector & | operator= (Vector &&other) |
Move assignment operator. | |
virtual | ~Vector () |
Empty destructor. | |
virtual size_t | length () const |
Returns number of elements in the container. | |
virtual size_t | size () const |
Returns the size of the contained data (i.e. length * sizeof(T)) | |
virtual void | init (size_t length) |
Initializes the vector with a specified number of elements. | |
virtual void | init (size_t length, T initVal) |
Initializes the vector with a specified number of elements and fills it with 'val'. | |
virtual void | fill (T val) |
Fills the container with the 'val'. | |
virtual T * | data () |
Returns a pointer to the contained data. | |
virtual const T * | data () const |
Returns a const pointer to the contained data. | |
T & | operator() (size_t index) |
Accesses an element in the vector. Doesn't check for bounds. | |
const T & | operator() (size_t index) const |
Accesses an element in the vector. Doesn't check for bounds. | |
Public Member Functions inherited from VectorType< T > | |
virtual | ~VectorType () |
Empty destructor. | |
Public Member Functions inherited from ArrayType< T > | |
virtual | ~ArrayType () |
Empty destructor. | |
Public Member Functions inherited from DataType | |
virtual | ~DataType () |
Empty destructor. | |
Protected Attributes | |
std::unique_ptr< T[]> | m_data |
Unique_ptr holding the allocated space. | |
size_t | m_length |
The number of elements in the vector. | |
size_t | m_capacity |
Additional Inherited Members | |
Protected Member Functions inherited from VectorType< T > | |
VectorType () | |
Protected constructor. | |
Protected Member Functions inherited from ArrayType< T > | |
ArrayType () | |
Protected constructor. | |
Protected Member Functions inherited from DataType | |
DataType () | |
Protected constructor. | |
A class representing a vector, stored in the machine's free space.