lestes::std::source_location Class Reference

#include <source_location.hh>

Inheritance diagram for lestes::std::source_location:

Inheritance graph
[legend]
List of all members.

Public Member Functions

ptr< file_infofile_get (void) const
 Returns file information.
ulint line_get (void) const
 Returns line in file.
ulint column_get (void) const
 Returns column on line.
ulint order_get (void) const
 Returns order.
bool equals (const ptr< source_location > &rhs) const
 Tests equality.
ptr< source_locationclone_order (ulint a_order) const
 Clones location with new order.
ptr< source_locationclone_file (const ptr< file_info > &a_file) const
 Clones location with new file information.
virtual ptr< reflection_listreflection_get (void) const
 Returns list of reflection info.
virtual ptr< field_list_listfield_values_get (void) const
 Returns list of field values.

Static Public Member Functions

static ptr< source_locationcreate (const ptr< file_info > &a_file, ulint a_line, ulint a_column)
 Returns new location, initializes with file information and position.
static ptr< source_locationcreate (const ptr< file_info > &a_file, ulint a_line, ulint a_column, ulint a_order)
 Returns new location, initializes with file information, position and order.
static ptr< source_locationzero (void)
 Returns zero location.

Protected Member Functions

 source_location (const ptr< file_info > &a_file, ulint a_line, ulint a_column, ulint a_order)
 Creates new object, initializes with file information, postion and order.
void gc_mark ()
 Marking routine.

Private Member Functions

 source_location (const source_location &)
 Hides copy constructor.
source_locationoperator= (const source_location &)
 Hides assigment operator.

Private Attributes

srp< file_infofile
 File information structure.
ulint line
 Line in file.
ulint column
 Column inside the line.
ulint order
 The order in the translation unit.

Static Private Attributes

static ptr< source_locationzero_instance = zero_instance
 Zero location instance.
static ptr< reflection_listreflection = reflection
 The reflection information.

Detailed Description

Represents location of token in file inclusion chain and the file itself. The object is intentionally inmutable to simplify the processing.


Constructor & Destructor Documentation

lestes::std::source_location::source_location ( const ptr< file_info > &  a_file,
ulint  a_line,
ulint  a_column,
ulint  a_order 
) [protected]

Creates new object, initializes with file information, postion and order.

Creates new object, initializes with file information and position.

Precondition:
a_file != NULL
Parameters:
a_file The file information.
a_line The line in the file.
a_column The column on the line.
a_order The order in the translation unit.

lestes::std::source_location::source_location ( const source_location  )  [private]

Hides copy constructor.


Member Function Documentation

ptr< file_info > lestes::std::source_location::file_get ( void   )  const

Returns file information.

Returns file information.

Returns:
The file information.

ulint lestes::std::source_location::line_get ( void   )  const

Returns line in file.

Returns position in the file.

Returns:
The line number.

ulint lestes::std::source_location::column_get ( void   )  const

Returns column on line.

Returns position on the line.

Returns:
The column number.

ulint lestes::std::source_location::order_get ( void   )  const

Returns order.

Returns order in translation unit.

Returns:
The order.

bool lestes::std::source_location::equals ( const ptr< source_location > &  rhs  )  const

Tests equality.

Tests equality to other source_location.

Parameters:
rhs The location to compare to.

ptr< source_location > lestes::std::source_location::clone_order ( ulint  a_order  )  const

Clones location with new order.

Clones the location with new order.

Parameters:
a_order The order for the new location.
Returns:
The location with changed order.

ptr< source_location > lestes::std::source_location::clone_file ( const ptr< file_info > &  a_file  )  const

Clones location with new file information.

Clones the location with new file information.

Parameters:
a_file The file_information for the new location.
Returns:
The location with changed file information.

ptr< source_location > lestes::std::source_location::create ( const ptr< file_info > &  a_file,
ulint  a_line,
ulint  a_column 
) [static]

Returns new location, initializes with file information and position.

Returns new instance, initializes with file information and position.

Precondition:
a_file != NULL
Parameters:
a_file The file information.
a_line The line in the file.
a_column The column on the line.
Returns:
The location.

ptr< source_location > lestes::std::source_location::create ( const ptr< file_info > &  a_file,
ulint  a_line,
ulint  a_column,
ulint  a_order 
) [static]

Returns new location, initializes with file information, position and order.

Returns new instance, initializes with file information, position and order.

Precondition:
a_file != NULL
Parameters:
a_file The file information.
a_line The line in the file.
a_column The column on the line.
a_order The order in the translation unit.
Returns:
The location.

ptr< source_location > lestes::std::source_location::zero ( void   )  [static]

Returns zero location.

Returns location at the beginning of the translation unit.

Returns:
The zero location.

ptr< object::reflection_list > lestes::std::source_location::reflection_get ( void   )  const [virtual]

Returns list of reflection info.

Returns reflection list for source location.

Returns:
The reflection list.

Reimplemented from lestes::std::object.

ptr< object::field_list_list > lestes::std::source_location::field_values_get ( void   )  const [virtual]

Returns list of field values.

Returns values of the fields.

Returns:
List of field values.

Reimplemented from lestes::std::object.

void lestes::std::source_location::gc_mark ( void   )  [protected, virtual]

Marking routine.

Standard marking routine, called by the garbage collector.

Reimplemented from lestes::std::mem::keystone.

source_location& lestes::std::source_location::operator= ( const source_location  )  [private]

Hides assigment operator.


Member Data Documentation

srp<file_info> lestes::std::source_location::file [private]

File information structure.

ulint lestes::std::source_location::line [private]

Line in file.

ulint lestes::std::source_location::column [private]

Column inside the line.

ulint lestes::std::source_location::order [private]

The order in the translation unit.

ptr< source_location > lestes::std::source_location::zero_instance = zero_instance [static, private]

Zero location instance.

The zero location instance at the beginning of the translation unit.

ptr< object::reflection_list > lestes::std::source_location::reflection = reflection [static, private]

The reflection information.

Reflection list for source location.

Reimplemented from lestes::std::object.


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