g2o
Public Member Functions | Public Attributes | List of all members
SlamParser::position Class Reference

Abstract a position. More...

#include <position.hh>

Public Member Functions

 position ()
 Construct a position. More...
 
void initialize (std::string *fn)
 Initialization. More...
 
Line and Column related manipulators
void lines (int count=1)
 (line related) Advance to the COUNT next lines. More...
 
void columns (int count=1)
 (column related) Advance to the COUNT next columns. More...
 

Public Attributes

std::string * filename
 File name to which this position refers. More...
 
unsigned int line
 Current line number. More...
 
unsigned int column
 Current column number. More...
 

Detailed Description

Abstract a position.

Definition at line 55 of file position.hh.

Constructor & Destructor Documentation

SlamParser::position::position ( )
inline

Construct a position.

Definition at line 60 of file position.hh.

61  : filename (0), line (1), column (1)
62  {
63  }
std::string * filename
File name to which this position refers.
Definition: position.hh:93
unsigned int line
Current line number.
Definition: position.hh:95
unsigned int column
Current column number.
Definition: position.hh:97

Member Function Documentation

void SlamParser::position::columns ( int  count = 1)
inline

(column related) Advance to the COUNT next columns.

Definition at line 85 of file position.hh.

References column.

86  {
87  column = std::max (1u, column + count);
88  }
unsigned int column
Current column number.
Definition: position.hh:97
void SlamParser::position::initialize ( std::string *  fn)
inline

Initialization.

Definition at line 67 of file position.hh.

References column, filename, and line.

Referenced by SlamParser::location::initialize().

68  {
69  filename = fn;
70  line = 1;
71  column = 1;
72  }
std::string * filename
File name to which this position refers.
Definition: position.hh:93
unsigned int line
Current line number.
Definition: position.hh:95
unsigned int column
Current column number.
Definition: position.hh:97
void SlamParser::position::lines ( int  count = 1)
inline

(line related) Advance to the COUNT next lines.

Definition at line 78 of file position.hh.

References column, and line.

Referenced by SlamParser::location::lines().

79  {
80  column = 1;
81  line += count;
82  }
unsigned int line
Current line number.
Definition: position.hh:95
unsigned int column
Current column number.
Definition: position.hh:97

Member Data Documentation

unsigned int SlamParser::position::column

Current column number.

Definition at line 97 of file position.hh.

Referenced by columns(), initialize(), lines(), and SlamParser::operator<<().

std::string* SlamParser::position::filename

File name to which this position refers.

Definition at line 93 of file position.hh.

Referenced by initialize(), SlamParser::operator<<(), and SlamParser::Parser::parse().

unsigned int SlamParser::position::line

Current line number.

Definition at line 95 of file position.hh.

Referenced by initialize(), lines(), and SlamParser::operator<<().


The documentation for this class was generated from the following file: