lestes::lang::cplus::lex::simple_location Class Reference

Simple token location. More...

#include <simple_location.hh>

Inheritance diagram for lestes::lang::cplus::lex::simple_location:

Inheritance graph
[legend]
List of all members.

Public Member Functions

ulint line_get (void) const
 Returns line in file.
ulint column_get (void) const
 Returns column on line.
bool equals (const ptr< simple_location > &rhs) const
 Tests equality.

Static Public Member Functions

static ptr< simple_locationcreate (ulint a_line, ulint a_column)
 Returns new object, initializes with position.

Protected Member Functions

 simple_location (ulint a_line, ulint a_column)
 Creates new object, initializes with postion.

Private Member Functions

 simple_location (const simple_location &)
 Hides copy constructor.
simple_locationoperator= (const simple_location &)
 Hides assigment operator.

Private Attributes

ulint line
 Line in file.
ulint column
 Column inside the line.

Detailed Description

Simple token location.

Contains line number and column number. The object is inmutable to help keeping invariants.


Constructor & Destructor Documentation

lestes::lang::cplus::lex::simple_location::simple_location ( ulint  a_line,
ulint  a_column 
) [protected]

Creates new object, initializes with postion.

Creates new object, initializes with file information and position.

Parameters:
a_line The line number.
a_column The column on the line.

lestes::lang::cplus::lex::simple_location::simple_location ( const simple_location  )  [private]

Hides copy constructor.


Member Function Documentation

ulint lestes::lang::cplus::lex::simple_location::line_get ( void   )  const

Returns line in file.

Returns position in the file.

Returns:
The line number.

ulint lestes::lang::cplus::lex::simple_location::column_get ( void   )  const

Returns column on line.

Returns position on the line.

Returns:
The column number.

bool lestes::lang::cplus::lex::simple_location::equals ( const ptr< simple_location > &  rhs  )  const

Tests equality.

Tests equality to other simple_location.

Parameters:
rhs The location to compare to.

ptr< simple_location > lestes::lang::cplus::lex::simple_location::create ( ulint  a_line,
ulint  a_column 
) [static]

Returns new object, initializes with position.

Returns new instance, initializes with position.

Parameters:
a_line The line number.
a_column The column on the line.

simple_location& lestes::lang::cplus::lex::simple_location::operator= ( const simple_location  )  [private]

Hides assigment operator.


Member Data Documentation

ulint lestes::lang::cplus::lex::simple_location::line [private]

Line in file.

ulint lestes::lang::cplus::lex::simple_location::column [private]

Column inside the line.


The documentation for this class was generated from the following files:
Generated on Mon Feb 12 18:43:50 2007 for lestes by doxygen 1.5.1-20070107