torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
torc::generic::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...
 

Data Fields

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 54 of file generic/edif/position.hh.

Constructor & Destructor Documentation

torc::generic::position::position ( )
inline

Construct a position.

Definition at line 59 of file generic/edif/position.hh.

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

Member Function Documentation

void torc::generic::position::columns ( int  count = 1)
inline

(column related) Advance to the COUNT next columns.

Definition at line 84 of file generic/edif/position.hh.

85  {
86  column = std::max (1u, column + count);
87  }
unsigned int column
Current column number.
void torc::generic::position::initialize ( std::string *  fn)
inline

Initialization.

Definition at line 66 of file generic/edif/position.hh.

67  {
68  filename = fn;
69  line = 1;
70  column = 1;
71  }
unsigned int line
Current line number.
std::string * filename
File name to which this position refers.
unsigned int column
Current column number.
void torc::generic::position::lines ( int  count = 1)
inline

(line related) Advance to the COUNT next lines.

Definition at line 77 of file generic/edif/position.hh.

78  {
79  column = 1;
80  line += count;
81  }
unsigned int line
Current line number.
unsigned int column
Current column number.

Field Documentation

unsigned int torc::generic::position::column

Current column number.

Definition at line 96 of file generic/edif/position.hh.

std::string* torc::generic::position::filename

File name to which this position refers.

Definition at line 92 of file generic/edif/position.hh.

unsigned int torc::generic::position::line

Current line number.

Definition at line 94 of file generic/edif/position.hh.


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