CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
capture.h
1
2#ifndef _aspose_system_text_capture_h_
3#define _aspose_system_text_capture_h_
4
5#include "fwd.h"
6#include "system/string.h"
7#include "system/object.h"
8#include <memory>
9#include <vector>
10
11
12namespace System { namespace Text { namespace RegularExpressions {
13
15typedef std::shared_ptr<const UnicodeString> UStringPtr;
17
18class Capture;
21
26class ASPOSECPP_SHARED_CLASS Capture: public Object
27{
28 friend class CaptureCollection;
29
30public:
35 ASPOSECPP_SHARED_API Capture(const UStringPtr& source, int index, int length);
36
39 int get_Index() const { return index; }
42 int get_Length() const { return length; }
45 ASPOSECPP_SHARED_API String get_Value() const;
48 String ToString() const override { return get_Value(); }
49
50
51protected:
53 int index;
55 int length;
58
59#ifdef __DBG_FOR_EACH_MEMBER
60public:
63 void DBG_for_each_member(DBG::for_each_member_visitor &visitor) const override
64 {
65 Object::DBG_for_each_member(visitor);
66 visitor.add_self(this);
67 }
68
71 const char* DBG_class_name() const override { return "Capture"; }
72#endif
73};
74
75
76}}} // namespace System::Text::RegularExpressions
77
78#endif // _aspose_system_text_capture_h_
79
80
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
List of captures done by single capturing group. Objects of this class should only be allocated using...
Definition: capture_collection.h:21
Result of single subexpression matching. Objects of this class should only be allocated using System:...
Definition: capture.h:27
int index
Captured substring index.
Definition: capture.h:53
int length
Captured substring length.
Definition: capture.h:55
int get_Length() const
Gets length of captured substring.
Definition: capture.h:42
String get_Value() const
Gets captured substring.
String ToString() const override
Gets captured substring.
Definition: capture.h:48
Capture(const UStringPtr &source, int index, int length)
Constructor.
UStringPtr source
Original string.
Definition: capture.h:57
int get_Index() const
Gets index of captured substring.
Definition: capture.h:39
@ Text
Defines color adjustment information for text.
SharedPtr< Capture > CapturePtr
Pointer to single capture object.
Definition: capture.h:20
std::shared_ptr< const UnicodeString > UStringPtr
Shared UnicodeString to avoid copying.
Definition: capture.h:15
Definition: db_command.h:9