A file location.
More...
#include <file_location.hpp>
◆ file_location()
tetengo::json::file_location::file_location |
( |
std::string |
line, |
|
|
std::size_t |
line_index, |
|
|
std::size_t |
column_index |
|
) |
| |
Creates a file location.
- Parameters
-
line | A line. |
line_index | A line index. |
column_index | A column index. |
- Exceptions
-
std::out_of_range | When column_index is larger than the line length. |
◆ column_index()
std::size_t tetengo::json::file_location::column_index |
( |
| ) |
const |
Returns the column index.
- Returns
- The column index.
◆ line()
const std::string & tetengo::json::file_location::line |
( |
| ) |
const |
Returns the line.
- Returns
- The line.
◆ line_index()
std::size_t tetengo::json::file_location::line_index |
( |
| ) |
const |
Returns the line index.
- Returns
- The line index.
◆ set_column_index()
void tetengo::json::file_location::set_column_index |
( |
std::size_t |
index | ) |
|
Sets a column index.
- Parameters
-
- Exceptions
-
std::out_of_range | When index is larger than the line length. |
◆ operator==
Returns true when one file location is equal to another.
- Parameters
-
one | One file location. |
another | Another file location. |
- Return values
-
true | When one is equal to another. |
false | Otherwise. |
The documentation for this class was generated from the following file: