exml::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]
exml::FilePos::FilePos | ( | ) |
default contructor (set line and col at 0)
§ FilePos() [2/2]
exml::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 exml::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 exml::FilePos::clear | ( | ) |
Reset position at 0,0.
§ getCol()
size_t exml::FilePos::getCol | ( | ) | const |
Get the colomn position.
- Returns
- Colomn in number of utf8-char
§ getLine()
size_t exml::FilePos::getLine | ( | ) | const |
Get the line number position.
- Returns
- line ID (start at 0)
§ newLine()
void exml::FilePos::newLine | ( | ) |
Find a new line & reset colomn at 0.
§ operator++()
FilePos& exml::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& exml::FilePos::operator+= | ( | size_t | _col | ) |
Colomn addition operator.
- Parameters
-
[in] _col Number of colomn to add
- Returns
- Reference on this
§ operator--()
FilePos& exml::FilePos::operator-- | ( | ) |
Decrement the colomn position.
- Returns
- Reference on this
§ operator=()
Asignment operator.
- Parameters
-
[in] _obj Object to copy
- Returns
- Reference on this
§ set()
void exml::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/exml/exml/FilePos.hpp