8#include <aws/core/Core_EXPORTS.h>
10#include <aws/core/utils/memory/AWSMemory.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/core/utils/memory/stl/AWSString.h>
13#include <aws/crt/Types.h>
52 Array(
const T* arrayToCopy,
size_t arraySize) :
60 std::copy(arrayToCopy, arrayToCopy + arraySize,
m_data.get());
82 for(
auto& array : toMerge)
84 totalSize += array->m_length;
91 for(
auto& arr : toMerge)
93 if(arr->m_capacity > 0 && arr->m_data)
95 size_t arraySize = arr->m_length;
96 std::copy(arr->m_data.get(), arr->m_data.get() + arraySize,
m_data.get() + location);
97 location += arraySize;
120 m_data(std::move(other.m_data))
122 other.m_capacity = 0;
123 other.m_data =
nullptr;
152 m_data = std::move(other.m_data);
163 std::copy(
string.c_str(),
string.c_str() +
string.length(),
m_data.get());
183 for (
unsigned i = 0; i <
m_length; ++i)
197 return !(*
this == other);
203 return m_data.get()[index];
209 return m_data.get()[index];
273 m_data.reset(other.buffer);
276 other.allocator =
nullptr;
277 other.buffer =
nullptr;
284 m_capacity = other.len;
285 m_length = other.len;
286 m_data.reset(other.buffer);
289 other.allocator =
nullptr;
290 other.buffer =
nullptr;
T & GetItem(size_t index)
Array(const Array &other)
Array & operator=(const Array &other)
Array(const Aws::String &string)
T * GetUnderlyingData() const
Aws::UniqueArrayPtr< T > m_data
bool operator==(const Array &other) const
Array(const T *arrayToCopy, size_t arraySize)
bool operator!=(const Array &other) const
Array(size_t arraySize=0)
void SetLength(size_t len)
T & operator[](size_t index)
Array(Aws::Vector< Array * > &&toMerge)
Array(size_t capacity, size_t length, UniqueArrayPtr< T > data)
Array & operator=(Array &&other) noexcept
Array(Array &&other) noexcept
T const & GetItem(size_t index) const
T const & operator[](size_t index) const
bool operator==(const CryptoBuffer &other) const
CryptoBuffer(const unsigned char *arrayToCopy, size_t arraySize)
CryptoBuffer(CryptoBuffer &&other)
CryptoBuffer(const ByteBuffer &other)
CryptoBuffer(const CryptoBuffer &other)
CryptoBuffer & operator=(const CryptoBuffer &other)
CryptoBuffer(Aws::Vector< ByteBuffer * > &&toMerge)
Array< CryptoBuffer > Slice(size_t sizeOfSlice) const
CryptoBuffer & operator=(CryptoBuffer &&other)
CryptoBuffer & operator=(Crt::ByteBuf &&other) noexcept
bool operator!=(const CryptoBuffer &other) const
CryptoBuffer & operator^(const CryptoBuffer &operand)
CryptoBuffer(size_t arraySize=0)
CryptoBuffer(Crt::ByteBuf &&other) noexcept
Array< unsigned char > ByteBuffer
static const char * ARRAY_ALLOCATION_TAG
std::unique_ptr< T, ArrayDeleter< T > > UniqueArrayPtr
UniqueArrayPtr< T > MakeUniqueArray(std::size_t amount, const char *allocationTag, ArgTypes &&... args)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
AWS_CORE_API aws_allocator * get_aws_allocator()