GroupCollection

GroupCollection class

List of capture groups in a single match. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

class GroupCollection : public System::Collections::Generic::List<GroupPtr>

Methods

MethodDescription
void _add_range(std::initializer_list<T>)C++ specific.
void Add(const GroupPtr&) overrideDisables adding element into collection.
void Add(const T&) overrideAdds element to the end of list.
void AddGroup(const GroupPtr&)Adds group into collection.
void AddInitializer(int, const T)Adds elements to list; used when translating initializers.
void AddRange(IEnumerablePtr)Adds all elements from collection (or itself) to the end of current list.
SharedPtr<System::Collections::ObjectModel::ReadOnlyCollection<T>> AsReadOnly()Gets read-only reference to this collection.
iterator begin()Gets iterator to the first element of collection.
const_iterator begin() constGets iterator to the first element of the const-qualified collection.
int BinarySearch(const T&) constLooks for item in a sorted list.
int BinarySearch(const T&, const SharedPtr<System::Collections::Generic::IComparer<T>>&) constLooks for item in a sorted list.
int BinarySearch(int, int, const T&, const SharedPtr<System::Collections::Generic::IComparer<T>>&) constLooks for item in a sorted list.
const_iterator cbegin() constGets iterator to the first const-qualified element of collection.
const_iterator cend() constGets iterator for a non-existent const-qualified element behind the end of the collection.
void Clear() overrideDisables dropping elements from collection.
bool Contains(const T&) const overrideChecks if item is present in list.
SharedPtr<List<OutputType>> ConvertAll(Converter<T, OutputType>)Creates a list of elements converted to different type.
void CopyTo(System::ArrayPtr<T>, int) overrideCopies list elements into existing array elements.
void CopyTo(const System::ArrayPtr<T>&)Copies all elements into existing array elements.
void CopyTo(int, const System::ArrayPtr<T>&, int, int)Copies elements starting from the specified index into existing array elements.
const_reverse_iterator crbegin() constGets a reverse iterator to the last const-qualified element of collection (first in reverse).
const_reverse_iterator crend() constGets a reverse iterator for a non-existent const-qualified element before the start of the collection.
vector_t& data()Underlying data structure access function.
const vector_t& data() constUnderlying data structure access function.
iterator end()Gets iterator for a non-existent element behind the end of the collection.
const_iterator end() constGets iterator for a non-existent element behind the end of the const-qualified collection.
virtual bool Equals(ptr)Compares objects using C# Object.Equals semantics.
static std::enable_if<IsSmartPtr<T1>::value&&IsSmartPtr<T2>::value, bool>::type Equals(T1 const&, T2 const&)Compares reference type objects in C# style.
static std::enable_if<!IsSmartPtr<T1>::value&&!IsSmartPtr<T2>::value, bool>::type Equals(T1 const&, T2 const&)Compares value type objects in C# style.
static bool Equals(float const&, float const&)Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN.
static bool Equals(double const&, double const&)Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN.
bool Exists(System::Predicate<T>)Checks if element adhering to specific predicate exists in list.
virtual bool FastCast(const Details::FastRttiBase&, void **) constFor internal purposes only.
T Find(System::Predicate<T>)Looks for element adhering to specific predicate.
ListPtr<T> FindAll(System::Predicate<T>)Looks for elements adhering to specific predicate.
int FindIndex(System::Predicate<T>)Looks for element adhering to specific predicate.
int FindIndex(int, System::Predicate<T>)Looks for element adhering to specific predicate.
int FindIndex(int, int, System::Predicate<T>)Looks for element adhering to specific predicate.
T FindLast(System::Predicate<T>)Looks for last element adhering to specific predicate.
void ForEach(System::Action<T>)Applies action to all elements in list.
int get_Capacity() constGets current list capacity.
int get_Count() const overrideGets number of elements in current list.
bool get_IsFixedSize()Checks whether the collection is of fixed size.
virtual bool get_IsReadOnly() constChecks if collection is read only.
GroupPtr get_Item(int) constGroup accessor.
GroupPtr get_Item(const String&) constGroup accessor.
SharedPtr<Object> get_SyncRoot() constGets the object the collection is being synchronized through.
Detail::SmartPtrCounter * GetCounter()Gets reference counter data structure associated with the object.
IEnumeratorPtr GetEnumerator() overrideGets enumerator to iterate through list elements.
virtual int32_t GetHashCode() constAnalog of C# Object.GetHashCode() method. Enables hashing of custom objects.
ThisPtr GetRange(int, int)Creates slice of list.
virtual const TypeInfo& GetType() constGets actual type of object. Analog of C# System.Object.GetType() call.
GroupCollection(const WeakPtr<Match>&)Constructor.
ICollection()Default constructor.
ICollection(const ICollection&)Copy constructor.
ICollection(ICollection&&)Move constructor.
virtual GroupPtr idx_get(String) constGroup accessor.
GroupPtr idx_get(int) const overrideGroup accessor.
void idx_set(int, T) overrideSets element at specific position.
int IndexOf(const T&) const overrideGets first index of specific item.
int IndexOf(const T&, int) constLooks for specific item in list.
void Insert(int, const T&) overrideInserts item at specified position.
void InsertRange(int, IEnumerablePtr)Inserts data range at specific position.
virtual bool Is(const TypeInfo&) constCheck if object represents an instance of type described by targetType. Analog of C# ‘is’ operator.
bool IsReadOnly() constMarks collection as read-only.
int32_t LastIndexOf(const T&) constSearches for the specified object and returns the zero-based index of the last occurrence within the entire list.
int32_t LastIndexOf(const T&, int32_t) constSearches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the List that extends from the first element to the specified index.
int32_t LastIndexOf(const T&, int32_t, int32_t) constSearches for the specified object and returns the zero-based index of the last occurrence within the range of elements in the List that contains the specified number of elements and ends at the specified index.
T LINQ_Aggregate(const Func<T, T, T>&)Applies an accumulator function over a sequence.
bool LINQ_All(std::function<bool(T)>)Determines whether all elements of a sequence satisfy a condition.
bool LINQ_Any()Determines whether a sequence contains any elements.
bool LINQ_Any(std::function<bool(T)>)Determines whether any element of a sequence exists or satisfies a condition.
SharedPtr<IEnumerable<ResultType>> LINQ_Cast()Casts the elements to the specified type.
SharedPtr<IEnumerable<Result>> LINQ_Cast()
SharedPtr<IEnumerable<T>> LINQ_Concat(SharedPtr<IEnumerable<T>>)Concatenates two sequences.
bool LINQ_Contains(T)Determines if a sequence contains a specified value.
int LINQ_Count()Returns the number of elements in the sequence (calculated via direct counting).
int LINQ_Count(const Func<T, bool>&)Returns the number of elements in the sequence that satisfy the specified condition.
T LINQ_ElementAt(int)Returns the element at a specified index in a sequence.
T LINQ_ElementAtOrDefault(int)Returns the element at a specified index in a sequence.
T LINQ_First()Returns the first element of a sequence.
T LINQ_First(const Func<T, bool>&)Returns the first element of a sequence that satisfy the specified condition.
T LINQ_FirstOrDefault()Returns the first element of a sequence, or a default value if the sequence is empty.
T LINQ_FirstOrDefault(std::function<bool(T)>)Returns the first element of the sequence that satisfies a condition or a default value if no such element is found.
System::SharedPtr<IEnumerable<System::SharedPtr<System::Linq::IGrouping<Key, T>>>> LINQ_GroupBy(System::Func<T, Key>)Groups the elements of a sequence.
SharedPtr<IEnumerable<SharedPtr<System::Linq::IGrouping<Key, Source>>>> LINQ_GroupBy(System::Func<Source, Key>)
T LINQ_Last()Returns the last element of a sequence.
T LINQ_LastOrDefault()Returns the last element of a sequence, or a default value if the sequence is empty.
ResultType LINQ_Max(const Func<T, ResultType>&)Invokes a transform function on each element of a generic sequence and returns the maximum resulting value.
ResultType LINQ_Max(const Func<Source, ResultType>&)
ResultType LINQ_Min(const Func<T, ResultType>&)Invokes a transform function on each element of a generic sequence and returns the minimum resulting value.
ResultType LINQ_Min(const Func<Source, ResultType>&)
SharedPtr<IEnumerable<ResultType>> LINQ_OfType()Filters the elements of the sequence based on the specified type.
SharedPtr<IEnumerable<Result>> LINQ_OfType()
SharedPtr<Linq::IOrderedEnumerable<T>> LINQ_OrderBy(const Func<T, Key>&)Sorts the elements of a sequence in ascending order according to the key values selected by keySelector.
SharedPtr<Linq::IOrderedEnumerable<Source>> LINQ_OrderBy(const Func<Source, Key>&)
SharedPtr<Linq::IOrderedEnumerable<T>> LINQ_OrderByDescending(const Func<T, Key>&)Sorts the elements of a sequence in descending order according to the key values selected by keySelector.
SharedPtr<Linq::IOrderedEnumerable<Source>> LINQ_OrderByDescending(const Func<Source, Key>&)
SharedPtr<IEnumerable<T>> LINQ_Reverse()Inverts the order of the elements in a sequence.
SharedPtr<IEnumerable<ResultType>> LINQ_Select(const Func<T, ResultType>&)Transforms elements of a sequence.
SharedPtr<IEnumerable<ResultType>> LINQ_Select(const Func<T, int32_t, ResultType>&)Transforms each element of a sequence into a new form by incorporating the element’s index.
SharedPtr<IEnumerable<Result>> LINQ_Select(const Func<Source, Result>&)
SharedPtr<IEnumerable<Result>> LINQ_Select(const Func<Source, int32_t, Result>&)
SharedPtr<IEnumerable<ResultType>> LINQ_SelectMany(const Func<T, SharedPtr<IEnumerable<ResultType>>>&)Projects each element of a sequence and combines the resulting sequences into one sequence.
SharedPtr<IEnumerable<Result>> LINQ_SelectMany(const Func<Source, SharedPtr<IEnumerable<Result>>>&)
SharedPtr<IEnumerable<T>> LINQ_Take(int32_t)Returns a specified number of contiguous elements from the start of a sequence.
System::ArrayPtr<T> LINQ_ToArray()Creates an array from a sequence.
SharedPtr<List<T>> LINQ_ToList()Creates a List from a sequence.
SharedPtr<IEnumerable<T>> LINQ_Where(std::function<bool(T)>)Filters a sequence based on the specified predicate.
List()Creates empty list.
List(int)Creates list with pre-defined capacity.
List(IEnumerablePtr)Copy constructor.
void Lock()Implements C# lock() statement locking. Call directly or use LockContext sentry object.
virtual ptr MemberwiseClone() constAnalog of C# Object.MemberwiseClone() method. Enables cloning custom types.
Object()Creates object. Initializes all internal data structures.
Object(Object const&)Copy constructor. Doesn’t copy anything, really, just initializes new object and enables copy constructing subclasses.
Object& operator=(Object const&)Assignment operator. Doesn’t copy anything, really, just initializes new object and enables copy constructing subclasses.
ICollection& operator=(ICollection&&)Move assignment operator.
ICollection& operator=(const ICollection&)Move assignment operator.
GroupPtr operator[](const String&) constGroup accessor.
vector_t::reference operator[](int)Accessor function.
vector_t::const_reference operator[](int) constAccessor function.
reverse_iterator rbegin()Gets a reverse iterator to the last element of collection (first in reverse).
const_reverse_iterator rbegin() constGets a reverse iterator to the last element of the const-qualified collection (first in reverse).
static bool ReferenceEquals(ptr const&, ptr const&)Compares objects by reference.
static std::enable_if<!IsSmartPtr<T>::value, bool>::type ReferenceEquals(T const&, T const&)Compares objects by reference.
static std::enable_if<!IsSmartPtr<T>::value, bool>::type ReferenceEquals(T const&, std::nullptr_t)Reference-compares value type object with nullptr.
bool ReferenceEquals(String const&, std::nullptr_t)Specialization of Object::ReferenceEquals for case of string and nullptr.
bool ReferenceEquals(String const&, String const&)Specialization of Object::ReferenceEquals for case of strings.
bool Remove(const GroupPtr&) overrideDisables removing element from collection.
bool Remove(const T&) overrideRemoves first instance of specific item from list.
int RemoveAll(Predicate<T>)Removes all elements matching specific predicate.
void RemoveAt(int) overrideRemoves item at specified position.
int RemovedSharedRefs(int)Decreases shared reference count by specified value.
void RemoveRange(int, int)Removes slice of list.
reverse_iterator rend()Gets a reverse iterator for a non-existent element before the start of the collection.
const_reverse_iterator rend() constGets a reverse iterator for a non-existent element before the start of the const-qualified collection.
void Reverse()Reverses elements order of the whole list.
void Reverse(int, int)Reverses elements order of the list slice.
void set_Capacity(int)Sets list capacity.
virtual void SetTemplateWeakPtr(uint32_t)Set n’th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode.
int SharedCount() constGets current value of shared reference counter.
Object * SharedRefAdded()Increments shared reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector.
int SharedRefRemovedSafe()Decrements and returns shared reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector.
void Sort(const SharedPtr<System::Collections::Generic::IComparer<T>>&)Sorts elements in the list.
void Sort()Sorts elements in the list using default comparator.
void Sort(int, int, SharedPtr<System::Collections::Generic::IComparer<T>>)Sorts elements in the list slice.
void Sort(Comparison<T>, bool)Sorts elements in the list.
ArrayPtr<T> ToArray() constConverst list to array.
virtual String ToString() constAnalog of C# Object.ToString() method. Enables converting custom objects to string.
void TrimExcess()Makes list capacity to fit its size.
bool TrueForAll(System::Predicate<T>)Determines whether every element in the collection matches the conditions defined by the specified predicate.
static const TypeInfo& Type()Implements C# typeof(System.Object) construct.
void Unlock()Implements C# lock() statement unlocking. Call directly or use LockContext sentry object.
System::Details::VirtualizedIteratorBase<T> * virtualizeBeginConstIterator() const overrideGets the implementation of begin const iterator for the current container.
System::Details::VirtualizedIteratorBase<T> * virtualizeBeginIterator() overrideGets the implementation of begin iterator for the current container.
System::Details::VirtualizedIteratorBase<T> * virtualizeEndConstIterator() const overrideGets the implementation of end const iterator for the current container.
System::Details::VirtualizedIteratorBase<T> * virtualizeEndIterator() overrideGets the implementation of end iterator for the current container.
Detail::SmartPtrCounter * WeakRefAdded()Increments weak reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector.
void WeakRefRemoved()Decrements weak reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector.
virtual ~ICollection()Destructor.
virtual ~Object()Destroys object. Frees all internal data structures.

Typedefs

TypedefDescription
BaseBase class.

See Also