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.

sub_diversion::sub_diversion (  ) 

The default constructor.

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

The constructor.

Parameters:
arg1 The text of this diversion.
arg2 Wether or not to rescan the text of this diversion for more substitutions.

sub_diversion::sub_diversion ( const sub_diversion  ) 

The copy constructor.


Member Function Documentation

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.

wchar_t sub_diversion::getch (  ) 

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

Returns:
wchar_t; the next characters of the diversion text, or L'' if there is not more text to read from this diversion.

void sub_diversion::ungetch ( wchar_t  wc  ) 

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 91 of file diversion.h.

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

Definition at line 97 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 103 of file diversion.h.


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

Generated on Wed Mar 12 23:37:44 2008 for Aegis by  doxygen 1.5.5