Developer Documentation
RAVL, Recognition And Vision Library
USER HOME PAGE CLASS LIST CONTENTS
Ravl - OS - Text Processing - TextBufferC
 

  PUBLIC
TextBufferC::TextBufferC(void)
TextBufferC::TextBufferC(bool)
TextBufferC::TextBufferC(TextBufferBodyC &)
TextBufferC::Body(void)
TextBufferC::Body(void) const
TextBufferC::Load(const StringC &)
TextBufferC::Load(istream &)
TextBufferC::AppendFile(const StringC &)
TextBufferC::Append(istream &)
TextBufferC::SaveAs(const StringC &)
TextBufferC::AppendLine(const StringC &,bool)
TextBufferC::Append(const StringC &,bool)
TextBufferC::GlobalSubst(const StringC &,const StringC &)
TextBufferC::Empty(void)
TextBufferC::Dump(ostream &) const
TextBufferC::NoLines(void) const
TextBufferC::IsReadonly(void) const
TextBufferC::SetModified(void)
TextBufferC::Lines(void)
TextBufferC::operator [](IntT)
TextBufferC::IsModified(void) const
TextBufferC::SetReadonly(bool)
TextBufferC::RemoveTrailingWhiteSpace(void)
RCHandleC::operator =(const RCHandleC &)
RCHandleC::DeepCopy(UIntT) const
RCHandleC::operator ==(const RCHandleC &) const
RCHandleC::operator !=(const RCHandleC &) const
RCHandleC::Hash(void) const
RCHandleC::IsValid(void) const
RCHandleC::Invalidate(void)
RCHandleC::IsHandleType(const DT &) const
RCHandleC::CheckHandleType(const DT &) const
RCHandleC::Body(void)
RCHandleC::Body(void) const
RCHandleC::References(void) const
RCHandleC::operator <<(ostream &,const RCHandleC &)
RCHandleC::operator >>(istream &,RCHandleC &)

   TextBufferC   
 
Text buffer.
 
include "Ravl/Text/TextBuffer.hh"
Created:05/12/1997 
Source file:Ravl/OS/Text/TextBuffer.hh
User Level:Normal
Library:RavlOS
In Scope:RavlN

Parent Classes: Derived Classes: Methods:
TextBufferC()
Default constructor.
creates an invalid handle to a text buffer.

TextBufferC(bool)
Default constructor.
creates an invalid handle to a text buffer.

TextBufferC(TextBufferBodyC & bod)
Body constructor.

TextBufferBodyC & Body()
Access body.

const TextBufferBodyC & Body() const
Access body.

bool Load(const StringC & filename)
Try and load a file.

bool Load(istream & strm)
Create buffer from stream.

bool AppendFile(const StringC & filename)
Append a file to the end of this one.

bool Append(istream & strm)
Append contents of a stream to this file.

bool SaveAs(const StringC & filename)
Try and save this file as another name.

UIntT AppendLine(const StringC & text,bool noFinalRet = false)
Append a line of text to file.
If 'noFinalReturn' is false, ensure each line ends with '\n', otherwise leave it alone.

returns LineNo or -1 if failed.



UIntT Append(const StringC & text,bool noFinalRet = false)
Append a line of text to file.
If 'noFinalReturn' is false, ensure each line ends with '\n', otherwise leave it alone.

returns LineNo or -1 if failed.



IntT GlobalSubst(const StringC & org,const StringC & nv)
Substute 'org' for 'nv' the whole buffer.
returns the number of substitutions done.

void Empty()
Empty all contents, set name to noname

void Dump(ostream & strm) const
Dump to stdout.
For debuging only.

UIntT NoLines() const
Return number of lines in buffer.

bool IsReadonly() const
Is readonly ?

void SetModified()
Set renumber flag.

DListC<TextFileLineC> & Lines()
Access list of lines directly.

StringC & operator [](IntT x)
Access a line in the file.

bool IsModified() const
Has buffer been modified ?

void SetReadonly(bool newval)
Set readonly flag for file.

bool RemoveTrailingWhiteSpace()
Remove trailing white space from the file.
returns true if changes have been made.

#include "Ravl/RefCounter.hh"
const RCHandleC<TextBufferBodyC> & operator =(const RCHandleC<TextBufferBodyC> & oth)
Assign handle.

RCHandleC<TextBufferBodyC> DeepCopy(UIntT levels = ((UIntT))) const
Do a deep copy of the object.

bool operator ==(const RCHandleC<TextBufferBodyC> & oth) const
Are handles to the same object ?

bool operator !=(const RCHandleC<TextBufferBodyC> & oth) const
Are handles to different objects ?

UIntT Hash() const
Default hash function.
This hashes on the address of the body.

bool IsValid() const
Test if this is a valid handle.

void Invalidate()
Invalidate this handle.
Unattaches the body from the handle.

bool IsHandleType(const DT &) const
Is handle of given type ?

void CheckHandleType(const DT & dummy) const
Check handle type. Throw an expception if not.

TextBufferBodyC & Body()
Access body of object.

const TextBufferBodyC & Body() const
Constant access to body of object.

UIntT References() const
Find the number of references to the body of this object.

ostream & operator <<(ostream & strm,const RCHandleC<TextBufferBodyC> & obj)

istream & operator >>(istream & strm,RCHandleC<TextBufferBodyC> & obj)


Maintainer:Charles Galambos, Created: 05/12/1997, Documentation by CxxDoc: Tue Aug 13 09:59:30 2002