2#ifndef _aspose_system_text_match_h_
3#define _aspose_system_text_match_h_
5#include "system/text/regularexpressions/group_collection.h"
6#include "system/text/regularexpressions/regex_options.h"
7#include "system/timespan.h"
8#include "system/array.h"
11#ifdef ASPOSECPPLIB_BEING_BUILT
12#include <regex_holders.h>
15namespace System {
namespace Text {
namespace RegularExpressions {
20 ASPOSECPP_3RD_PARTY_CLASS(MatchHolder);
26 class DummyMatchHolder
28 std::unique_ptr<void, void(*)()> p1;
29 std::unique_ptr<void, void(*)()> p2;
31 std::shared_ptr<int> s1;
34 DummyMatchHolder() =
delete;
40 Detail::DummyMatchHolder, MatchHolderAlias);
93 int GetGroupIndexFromName(
const String& name);
98 std::vector<int> m_mapped_indexes;
100 MatchHolderAlias what;
107#ifdef ASPOSE_GET_SHARED_MEMBERS
109 virtual ASPOSECPP_SHARED_API
void GetSharedMembers(System::Object::shared_members_type& result)
const override;
112#ifdef __DBG_FOR_EACH_MEMBER
116 void DBG_for_each_member(DBG::for_each_member_visitor &visitor)
const override
118 Group::DBG_for_each_member(visitor);
119 visitor.add_self(
this);
120 visitor.add_member(
this, groups.
get_shared(),
"groups");
125 const char* DBG_class_name()
const override {
return "Match"; }
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
Pointee_ * get_shared() const
Gets pointed object, but asserts that pointer is in shared mode.
Definition: smart_ptr.h:524
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
List of capture groups in a single match. Objects of this class should only be allocated using System...
Definition: group_collection.h:21
Group collection pointer. This type is a pointer to manage other object's deletion....
Definition: group_collection.h:104
Result of matching done by single capturing group. Objects of this class should only be allocated usi...
Definition: group.h:20
Single match of regexp over string. Objects of this class should only be allocated using System::Make...
Definition: match.h:56
virtual String Result(const String &replacement)
Formats string by replacing submatch references with their values.
void SetMappedIndexes(const std::vector< int > &mapped_indexes)
GroupCollectionPtr get_Groups()
Gets group list.
static MatchPtr get_Empty()
Empty match accessor.
Match(const UStringPtr &source, int index, int length)
Constructor.
MatchPtr NextMatch()
Iteration over matches.
void AddCapture(const CapturePtr &item)
Adds capture into match.
void AddGroup(const GroupPtr &item)
Adds group into match.
Regular expression that follows C#-like syntax. Objects of this class should only be allocated using ...
Definition: regex.h:30
@ Text
Defines color adjustment information for text.
System::SharedPtr< Regex > RegexPtr
Regex pointer.
Definition: match.h:44
std::shared_ptr< const UnicodeString > UStringPtr
Shared UnicodeString to avoid copying.
Definition: capture.h:15
SharedPtr< Match > MatchPtr
Match pointer.
Definition: match.h:49
ASPOSECPP_3RD_PARTY_UNCOPYBALE_TYPE_HOLDER(Detail::MatchHolder, MatchHolder, sizeof(Detail::DummyMatchHolder), Detail::DummyMatchHolder, MatchHolderAlias)
Wrapper to hold MatchHolder class without its including as well as PCRE2.
Definition: db_command.h:9