lestes::lang::cplus::lex::basic_token< Type, Location, Value > Class Template Reference

Token template. More...

#include <basic_token.hh>

Inheritance diagram for lestes::lang::cplus::lex::basic_token< Type, Location, Value >:

Inheritance graph
[legend]
List of all members.

Public Types

typedef convert< Type >::to_ptr type_type
 Type of token type.
typedef convert< Value
>::to_ptr 
value_type
 Type of token value.
typedef convert< Location
>::to_ptr 
location_type
 Type of token location.

Public Member Functions

Type type_get (void) const
 Returns type of token.
Value value_get (void) const
 Returns value of token.
Location location_get (void) const
 Returns location of token.
bool equals (const ptr< basic_token< Type, Location, Value > > &rhs) const
 Tests equality.

Protected Member Functions

 basic_token (const Location &a_location, const Type &a_type, const Value &a_value)
 Initializes with location, token type and value.
virtual void gc_mark (void)
 Marks the object.

Private Member Functions

 basic_token (const basic_token< Type, Location, Value > &copy)
 Hides copy constructor.
basic_token< Type, Location,
Value > & 
operator= (const basic_token< Type, Location, Value > &rhs)
 Hides assignment operator.

Private Attributes

convert< Type >::to_srp type
 Type of token.
convert< Value >::to_srp value
 Token value itself.
convert< Location >::to_srp location
 Where the token is located.

Detailed Description

template<typename Type, typename Location, typename Value>
class lestes::lang::cplus::lex::basic_token< Type, Location, Value >

Token template.

General token template representing an entity with specific occurence within file.

Parameters:
Type Type of the kind of the token.
Location Type of the location of the token.
Value Type of the value of the token.


Member Typedef Documentation

template<typename Type, typename Location, typename Value>
typedef convert<Type>::to_ptr lestes::lang::cplus::lex::basic_token< Type, Location, Value >::type_type

Type of token type.

template<typename Type, typename Location, typename Value>
typedef convert<Value>::to_ptr lestes::lang::cplus::lex::basic_token< Type, Location, Value >::value_type

Type of token value.

template<typename Type, typename Location, typename Value>
typedef convert<Location>::to_ptr lestes::lang::cplus::lex::basic_token< Type, Location, Value >::location_type

Type of token location.


Constructor & Destructor Documentation

template<typename Type, typename Location, typename Value>
lestes::lang::cplus::lex::basic_token< Type, Location, Value >::basic_token ( const Location &  a_location,
const Type &  a_type,
const Value &  a_value 
) [inline, protected]

Initializes with location, token type and value.

Creates initialized object.

Parameters:
a_location The location of the token.
a_type The type of the token.
a_value The value of the token.

template<typename Type, typename Location, typename Value>
lestes::lang::cplus::lex::basic_token< Type, Location, Value >::basic_token ( const basic_token< Type, Location, Value > &  copy  )  [private]

Hides copy constructor.


Member Function Documentation

template<typename Type, typename Location, typename Value>
Type lestes::lang::cplus::lex::basic_token< Type, Location, Value >::type_get ( void   )  const [inline]

Returns type of token.

Returns token type.

Returns:
The token type.

template<typename Type, typename Location, typename Value>
Value lestes::lang::cplus::lex::basic_token< Type, Location, Value >::value_get ( void   )  const [inline]

Returns value of token.

Returns token value.

Returns:
The token value.

template<typename Type, typename Location, typename Value>
Location lestes::lang::cplus::lex::basic_token< Type, Location, Value >::location_get ( void   )  const [inline]

Returns location of token.

Returns token location.

Returns:
The token location.

template<typename Type, typename Location, typename Value>
bool lestes::lang::cplus::lex::basic_token< Type, Location, Value >::equals ( const ptr< basic_token< Type, Location, Value > > &  rhs  )  const [inline]

Tests equality.

Tests equality of tokens. Checks equality of type, value and location.

Parameters:
rhs The token to compare with.
Returns:
true If both tokens are is_equal.

template<typename Type, typename Location, typename Value>
void lestes::lang::cplus::lex::basic_token< Type, Location, Value >::gc_mark ( void   )  [inline, protected, virtual]

Marks the object.

Marks the object.

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

Reimplemented in lestes::lang::cplus::lex::cpp_token, lestes::lang::cplus::lex::pp_token, and lestes::lang::cplus::lex::ucn_token.

template<typename Type, typename Location, typename Value>
basic_token<Type,Location,Value>& lestes::lang::cplus::lex::basic_token< Type, Location, Value >::operator= ( const basic_token< Type, Location, Value > &  rhs  )  [private]

Hides assignment operator.


Member Data Documentation

template<typename Type, typename Location, typename Value>
convert<Type>::to_srp lestes::lang::cplus::lex::basic_token< Type, Location, Value >::type [private]

Type of token.

template<typename Type, typename Location, typename Value>
convert<Value>::to_srp lestes::lang::cplus::lex::basic_token< Type, Location, Value >::value [private]

Token value itself.

template<typename Type, typename Location, typename Value>
convert<Location>::to_srp lestes::lang::cplus::lex::basic_token< Type, Location, Value >::location [private]

Where the token is located.


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