System::Collections::Generic::ListExt< T > Class Template Reference

generic List class that implements IListWrapper interface More...

Inherits System::Collections::Generic::List< T >, and System::Collections::IListWrapper.

Public Types

typedef System::Collections::Generic::ListExt< T > ThisType
 
typedef System::Collections::Generic::List< T > ListType
 
typedef System::BaseTypesInfo< System::ObjectBaseTypes
 
typedef T ValueType
 
typedef List< T > BaseType
 
- Public Types inherited from System::Collections::Generic::List< T >
typedef T ValueType
 This type. More...
 
typedef IList< T > BaseType
 Interface type. More...
 
typedef std::vector< T, ASPOSE_COLLECTION_ALLOCATOR_TYPE > vector_t
 Underlying data type. More...
 
typedef vector_t::iterator iterator
 Iterator type. More...
 
typedef vector_t::const_iterator const_iterator
 Const iterator type. More...
 
typedef vector_t::reverse_iterator reverse_iterator
 Reverse iterator type. More...
 
typedef vector_t::const_reverse_iterator const_reverse_iterator
 Const reverse iterator type. More...
 
typedef SharedPtr< IEnumerable< T > > IEnumerablePtr
 Container holding elements of same type we hold. More...
 
typedef SharedPtr< IEnumerator< T > > IEnumeratorPtr
 Enumerator type. More...
 
- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
- Public Types inherited from System::Collections::Generic::IList< T >
typedef ICollection< T > BaseType
 Base type. More...
 
typedef IList< T > ThisType
 This type. More...
 
typedef T ValueType
 Value type. More...
 
- Public Types inherited from System::Collections::Generic::ICollection< T >
typedef T ValueType
 Value type name. More...
 
typedef ICollection< T > ThisType
 Collection type name. More...
 
- Public Types inherited from System::Collections::Generic::IEnumerable< T >
typedef IEnumerator< T > IEnumeratorType
 Enumerator type. More...
 
using ValueType = T
 
using iterator = System::Details::VirtualizedIterator< T >
 Iterator type. More...
 
using const_iterator = System::Details::VirtualizedConstIterator< T >
 Const iterator type. More...
 
using virtualized_iterator = System::Details::VirtualizedIteratorBase< T >
 Inner iterator base type. More...
 
using virtualized_iterator_element = T
 Inner iterator element type. More...
 

Public Member Functions

System::SharedPtr< System::Collections::IListCreateIListWrapper () override
 IListWrapper interface implementation. More...
 
template<typename T1 >
std::enable_if< System::IsSmartPtr< T1 >::value, System::SharedPtr< System::Collections::IList > >::type CreateIListWrapperImpl ()
 IListWrapper implementation helper for reference types. More...
 
template<typename T1 >
std::enable_if<!System::IsSmartPtr< T1 >::value &&System::IsBoxable< T1 >::value, System::SharedPtr< System::Collections::IList > >::type CreateIListWrapperImpl ()
 IListWrapper implementation helper for value types. More...
 
template<typename T1 >
std::enable_if<!System::IsSmartPtr< T1 >::value &&!System::IsBoxable< T >::value, System::SharedPtr< System::Collections::IList > >::type CreateIListWrapperImpl ()
 IListWrapper implementation helper for other types. More...
 
- Public Member Functions inherited from System::Collections::Generic::List< T >
 List ()
 Creates empty list. More...
 
 List (int capacity)
 
 List (IEnumerablePtr collection)
 
void AddInitializer (int size, const T inits[])
 
iterator begin () noexcept
 
iterator end () noexcept
 
const_iterator begin () const noexcept
 
const_iterator end () const noexcept
 
const_iterator cbegin () const noexcept
 
const_iterator cend () const noexcept
 
reverse_iterator rbegin () noexcept
 
reverse_iterator rend () noexcept
 
const_reverse_iterator rbegin () const noexcept
 
const_reverse_iterator rend () const noexcept
 
const_reverse_iterator crbegin () const noexcept
 
const_reverse_iterator crend () const noexcept
 
IEnumeratorPtr GetEnumerator () override
 
int get_Count () const override
 
void Add (const T &item) override
 
void Clear () override
 Deletes all elements. More...
 
bool Contains (const T &item) const override
 
bool Remove (const T &item) override
 
void CopyTo (System::ArrayPtr< T > array, int arrayIndex) override
 
int IndexOf (const T &item) const override
 
void Insert (int index, const T &item) override
 
void RemoveAt (int index) override
 
idx_get (int index) const override
 
void idx_set (int index, T value) override
 
int get_Capacity () const
 
void set_Capacity (int capacity)
 
void AddRange (IEnumerablePtr collection)
 
SharedPtr< System::Collections::ObjectModel::ReadOnlyCollection< T > > AsReadOnly ()
 
int BinarySearch (const T &item) const
 
int BinarySearch (const T &item, const SharedPtr< System::Collections::Generic::IComparer< T > > &comparer) const
 
int BinarySearch (int index, int count, const T &item, const SharedPtr< System::Collections::Generic::IComparer< T > > &comparer) const
 
template<typename OutputType >
SharedPtr< List< OutputType > > ConvertAll (Converter< T, OutputType > converter)
 
void CopyTo (const System::ArrayPtr< T > &array)
 
void CopyTo (int index, const System::ArrayPtr< T > &array, int arrayIndex, int count)
 
bool Exists (System::Predicate< T > match)
 
Find (System::Predicate< T > predicate)
 
ListPtr< T > FindAll (System::Predicate< T > match)
 
int FindIndex (System::Predicate< T > match)
 
int FindIndex (int startIndex, System::Predicate< T > match)
 
int FindIndex (int startIndex, int count, System::Predicate< T > match)
 
FindLast (System::Predicate< T > match)
 
void ForEach (System::Action< T > action)
 
ThisPtr GetRange (int index, int count)
 
int IndexOf (const T &item, int index) const
 
void InsertRange (int index, IEnumerablePtr collection)
 
int32_t LastIndexOf (const T &item) const
 
int32_t LastIndexOf (const T &item, int32_t index) const
 
int32_t LastIndexOf (const T &item, int32_t index, int32_t count) const
 
int RemoveAll (Predicate< T > match)
 
void RemoveRange (int index, int count)
 
void Reverse ()
 Reverses elements order of the whole list. More...
 
void Reverse (int index, int count)
 
void Sort (const SharedPtr< System::Collections::Generic::IComparer< T > > &comparator)
 
void Sort ()
 Sorts elements in the list using default comparator. More...
 
void Sort (int index, int count, SharedPtr< System::Collections::Generic::IComparer< T > > comparator)
 
void Sort (Comparison< T > comparison, bool)
 
ArrayPtr< T > ToArray () const
 
void TrimExcess ()
 Makes list capacity to fit its size. More...
 
bool TrueForAll (System::Predicate< T > match)
 
vector_t::reference operator[] (int index)
 
vector_t::const_reference operator[] (int index) const
 
vector_tdata ()
 
const vector_tdata () const
 
void _add_range (std::initializer_list< T > list)
 
System::Details::VirtualizedIteratorBase< T > * virtualizeBeginIterator () override
 
System::Details::VirtualizedIteratorBase< T > * virtualizeEndIterator () override
 
System::Details::VirtualizedIteratorBase< T > * virtualizeBeginConstIterator () const override
 
System::Details::VirtualizedIteratorBase< T > * virtualizeEndConstIterator () const override
 
- Public Member Functions inherited from System::Object
ASPOSECPP_SHARED_API Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ASPOSECPP_SHARED_API ~Object ()
 Destroys object. Frees all internal data structures. More...
 
ASPOSECPP_SHARED_API Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared reference counter. More...
 
ASPOSECPP_SHARED_API void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
ASPOSECPP_SHARED_API void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual ASPOSECPP_SHARED_API int32_t GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual ASPOSECPP_SHARED_API String ToString () const
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual ASPOSECPP_SHARED_API const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual ASPOSECPP_SHARED_API bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual ASPOSECPP_SHARED_API void SetTemplateWeakPtr (uint32_t argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
virtual ASPOSECPP_SHARED_API bool FastCast (const Details::FastRttiBase &helper, void **out_ptr) const
 For internal purposes only. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 
template<>
bool Equals (double const &objA, double const &objB)
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 
- Public Member Functions inherited from System::Collections::Generic::IList< T >
bool get_IsFixedSize ()
 
- Public Member Functions inherited from System::Collections::Generic::ICollection< T >
virtual bool get_IsReadOnly () const
 
ICollectionoperator= (ICollection &&) noexcept
 
ICollectionoperator= (const ICollection &)
 
 ICollection ()
 Default constructor. More...
 
 ICollection (const ICollection &)
 Copy constructor. More...
 
 ICollection (ICollection &&) noexcept
 Move constructor. More...
 
virtual ~ICollection ()
 Destructor. More...
 
SharedPtr< Objectget_SyncRoot () const
 Gets the object the collection is being synchronized through. More...
 
- Public Member Functions inherited from System::Collections::Generic::IEnumerable< T >
LINQ_ElementAt (int index)
 
LINQ_First ()
 
LINQ_First (const Func< T, bool > &predicate)
 
LINQ_FirstOrDefault ()
 
LINQ_FirstOrDefault (std::function< bool(T)> predicate)
 
LINQ_Last ()
 
LINQ_LastOrDefault ()
 
SharedPtr< List< T > > LINQ_ToList ()
 
int LINQ_Count ()
 
int LINQ_Count (const Func< T, bool > &predicate)
 
System::ArrayPtr< T > LINQ_ToArray ()
 
bool LINQ_All (std::function< bool(T)> predicate)
 
bool LINQ_Any ()
 
bool LINQ_Any (std::function< bool(T)> predicate)
 
SharedPtr< IEnumerable< T > > LINQ_Where (std::function< bool(T)> predicate)
 
bool LINQ_Contains (T value)
 
template<typename ResultType >
SharedPtr< IEnumerable< ResultType > > LINQ_Cast ()
 
template<typename Key >
SharedPtr< IEnumerable< T > > LINQ_OrderBy (const Func< T, Key > &keySelector)
 
template<typename Key >
SharedPtr< IEnumerable< T > > LINQ_OrderByDescending (const Func< T, Key > &keySelector)
 
template<typename ResultType >
SharedPtr< IEnumerable< ResultType > > LINQ_OfType ()
 
template<typename ResultType >
SharedPtr< IEnumerable< ResultType > > LINQ_Select (const Func< T, ResultType > &selector)
 
template<typename ResultType >
SharedPtr< IEnumerable< ResultType > > LINQ_Select (const Func< T, int32_t, ResultType > &selector)
 
SharedPtr< IEnumerable< T > > LINQ_Concat (SharedPtr< IEnumerable< T >> sequence)
 
template<typename Key >
System::SharedPtr< IEnumerable< System::SharedPtr< System::Linq::IGrouping< Key, T > > > > LINQ_GroupBy (System::Func< T, Key > keyPredicate)
 
template<typename ResultType >
SharedPtr< IEnumerable< ResultType > > LINQ_SelectMany (const Func< T, SharedPtr< IEnumerable< ResultType >>> &selector)
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
template<typename Result >
SharedPtr< IEnumerable< Result > > LINQ_Cast ()
 
template<typename Result >
SharedPtr< IEnumerable< Result > > LINQ_OfType ()
 
template<typename Result >
SharedPtr< IEnumerable< Result > > LINQ_Select (const Func< Source, Result > &selector)
 
template<typename Result >
SharedPtr< IEnumerable< Result > > LINQ_Select (const Func< Source, int32_t, Result > &selector)
 
template<typename Key >
SharedPtr< IEnumerable< Source > > LINQ_OrderBy (const Func< Source, Key > &keySelector)
 
template<typename Key >
SharedPtr< IEnumerable< Source > > LINQ_OrderByDescending (const Func< Source, Key > &keySelector)
 
template<typename Key >
SharedPtr< IEnumerable< SharedPtr< System::Linq::IGrouping< Key, Source > > > > LINQ_GroupBy (System::Func< Source, Key > keyPredicate)
 
template<typename Result >
SharedPtr< IEnumerable< Result > > LINQ_SelectMany (const Func< Source, SharedPtr< IEnumerable< Result >>> &selector)
 

Additional Inherited Members

- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Implements C# typeof(System.Object) construct. More...
 

Detailed Description

template<typename T>
class System::Collections::Generic::ListExt< T >

generic List class that implements IListWrapper interface

Member Typedef Documentation

◆ BaseType

template<typename T >
typedef List<T> System::Collections::Generic::ListExt< T >::BaseType

◆ BaseTypes

template<typename T >
typedef System::BaseTypesInfo<System::Object> System::Collections::Generic::ListExt< T >::BaseTypes

◆ ListType

◆ ThisType

◆ ValueType

template<typename T >
typedef T System::Collections::Generic::ListExt< T >::ValueType

Member Function Documentation

◆ CreateIListWrapper()

template<typename T >
System::SharedPtr<System::Collections::IList> System::Collections::Generic::ListExt< T >::CreateIListWrapper ( )
inlineoverridevirtual

IListWrapper interface implementation.

Reimplemented from System::Collections::IListWrapper.

◆ CreateIListWrapperImpl() [1/3]

template<typename T >
template<typename T1 >
std::enable_if<System::IsSmartPtr<T1>::value, System::SharedPtr<System::Collections::IList> >::type System::Collections::Generic::ListExt< T >::CreateIListWrapperImpl ( )
inline

IListWrapper implementation helper for reference types.

◆ CreateIListWrapperImpl() [2/3]

template<typename T >
template<typename T1 >
std::enable_if<!System::IsSmartPtr<T1>::value && System::IsBoxable<T1>::value, System::SharedPtr<System::Collections::IList> >::type System::Collections::Generic::ListExt< T >::CreateIListWrapperImpl ( )
inline

IListWrapper implementation helper for value types.

◆ CreateIListWrapperImpl() [3/3]

template<typename T >
template<typename T1 >
std::enable_if<!System::IsSmartPtr<T1>::value && !System::IsBoxable<T>::value, System::SharedPtr<System::Collections::IList> >::type System::Collections::Generic::ListExt< T >::CreateIListWrapperImpl ( )
inline

IListWrapper implementation helper for other types.