System::Text::RegularExpressions::GroupCollection Class Reference

Inherits System::Collections::Generic::List< GroupPtr >.

Public Types

typedef System::Collections::Generic::List< GroupPtrBase
 Base class. More...
 
- Public Types inherited from System::Collections::Generic::List< GroupPtr >
typedef GroupPtr ValueType
 This type. More...
 
typedef IList< GroupPtr > BaseType
 Interface type. More...
 
typedef std::vector< GroupPtr, ASPOSE_COLLECTION_ALLOCATOR_TYPE > vector_t
 Underlying data type. More...
 
typedef SharedPtr< IEnumerable< GroupPtr > > IEnumerablePtr
 Container holding elements of same type we hold. More...
 
typedef SharedPtr< IEnumerator< GroupPtr > > IEnumeratorPtr
 Enumerator type. More...
 
- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
typedef System::Details::SharedMembersType shared_members_type
 structure to keep list of shared pointers contained in object. More...
 
- Public Types inherited from System::Collections::Generic::IList< GroupPtr >
typedef ICollection< GroupPtr > BaseType
 Base type. More...
 
typedef IList< GroupPtr > ThisType
 This type. More...
 
typedef GroupPtr ValueType
 Value type. More...
 
- Public Types inherited from System::Collections::Generic::ICollection< GroupPtr >
typedef GroupPtr ValueType
 Value type name. More...
 
typedef ICollection< GroupPtr > ThisType
 Collection type name. More...
 
- Public Types inherited from System::Collections::Generic::IEnumerable< GroupPtr >
typedef IEnumerator< GroupPtr > IEnumeratorType
 Enumerator type. More...
 

Public Member Functions

 GroupCollection (WeakPtr< Match > match)
 
void Add (const GroupPtr &item) override
 
void Clear () override
 Disables dropping elements from collection. More...
 
bool Remove (const GroupPtr &item) override
 
bool IsReadOnly () const
 
GroupPtr operator[] (const String &name) const
 
virtual GroupPtr idx_get (String name) const
 
GroupPtr get_Item (int index) const
 
GroupPtr get_Item (const String &name) const
 
void AddGroup (const GroupPtr &item)
 
- Public Member Functions inherited from System::Collections::Generic::List< GroupPtr >
 List ()
 Creates empty list. More...
 
 List (int capacity)
 
 List (IEnumerablePtr collection)
 
void AddInitializer (int size, const GroupPtr inits[])
 
IEnumeratorPtr GetEnumerator () override
 
int get_Count () const override
 
void Add (const GroupPtr &item) override
 
void Clear () override
 Deletes all elements. More...
 
bool Contains (const GroupPtr &item) const override
 
bool Remove (const GroupPtr &item) override
 
void CopyTo (System::ArrayPtr< GroupPtr > array, int arrayIndex) override
 
void CopyTo (const System::ArrayPtr< GroupPtr > &array)
 
void CopyTo (int index, const System::ArrayPtr< GroupPtr > &array, int arrayIndex, int count)
 
int IndexOf (const GroupPtr &item) const override
 
int IndexOf (const GroupPtr &item, int index) const
 
void Insert (int index, const GroupPtr &item) override
 
void RemoveAt (int index) override
 
GroupPtr idx_get (int index) const override
 
void idx_set (int index, GroupPtr value) override
 
int get_Capacity () const
 
void set_Capacity (int capacity)
 
void AddRange (IEnumerablePtr collection)
 
SharedPtr< System::Collections::ObjectModel::ReadOnlyCollection< GroupPtr > > AsReadOnly ()
 
int BinarySearch (const GroupPtr &item) const
 
int BinarySearch (const GroupPtr &item, const SharedPtr< System::Collections::Generic::IComparer< GroupPtr > > &comparer) const
 
int BinarySearch (int index, int count, const GroupPtr &item, const SharedPtr< System::Collections::Generic::IComparer< GroupPtr > > &comparer) const
 
SharedPtr< List< OutputType > > ConvertAll (Converter< GroupPtr, OutputType > converter)
 
bool Exists (System::Predicate< GroupPtr > match)
 
GroupPtr Find (System::Predicate< GroupPtr > predicate)
 
ListPtr< GroupPtr > FindAll (System::Predicate< GroupPtr > match)
 
int FindIndex (System::Predicate< GroupPtr > match)
 
int FindIndex (int startIndex, System::Predicate< GroupPtr > match)
 
int FindIndex (int startIndex, int count, System::Predicate< GroupPtr > match)
 
GroupPtr FindLast (System::Predicate< GroupPtr > match)
 
void ForEach (System::Action< GroupPtr > action)
 
ThisPtr GetRange (int index, int count)
 
void InsertRange (int index, IEnumerablePtr collection)
 
int32_t LastIndexOf (const GroupPtr &item) const
 
int32_t LastIndexOf (const GroupPtr &item, int32_t index) const
 
int32_t LastIndexOf (const GroupPtr &item, int32_t index, int32_t count) const
 
int RemoveAll (Predicate< GroupPtr > 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< GroupPtr > > &comparator)
 
void Sort ()
 Sorts elements in the list using default comparator. More...
 
void Sort (int index, int count, SharedPtr< System::Collections::Generic::IComparer< GroupPtr > > comparator)
 
void Sort (Comparison< GroupPtr > comparison, bool)
 
ArrayPtr< GroupPtr > ToArray () const
 
void TrimExcess ()
 Makes list capacity to fit its size. More...
 
bool TrueForAll (System::Predicate< GroupPtr > 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< GroupPtr > list)
 
- Public Member Functions inherited from System::Object
 Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ~Object ()
 Destroys object. Frees all internal data structures. More...
 
 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 refernce counter. More...
 
void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual int GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual String ToString () ASPOSE_CONST
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual void SetTemplateWeakPtr (unsigned int argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. 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::ICollection< GroupPtr >
virtual bool get_IsReadOnly () const
 
ICollectionoperator= (ICollection &&)
 
ICollectionoperator= (const ICollection &)
 
 ICollection ()
 Default constructor. More...
 
 ICollection (const ICollection &)
 Copy constructor. More...
 
 ICollection (ICollection &&)
 Move constructor. More...
 
virtual ~ICollection ()
 Destructor. More...
 

Protected Member Functions

 ~GroupCollection () override
 Destructor. More...
 
 GroupCollection ()
 Constructor. More...
 
- Protected Member Functions inherited from System::Collections::Generic::List< GroupPtr >
 ~List () override
 Destructor. More...
 
- Protected Member Functions inherited from System::Collections::Generic::IEnumerable< GroupPtr >
 ~IEnumerable () override
 Destructor. More...
 

Protected Attributes

WeakPtr< Matchmatch
 Match/. More...
 

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 ()
 Impleemnts C# typeof(System.Object) construct. More...
 
- Protected Types inherited from System::Collections::Generic::List< GroupPtr >
typedef SharedPtr< List< GroupPtr > > ThisPtr
 Pointer type. More...
 
typedef vector_t::iterator iterator_t
 Iterator type. More...
 
typedef vector_t::const_iterator const_iterator_t
 Const iterator type. More...
 

Detailed Description

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.

Member Typedef Documentation

◆ Base

Constructor & Destructor Documentation

◆ GroupCollection() [1/2]

System::Text::RegularExpressions::GroupCollection::GroupCollection ( WeakPtr< Match match)

Constructor.

Parameters
matchMatch to catch groups for.

◆ ~GroupCollection()

System::Text::RegularExpressions::GroupCollection::~GroupCollection ( )
overrideprotected

Destructor.

◆ GroupCollection() [2/2]

System::Text::RegularExpressions::GroupCollection::GroupCollection ( )
inlineprotected

Constructor.

Member Function Documentation

◆ Add()

void System::Text::RegularExpressions::GroupCollection::Add ( const GroupPtr item)
inlineoverride

Disables adding element into collection.

Parameters
itemItem to add; ignored.

◆ AddGroup()

void System::Text::RegularExpressions::GroupCollection::AddGroup ( const GroupPtr item)

Adds group into collection.

Parameters
itemItem to add.

◆ Clear()

void System::Text::RegularExpressions::GroupCollection::Clear ( )
inlineoverridevirtual

Disables dropping elements from collection.

Implements System::Collections::Generic::ICollection< GroupPtr >.

◆ get_Item() [1/2]

GroupPtr System::Text::RegularExpressions::GroupCollection::get_Item ( int  index) const
inline

Group accessor.

Parameters
indexGroup index.
Returns
Group with specified index.

◆ get_Item() [2/2]

GroupPtr System::Text::RegularExpressions::GroupCollection::get_Item ( const String name) const
inline

Group accessor.

Parameters
nameGroup name.
Returns
Group with specified name.

◆ idx_get()

virtual GroupPtr System::Text::RegularExpressions::GroupCollection::idx_get ( String  name) const
virtual

Group accessor.

Parameters
nameGroup name.
Returns
Group with specified name.

◆ IsReadOnly()

bool System::Text::RegularExpressions::GroupCollection::IsReadOnly ( ) const
inline

Marks collection as read-only.

Returns
Always returns true.

◆ operator[]()

GroupPtr System::Text::RegularExpressions::GroupCollection::operator[] ( const String name) const
inline

Group accessor.

Parameters
nameGroup name.
Returns
Group with specified name.

◆ Remove()

bool System::Text::RegularExpressions::GroupCollection::Remove ( const GroupPtr item)
inlineoverride

Disables removing element from collection.

Parameters
itemItem to remove; ignored.

Member Data Documentation

◆ match

WeakPtr<Match> System::Text::RegularExpressions::GroupCollection::match
protected

Match/.