ejson::FilePos Class Reference
#include <FilePos.hpp>
Public Member Functions | |
FilePos () | |
FilePos (size_t _line, size_t _col) | |
FilePos & | operator++ () |
FilePos & | operator-- () |
FilePos & | operator+= (const FilePos &_obj) |
FilePos & | operator+= (size_t _col) |
FilePos & | operator= (const FilePos &_obj) |
void | newLine () |
bool | check (char32_t _val) |
void | set (size_t _line, size_t _col) |
void | clear () |
size_t | getCol () const |
size_t | getLine () const |
Detailed Description
Position in the file of the original data.
Constructor & Destructor Documentation
§ FilePos() [1/2]
ejson::FilePos::FilePos | ( | ) |
default contructor (set line and col at 0)
§ FilePos() [2/2]
ejson::FilePos::FilePos | ( | size_t | _line, |
size_t | _col | ||
) |
initialize constructor
- Parameters
-
[in] _line Line in the file [in] _col Colomn in the file
Member Function Documentation
§ check()
bool ejson::FilePos::check | ( | char32_t | _val | ) |
Check if the value is a new line and update internal property.
- Parameters
-
[in] _val Char value to check
- Returns
- true We find a new line
- false We NOT find a new line
§ clear()
void ejson::FilePos::clear | ( | ) |
Reset position at 0,0.
§ getCol()
size_t ejson::FilePos::getCol | ( | ) | const |
Get the colomn position.
- Returns
- Colomn in number of utf8-char
§ getLine()
size_t ejson::FilePos::getLine | ( | ) | const |
Get the line number position.
- Returns
- line ID (start at 0)
§ newLine()
void ejson::FilePos::newLine | ( | ) |
Find a new line & reset colomn at 0.
§ operator++()
FilePos& ejson::FilePos::operator++ | ( | ) |
Increment the colomn position.
- Returns
- Reference on this
§ operator+=() [1/2]
Addition operator.
- Parameters
-
[in] _obj Addition object..
- Returns
- Reference on this
§ operator+=() [2/2]
FilePos& ejson::FilePos::operator+= | ( | size_t | _col | ) |
§ operator--()
FilePos& ejson::FilePos::operator-- | ( | ) |
Decrement the colomn position.
- Returns
- Reference on this
§ operator=()
§ set()
void ejson::FilePos::set | ( | size_t | _line, |
size_t | _col | ||
) |
Setter of specific data.
- Parameters
-
[in] _line Line in the file [in] _col Colomn in the file
The documentation for this class was generated from the following file:
- framework/atria-soft/ejson/ejson/FilePos.hpp