Aegis  4.25.D505
Public Member Functions | Private Attributes
sub_diversion Class Reference

#include <diversion.h>

Public Member Functions

virtual ~sub_diversion ()
 sub_diversion ()
 sub_diversion (const wstring &arg1, bool arg2=false)
 sub_diversion (const sub_diversion &)
sub_diversionoperator= (const sub_diversion &)
bool resub_both () const
wchar_t getch ()
void ungetch (wchar_t wc)

Private Attributes

size_t pos
wstring text
bool resubstitute

Detailed Description

The sub_diversion class is used to represent the state of a substitution diversion.

Definition at line 31 of file diversion.h.


Constructor & Destructor Documentation

virtual sub_diversion::~sub_diversion ( ) [virtual]

The destructor.

The default constructor.

sub_diversion::sub_diversion ( const wstring arg1,
bool  arg2 = false 
)

The constructor.

Parameters:
arg1The text of this diversion.
arg2Wether or not to rescan the text of this diversion for more substitutions.

The copy constructor.


Member Function Documentation

The getch method is used to get the next character from the diversion.

Returns:
wchar_t; the next characters of the diversion text, or a wide NUL character if there is not more text to read from this diversion.
sub_diversion& sub_diversion::operator= ( const sub_diversion )

The assignment operator.

bool sub_diversion::resub_both ( ) const [inline]

Definition at line 65 of file diversion.h.

The ungetch method is used to return a chaaracter to the diversion, fo re-reading at a later time.

Note:
Only call ungetch with characters returned by getch, or the behaviour is undefinbed.

Field Documentation

size_t sub_diversion::pos [private]

The pos instance variable is used to remember where in the "text" the read point is up to.

Definition at line 92 of file diversion.h.

The resubstitute instance variable is used to remember whether or not this diversion is to be reinterpreted by the scanner.

Definition at line 104 of file diversion.h.

The text instance variable is used to remember text of this diversion.

Definition at line 98 of file diversion.h.


The documentation for this class was generated from the following file: