Zen
A cross-platform functional programming language

Scanner::cursor Class Reference

Class for maintaining cursor in input stream. More...

#include <Scanner.hpp>

List of all members.

Public Member Functions

 cursor (Scanner &scanner)
 Default constructor.
int operator* ()
 Get current character that has been read from the input stream.
cursoroperator++ ()
 Advance input stream.
cursoroperator= (const cursor &src)
 Assign one cursor to another.

Private Attributes

Scanner_scanner
 The scanner instance.
int _pos
 Position in scanner.

Detailed Description

Class for maintaining cursor in input stream.


Constructor & Destructor Documentation

cursor ( Scanner scanner) [inline]

Default constructor.

Parameters:
scannerReference to input stream scanner

Member Function Documentation

int operator* ( ) [inline]

Get current character that has been read from the input stream.

Returns:
The current character
cursor& operator++ ( ) [inline]

Advance input stream.

Returns:
True if success, false if EOF
cursor& operator= ( const cursor src) [inline]

Assign one cursor to another.

Parameters:
srcSource instance
Returns:
Self reference

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines