User Documentation
Centre for Vision, Speech & Signal Processing
DEVELOP IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
TextCursorC::TextCursorC(void)
TextCursorC::TextCursorC(TextPFileC &)
TextCursorC::TextCursorC(TextPBuffC &)
TextCursorC::TextCursorC(const StringC &)
TextCursorC::TextCursorC(TextPFileC &,DLIterC,int)
TextCursorC::TextCursorC(TextPBuffC &,DLIterC,int)
TextCursorC::TextCursorC(const TextCursorC &)
TextCursorC::Goto(LineNoT,CharNoT)
TextCursorC::LineNo(void) const
TextCursorC::GotoCol(CharNoT)
TextCursorC::Insert(StringC,BooleanT)
TextCursorC::InsertLine(StringC)
TextCursorC::InsertLineBefore(StringC)
TextCursorC::Clip(const Regex &)
TextCursorC::ClipWordInc(const SArray1dC &)
TextCursorC::ClipID(void)
TextCursorC::ClipWord(const SArray1dC &,BooleanT)
TextCursorC::BuildClipTable(const char *)
TextCursorC::ClipWord(const char *,BooleanT)
TextCursorC::Skip(const Regex &)
TextCursorC::Skip(const StringC &)
TextCursorC::Skip(const char *)
TextCursorC::SkipChars(const char *)
TextCursorC::SkipChars(const SArray1dC &)
TextCursorC::SkipWhite(void)
TextCursorC::IsElm(void) const
TextCursorC::LineText(void)
TextCursorC::LineText(void) const
TextCursorC::RestOfLine(void)
TextCursorC::Char(void)
TextCursorC::NextChar(void)
TextCursorC::PrevChar(void)
TextCursorC::NextLine(void)
TextCursorC::PrevLine(void)
TextCursorC::FirstLine(void)
TextCursorC::LastLine(void)
TextCursorC::BeginLine(void)
TextCursorC::EndOfBuffer(void)
TextCursorC::TextPFile(void)
TextCursorC::TextPFile(void) const
TextCursorC::ColNum(void) const
TextCursorC::PositionTxt(void)
TextCursorC
 
Cursor in text buffer.
 
include "amma/TxCursor.hh"
User Level:Default
Library:TextProc
Example:exDPSplit.cc
Section:Basic Types.Text Text Processing
In Scope:std

Comments:
This is a SMALL object.

Parent Classes: Variables:
Methods:
TextCursorC()
Default constructor.

TextCursorC(TextPFileC & file)
Constructor.

TextCursorC(TextPBuffC & file)
Constructor.

TextCursorC(const StringC & file)
Constructor.

TextCursorC(TextPFileC & file,DLIterC<TextPFileLineC> AtLine,int ncol = 0)
Constructor.

TextCursorC(TextPBuffC & buff,DLIterC<TextPFileLineC> AtLine,int ncol = 0)
Constructor.

TextCursorC(const TextCursorC & oth)
Copy constructor.

BooleanT Goto(LineNoT line,CharNoT charno = 0)
Goto a specific line/char.

LineNoT LineNo() const
Get the current lineno.

BooleanT GotoCol(CharNoT col)
Goto a specific char on current line.

BooleanT Insert(StringC txt,BooleanT leaveAtEnd = false)
Insert text after charactor indicated by the cursor.
If 'leaveAtEnd' is true the cursor is left after the inserted text, otherwise the cursor isn't changed. Returns true on success.

BooleanT InsertLine(StringC txt)
Insert line of text on line after cursor.

BooleanT InsertLineBefore(StringC txt)
Insert line of text on line before cursor.

StringC Clip(const Regex & exp)
Clip out a substring from the current line.
leave the cursor positioned after the text that was returend. NB. Buffer is not changed !

StringC ClipWordInc(const SArray1dC<BooleanT> & table)
Clip out a string of charactors included in 'table'.
leave the cursor positioned after the text that was returend. NB. Buffer is not changed !

StringC ClipID()
Clip out a identifier from line.
This follows the usual 'C' type rules. In Regex language: "[A-Za-z_][A-Za-z0-9_]*". leave the cursor positioned after the text that was returend. NB. Buffer is not changed !

StringC ClipWord(const SArray1dC<BooleanT> & table,BooleanT initalSkipDelim = true)
Clip out string deliminated by delim charactors.
table has 256 elements one for each charactor. TRUE means its a delim.

Effectively does a SkipWhite(), the Clip("[^ ]*");

leave the cursor positioned after the text that was returend. NB. Buffer is not changed !

Only if initalSkipDelim is true, deliminators at the begining of the string will be skiped.


SArray1dC<BooleanT> BuildClipTable(const char * delim)
Build a clip table suitable for above.

StringC ClipWord(const char * delim = " \n\t\r\0",BooleanT initalSkipDelim = true)
Clip out string deliminated by delim charactors.
Effectively does a SkipWhite(), the Clip("[^ ]*");

leave the cursor positioned after the text that was returend. NB. Buffer is not changed !

Only if initalSkipDelim is true, deliminators at the begining of the string will be skiped.


BooleanT Skip(const Regex & exp)
Skip the text described by exp.
Returns True if expression was matched.

BooleanT Skip(const StringC & text)
Skip a fixed string.
Returns True if the strip was found. if not returns false, and leaves iterator unchanged.

BooleanT Skip(const char * text)
Skip a fixed string.
Returns True if the strip was found. if not returns false, and leaves iterator unchanged.

BooleanT SkipChars(const char * delim)
Skip all charactors in delim
Returns True if left at a valid place.

BooleanT SkipChars(const SArray1dC<BooleanT> & table)
Skip all charactors in table.
the table can be created by BuildClipTable. Returns True if left at a valid place.

BooleanT SkipWhite()
Skip white spaces, including carrage return.

BooleanT IsElm() const
Is on valid line.

StringC & LineText()
Text on current line.

const StringC & LineText() const
Text on current line.

SubStringC RestOfLine()
Get the rest of the current line.

CharT & Char()
Get charactor.

BooleanT NextChar()
Goto next charactor in buffer.

BooleanT PrevChar()
Goto previous charactor in buffer.

BooleanT NextLine()
Goto next line.

void PrevLine()
Goto previous line.

void FirstLine()
Goto previous line.

void LastLine()
Goto previous line.

void BeginLine()
Goto begining of line.

void EndOfBuffer()
Goto the end of the buffer.

TextPFileC & TextPFile()
Get text file.

const TextPFileC & TextPFile() const
Get text file.

CharNoT ColNum() const
Get the current columb number.

StringC PositionTxt()
Print out position in human readable sytle.


Programmer:Charles Galambos, Documentation by CxxDoc: Tue Mar 20 10:48:08 2001