|
| 1 | +--- |
| 2 | +layout: default-layout |
| 3 | +title: CParsedResult Class - Dynamsoft Code Parser SDK C++ Edition API Reference |
| 4 | +description: This page shows CParsedResult Class of Dynamsoft Code Parser SDK C++ Edition. |
| 5 | +keywords: CParsedResult, api reference, c++ |
| 6 | +needAutoGenerateSidebar: true |
| 7 | +--- |
| 8 | + |
| 9 | + |
| 10 | +# CParsedResult Class |
| 11 | + |
| 12 | +```cpp |
| 13 | +class dynamsoft::dcp::CParsedResult |
| 14 | +``` |
| 15 | +
|
| 16 | +| Method | Description | |
| 17 | +|----------------------|-------------| |
| 18 | +| [`GetOriginalImageHashId`](#getoriginalimagehashid) | Gets the hash ID of the source image. | |
| 19 | +| [`GetOriginalImageTag`](#getoriginalimagetag) | Gets the tag of the source image. | |
| 20 | +| [`GetItemsCount`](#getitemscount) | Gets the number of parsed result items in the parsed result. | |
| 21 | +| [`GetItem`](#getitem) | Gets the parsed result item at the specified index. | |
| 22 | +| [`GetErrorCode`](#geterrorcode) | Gets the error code of the parsed result, if an error occurred. | |
| 23 | +| [`GetErrorString`](#geterrorstring) | Gets the error message of the parsed result, if an error occurred. | |
| 24 | +| [`HasItem`](#hasitem) | Check if the item is present in the array. | |
| 25 | +| [`RemoveItem`](#removeitem) | Remove a specific item from the array in the parsed results. | |
| 26 | +| [`Release`](#release) | Decreases the reference count of the `CParsedResult` object. | |
| 27 | +| [`Retain`](#retain) | Increases the reference count of the `CParsedResult` object. | |
| 28 | +| [`operator[]`](#operator) | Gets a pointer to the `CParsedResultItem` object at the specified index.| |
| 29 | +| [`AddItem`](#additem) | Adds a specific item to the array in the parsed result. | |
| 30 | +
|
| 31 | +## GetOriginalImageHashId |
| 32 | +
|
| 33 | +Gets the hash ID of the source image. |
| 34 | +
|
| 35 | +```cpp |
| 36 | +virtual const char* GetOriginalImageHashId() const = 0; |
| 37 | +``` |
| 38 | + |
| 39 | +**Return value** |
| 40 | + |
| 41 | +Returns a pointer to a null-terminated string containing the hash ID of the source image. |
| 42 | + |
| 43 | +## GetOriginalImageTag |
| 44 | + |
| 45 | +Gets the tag of the source image. |
| 46 | + |
| 47 | +```cpp |
| 48 | +virtual const CImageTag* GetOriginalImageTag() const = 0; |
| 49 | +``` |
| 50 | + |
| 51 | +**Return value** |
| 52 | + |
| 53 | +Returns a pointer to a CImageTag object representing the tag of the source image. |
| 54 | + |
| 55 | +**See Also** |
| 56 | + |
| 57 | +[CImageTag]({{ site.dcv_cpp_api }}core/basic-structures/image-tag.html) |
| 58 | + |
| 59 | +## GetItemsCount |
| 60 | + |
| 61 | +Gets the number of parsed result items in the parsed result. |
| 62 | + |
| 63 | +```cpp |
| 64 | +virtual int GetItemsCount() const = 0; |
| 65 | +``` |
| 66 | + |
| 67 | +**Return value** |
| 68 | + |
| 69 | +Returns the number of parsed result items in the parsed result. |
| 70 | + |
| 71 | +## GetItem |
| 72 | + |
| 73 | +Gets the parsed result item at the specified index. |
| 74 | + |
| 75 | +```cpp |
| 76 | +virtual const CParsedResultItem* GetItem(int index) const = 0; |
| 77 | +``` |
| 78 | +
|
| 79 | +**Parameters** |
| 80 | +
|
| 81 | +`[in] index` The zero-based index of the text line result item to retrieve. |
| 82 | +
|
| 83 | +**Return value** |
| 84 | +
|
| 85 | +Returns a pointer to the `CParsedResultItem` object at the specified index. |
| 86 | +
|
| 87 | +**See Also** |
| 88 | +
|
| 89 | +[CParsedResultItem]({{ site.dcp_cpp_api }}parsed-result-item.html) |
| 90 | +
|
| 91 | +## GetErrorCode |
| 92 | +
|
| 93 | +Gets the error code of the parsed result, if an error occurred. |
| 94 | +
|
| 95 | +```cpp |
| 96 | +virtual int GetErrorCode() const = 0; |
| 97 | +``` |
| 98 | + |
| 99 | +**Return value** |
| 100 | + |
| 101 | +Returns the error code of the parsed result, or 0 if no error occurred. |
| 102 | + |
| 103 | +## GetErrorString |
| 104 | + |
| 105 | +Gets the error message of the parsed result, if an error occurred. |
| 106 | + |
| 107 | +```cpp |
| 108 | +virtual const char* GetErrorString() const = 0; |
| 109 | +``` |
| 110 | + |
| 111 | +**Return value** |
| 112 | + |
| 113 | +Returns a pointer to a null-terminated string containing the error message of the parsed result, or a pointer to an empty string if no error occurred. |
| 114 | + |
| 115 | +## HasItem |
| 116 | + |
| 117 | +Check if the item is present in the array. |
| 118 | + |
| 119 | +```cpp |
| 120 | +virtual bool HasItem(const CParsedResultItem* item) const = 0; |
| 121 | +``` |
| 122 | +
|
| 123 | +**Parameters** |
| 124 | +
|
| 125 | +`[in] item` The specific item to be checked. |
| 126 | +
|
| 127 | +**Return value** |
| 128 | +
|
| 129 | +Returns a bool value indicating whether the item is present in the array or not. |
| 130 | +
|
| 131 | +**See Also** |
| 132 | +
|
| 133 | +[CParsedResultItem]({{ site.dcp_cpp_api }}parsed-result-item.html) |
| 134 | +
|
| 135 | +## RemoveItem |
| 136 | +
|
| 137 | +Remove a specific item from the array in the parsed results. |
| 138 | +
|
| 139 | +```cpp |
| 140 | +virtual int RemoveItem(const CParsedResultItem* item) = 0; |
| 141 | +``` |
| 142 | + |
| 143 | +**Parameters** |
| 144 | + |
| 145 | +`[in] item` The specific item to be removed. |
| 146 | + |
| 147 | +**Return value** |
| 148 | + |
| 149 | +Returns an error code. Zero indicates success. |
| 150 | + |
| 151 | +**See Also** |
| 152 | + |
| 153 | +[CParsedResultItem]({{ site.dcp_cpp_api }}parsed-result-item.html) |
| 154 | + |
| 155 | + |
| 156 | +## Release |
| 157 | + |
| 158 | +Decreases the reference count of the `CParsedResult` object. |
| 159 | + |
| 160 | +```cpp |
| 161 | +virtual void Release() = 0; |
| 162 | +``` |
| 163 | + |
| 164 | +## Retain |
| 165 | + |
| 166 | +Increases the reference count of the `CParsedResult` object. |
| 167 | + |
| 168 | +```cpp |
| 169 | +virtual CParsedResult* Retain() = 0; |
| 170 | +``` |
| 171 | + |
| 172 | +**Return value** |
| 173 | + |
| 174 | +Returns an object of `CParsedResult`. |
| 175 | + |
| 176 | +## operator[] |
| 177 | + |
| 178 | +Gets a pointer to the `CParsedResultItem` object at the specified index. |
| 179 | + |
| 180 | +```cpp |
| 181 | +virtual const CParsedResultItem* operator[](int index) const = 0; |
| 182 | +``` |
| 183 | + |
| 184 | +**Parameters** |
| 185 | + |
| 186 | +`[in] index` The index of the parsed result item to retrieve. |
| 187 | + |
| 188 | +**Return value** |
| 189 | + |
| 190 | +Returns a pointer to the `CParsedResultItem` object at the specified index. |
| 191 | + |
| 192 | +**See Also** |
| 193 | + |
| 194 | +[CParsedResultItem]({{ site.dcp_cpp_api }}parsed-result-item.html) |
| 195 | + |
| 196 | +## AddItem |
| 197 | + |
| 198 | +Adds a specific item to the array in the parsed result. |
| 199 | + |
| 200 | +```cpp |
| 201 | +virtual int AddItem(const CParsedResultItem* item) = 0; |
| 202 | +``` |
| 203 | +
|
| 204 | +**Parameters** |
| 205 | +
|
| 206 | +`[in] item` The specific item to be added. |
| 207 | +
|
| 208 | +**Return value** |
| 209 | +
|
| 210 | +Returns an error code. Zero indicates success. |
| 211 | +
|
| 212 | +**See Also** |
| 213 | +
|
| 214 | +[CParsedResultItem]({{ site.dcp_cpp_api }}parsed-result-item.html) |
| 215 | +
|
0 commit comments