CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
group.h
1
2#ifndef _group_h_
3#define _group_h_
4
5#include "system/text/regularexpressions/capture_collection.h"
6
7namespace System { namespace Text { namespace RegularExpressions {
8
9class GroupCollection;
10
11class Group;
14
19class ASPOSECPP_SHARED_CLASS Group : public Capture
20{
21 friend class GroupCollection;
22 friend class Match;
23
24public:
27 CaptureCollectionPtr get_Captures() { return captures; }
30 bool get_Success() { return (captures != nullptr) && captures->get_Count() > 0; }
31
36 ASPOSECPP_SHARED_API Group(const UStringPtr& source, int index, int length);
38 ASPOSECPP_SHARED_API Group();
41 ASPOSECPP_SHARED_API void AddCapture(const CapturePtr& item);
42
43protected:
46
48
49protected:
50#ifdef ASPOSE_GET_SHARED_MEMBERS
52 virtual void GetSharedMembers(System::Object::shared_members_type& result) const override
53 {
54 Capture::GetSharedMembers(result);
55 result.Add("System::Text::RegularExpressions::Group::captures", captures);
56 }
57#endif
58
59#ifdef __DBG_FOR_EACH_MEMBER
60public:
63 void DBG_for_each_member(DBG::for_each_member_visitor &visitor) const override
64 {
65 Capture::DBG_for_each_member(visitor);
66 visitor.add_self(this);
67 visitor.add_member(this, captures.get_shared(), "captures");
68 }
69
72 const char* DBG_class_name() const override { return "Group"; }
73#endif
74};
75
76typedef SharedPtr<Group> GroupPtr;
77
78}}}
79
80#endif // _group_h_
81
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
Result of single subexpression matching. Objects of this class should only be allocated using System:...
Definition: capture.h:27
List of capture groups in a single match. Objects of this class should only be allocated using System...
Definition: group_collection.h:21
Result of matching done by single capturing group. Objects of this class should only be allocated usi...
Definition: group.h:20
CaptureCollectionPtr captures
Captures caught.
Definition: group.h:45
Group(const UStringPtr &source, int index, int length)
Constructor.
CaptureCollectionPtr get_Captures()
Gets available captures.
Definition: group.h:27
Group()
Constructor of empty group.
static GroupPtr emptygroup
Definition: group.h:47
bool get_Success()
Checks if capturing was successful for this group.
Definition: group.h:30
void AddCapture(const CapturePtr &item)
Adds capture into group.
Single match of regexp over string. Objects of this class should only be allocated using System::Make...
Definition: match.h:56
@ Text
Defines color adjustment information for text.
std::shared_ptr< const UnicodeString > UStringPtr
Shared UnicodeString to avoid copying.
Definition: capture.h:15
SharedPtr< Group > GroupPtr
Pointer to group.
Definition: group.h:13
Definition: db_command.h:9