lestes::lang::cplus::lex::string_source Class Reference

String data source. More...

#include <string_source.hh>

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

Inheritance graph
[legend]
List of all members.

Public Types

typedef lstring string_type
 Type of string.
typedef string_type::size_type index_type
 Type of index into the string.

Public Member Functions

ptr< ucn_tokenread (void)
 Reads one token from string.

Static Public Member Functions

static ptr< string_sourcecreate (const string_type &a_str)
 Returns new instance, initializes with string.

Protected Member Functions

 string_source (const string_type &a_str)
 Creates the object, initializes with string.

Private Member Functions

 string_source (const string_source &)
 Hides copy constructor.
string_sourceoperator= (const string_source &)
 Hides assignment operator.

Private Attributes

string_type str
 String to read from.
index_type idx
 Position in string.

Detailed Description

String data source.

Represents data source reading from host character string.


Member Typedef Documentation

typedef lstring lestes::lang::cplus::lex::string_source::string_type

Type of string.

typedef string_type::size_type lestes::lang::cplus::lex::string_source::index_type

Type of index into the string.


Constructor & Destructor Documentation

lestes::lang::cplus::lex::string_source::string_source ( const string_type a_str  )  [protected]

Creates the object, initializes with string.

Creates the object, initializes with string.

Postcondition:
offset == 0

idx = = 0

Parameters:
a_str The string with data.

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

Hides copy constructor.


Member Function Documentation

ptr< ucn_token > lestes::lang::cplus::lex::string_source::read ( void   )  [virtual]

Reads one token from string.

Reads next token from string.

Returns:
The next character.

Implements lestes::lang::cplus::lex::ucn_filter.

ptr< string_source > lestes::lang::cplus::lex::string_source::create ( const string_type a_str  )  [static]

Returns new instance, initializes with string.

Returns new instance, initializes with string.

Parameters:
a_str The source string.
Returns:
The new instance.

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

Hides assignment operator.


Member Data Documentation

string_type lestes::lang::cplus::lex::string_source::str [private]

String to read from.

index_type lestes::lang::cplus::lex::string_source::idx [private]

Position in string.


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