|
DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
|
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the base class for all arrays in the common language runtime. More...
#include <Array.h>
Public Member Functions | |
| Array ()=default | |
| Initializes an empty Array instance. | |
| Array (Array &&other) noexcept | |
| Move constructor. | |
| Array (const Array &other) | |
| Copy constructor. Performs a deep copy of elements. | |
| Array (const std::initializer_list< T > &vItems) | |
| Initializes an Array from an initializer list of elements. | |
| Array (const T *pData, int iLength) | |
| Initializes an Array by copying elements from a raw pointer buffer. | |
| Array (int iLength) | |
| Initializes an Array of the specified length with default-constructed elements. | |
| ~Array () override | |
| Destroys array elements and releases allocated storage. | |
| T * | begin () |
| Returns an iterator to the first element of the array. | |
| const T * | begin () const |
| Returns a const iterator to the first element of the array. | |
| void | Clear () |
| Sets a range of elements in the Array to the default value of each element type. | |
| void | CopyTo (Array< T > &arrTarget, int iIndex) |
| Copies all elements of the current Array to the specified destination Array starting at the specified destination index. | |
| T * | end () |
| Returns an iterator to the element following the last element of the array. | |
| const T * | end () const |
| Returns a const iterator to the element following the last element of the array. | |
| bool | Exists (const Predicate< T > &fnPredicate) const |
| Determines whether the specified array contains elements that match the conditions defined by the specified predicate. | |
| T | Find (const Predicate< T > &fnPredicate) const |
| Searches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence. | |
| Array< T > | FindAll (const Predicate< T > &fnPredicate) const |
| Retrieves all the elements that match the conditions defined by the specified predicate. | |
| int | FindIndex (const Predicate< T > &fnPredicate) const |
| Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence. | |
| T | FindLast (const Predicate< T > &fnPredicate) const |
| Searches for an element that matches the conditions defined by the specified predicate, and returns the last occurrence. | |
| int | FindLastIndex (const Predicate< T > &fnPredicate) const |
| Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence. | |
| void | ForEach (const Action< T > &fnAction) |
| Performs the specified action on each element of the specified array. | |
| T * | GetData () |
| Gets a pointer to the contiguous internal element buffer. | |
| const T * | GetData () const |
| Gets a const pointer to the contiguous internal element buffer. | |
| int | GetLength () const |
| Gets the total number of elements in all dimensions of the Array. | |
| int | IndexOf (const T &value) const |
| Searches for the specified object and returns the index of its first occurrence. | |
| bool | IsNull () const |
| Checks whether the array has zero length. | |
| int | LastIndexOf (const T &value) const |
| Searches for the specified object and returns the index of the last occurrence. | |
| Array & | operator= (Array &&other) noexcept |
| Move assignment operator. | |
| Array & | operator= (const Array &other) |
| Copy assignment operator. | |
| T & | operator[] (int iIndex) |
| Accesses the element at the specified index. | |
| const T & | operator[] (int iIndex) const |
| Accesses the const element at the specified index. | |
| void | Reverse () |
| Reverses the sequence of the elements in the entire Array. | |
| void | Sort () |
| Sorts the elements in an entire Array using the default comparison. | |
| bool | TrueForAll (const Predicate< T > &fnPredicate) const |
| Determines whether every element in the array matches the conditions defined by the specified predicate. | |
| Public Member Functions inherited from DotNetDupe::System::Object | |
| virtual | ~Object ()=default |
| Virtual destructor ensuring polymorphic cleanup. | |
| virtual bool | Equals (const Object &obj) const |
| Determines whether the specified Object is equal to the current Object. | |
| virtual int | GetHashCode () const |
| Serves as the default hash function. | |
| bool | operator== (const Object &obj) const |
| Determines reference equality between two objects. | |
| char * | ToStringA () const |
| Returns narrow-character string representation. | |
| wchar_t * | ToStringW () const |
| Returns wide-character string representation. | |
Static Public Member Functions | |
| static void | Copy (Array< T > &arrSource, Array< T > &arrDestination, int iLength) |
| Copies a range of elements from an Array starting at the first element and pastes them to another Array starting at the first element. | |
| Static Public Member Functions inherited from DotNetDupe::System::Object | |
| static bool | Equals (const Object &obj1, const Object &obj2) |
| Static helper determining whether two object instances are equal. | |
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the base class for all arrays in the common language runtime.
| T | The element type contained in the array. |
|
default |
Initializes an empty Array instance.
Referenced by Array(), Array(), Copy(), CopyTo(), FindAll(), operator=(), and operator=().
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inlineoverride |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
Copies a range of elements from an Array starting at the first element and pastes them to another Array starting at the first element.
Guard: Validate length boundary against source and destination capacities.
Copy elements across array bounds.
Definition at line 320 of file Array.h.
References DotNetDupe::System::ArgumentException::ArgumentException(), DotNetDupe::System::ArgumentOutOfRangeException::ArgumentOutOfRangeException(), Array(), and GetLength().
|
inline |
Copies all elements of the current Array to the specified destination Array starting at the specified destination index.
Guard: Validate target index boundary.
Copy elements sequentially into target buffer.
Definition at line 308 of file Array.h.
References DotNetDupe::System::ArgumentException::ArgumentException(), DotNetDupe::System::ArgumentOutOfRangeException::ArgumentOutOfRangeException(), Array(), and GetLength().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Gets a pointer to the contiguous internal element buffer.
Definition at line 146 of file Array.h.
Referenced by DotNetDupe::System::IO::MemoryStream::MemoryStream(), DotNetDupe::System::IO::MemoryStream::MemoryStream(), DotNetDupe::System::IO::File::AppendAllLines(), DotNetDupe::System::IO::File::AppendAllText(), DotNetDupe::System::Buffer::BlockCopy(), DotNetDupe::System::Security::Cryptography::ComputeHmacDigests(), DotNetDupe::System::IdentityModel::Tokens::Jwt::ComputeJwtSignature(), DotNetDupe::System::Net::Http::HttpContent::CopyTo(), DotNetDupe::System::IdentityModel::Tokens::Jwt::DecodeBase64UrlToDict(), DotNetDupe::System::IdentityModel::Tokens::Jwt::EncodeDictToBase64Url(), DotNetDupe::System::Buffer::GetByte(), DotNetDupe::System::BitConverter::GetBytes(), DotNetDupe::System::BitConverter::GetBytes(), DotNetDupe::System::BitConverter::GetBytes(), DotNetDupe::System::BitConverter::GetBytes(), DotNetDupe::System::BitConverter::GetBytes(), DotNetDupe::System::BitConverter::GetBytes(), DotNetDupe::System::BitConverter::GetBytes(), DotNetDupe::System::BitConverter::GetBytes(), DotNetDupe::System::Text::UTF8Encoding::GetString(), DotNetDupe::System::Security::Cryptography::PrepareHmacPads(), DotNetDupe::System::IO::BinaryReader::Read(), DotNetDupe::System::Net::Http::ByteArrayContent::ReadAsByteArray(), DotNetDupe::System::Net::Http::StreamContent::ReadAsByteArray(), DotNetDupe::System::Net::Http::StreamContent::ReadAsString(), DotNetDupe::System::IO::BinaryReader::ReadString(), DotNetDupe::System::Net::WebSockets::WebSocket::SendBytes(), DotNetDupe::System::Buffer::SetByte(), DotNetDupe::System::String::Split(), DotNetDupe::System::IO::MemoryStream::ToArray(), DotNetDupe::System::Convert::ToBase64String(), DotNetDupe::System::BitConverter::ToDouble(), DotNetDupe::System::BitConverter::ToInt16(), DotNetDupe::System::BitConverter::ToInt32(), DotNetDupe::System::BitConverter::ToInt64(), DotNetDupe::System::BitConverter::ToSingle(), DotNetDupe::System::BitConverter::ToUInt16(), DotNetDupe::System::BitConverter::ToUInt32(), DotNetDupe::System::BitConverter::ToUInt64(), DotNetDupe::System::IdentityModel::Tokens::Jwt::JWTToken::Verify(), DotNetDupe::System::IO::BinaryWriter::Write(), DotNetDupe::System::IO::File::WriteAllLines(), and DotNetDupe::System::IO::File::WriteAllText().
|
inline |
|
inline |
Gets the total number of elements in all dimensions of the Array.
Definition at line 142 of file Array.h.
Referenced by DotNetDupe::System::Net::Http::ByteArrayContent::ByteArrayContent(), DotNetDupe::System::Guid::Guid(), DotNetDupe::System::IO::MemoryStream::MemoryStream(), DotNetDupe::System::IO::MemoryStream::MemoryStream(), DotNetDupe::System::Collections::Generic::List< T >::AddRange(), DotNetDupe::System::IO::File::AppendAllLines(), DotNetDupe::System::IO::File::AppendAllText(), DotNetDupe::System::Buffer::BlockCopy(), DotNetDupe::System::Buffer::ByteLength(), DotNetDupe::System::Security::Cryptography::ComputeHmacDigests(), Copy(), CopyTo(), DotNetDupe::System::Net::Http::HttpContent::CopyTo(), DotNetDupe::System::IdentityModel::Tokens::Jwt::DecodeBase64UrlToDict(), DotNetDupe::System::Collections::Generic::HashSet< T >::ExceptWith(), DotNetDupe::System::Diagnostics::Process::GetProcessesByName(), DotNetDupe::System::Text::UTF8Encoding::GetString(), DotNetDupe::System::Collections::Generic::HashSet< T >::IntersectWith(), DotNetDupe::System::IdentityModel::Tokens::Jwt::JWTToken::Parse(), DotNetDupe::System::Security::Cryptography::PrepareHmacPads(), DotNetDupe::System::IO::BinaryReader::Read(), DotNetDupe::System::Net::Http::StringContent::ReadAsByteArray(), DotNetDupe::System::Net::Http::StreamContent::ReadAsString(), DotNetDupe::System::Net::WebSockets::WebSocket::SendBytes(), DotNetDupe::System::String::Split(), DotNetDupe::System::String::Split(), DotNetDupe::System::Convert::ToBase64String(), DotNetDupe::System::BitConverter::ToBoolean(), DotNetDupe::System::BitConverter::ToChar(), DotNetDupe::System::BitConverter::ToDouble(), DotNetDupe::System::BitConverter::ToInt16(), DotNetDupe::System::BitConverter::ToInt32(), DotNetDupe::System::BitConverter::ToInt64(), DotNetDupe::System::BitConverter::ToSingle(), DotNetDupe::System::BitConverter::ToString(), DotNetDupe::System::BitConverter::ToString(), DotNetDupe::System::BitConverter::ToString(), DotNetDupe::System::BitConverter::ToUInt16(), DotNetDupe::System::BitConverter::ToUInt32(), DotNetDupe::System::BitConverter::ToUInt64(), DotNetDupe::System::Collections::Generic::HashSet< T >::UnionWith(), DotNetDupe::System::IO::BinaryWriter::Write(), DotNetDupe::System::IO::BinaryWriter::Write(), DotNetDupe::System::IO::File::WriteAllLines(), and DotNetDupe::System::IO::File::WriteAllText().
|
inline |
|
inline |
Checks whether the array has zero length.
Definition at line 166 of file Array.h.
Referenced by DotNetDupe::System::Buffer::BlockCopy(), and DotNetDupe::System::Buffer::ByteLength().
|
inline |
|
inlinenoexcept |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |