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

  PUBLIC
TextFileBodyC::TextFileBodyC(void)
TextFileBodyC::TextFileBodyC(TextBufferC &)
TextFileBodyC::TextFileBodyC(const StringC &)
TextFileBodyC::TextFileBodyC(const StringC &,bool,bool)
TextFileBodyC::TextFileBodyC(istream &)
TextFileBodyC::Load(const StringC &)
TextFileBodyC::Load(istream &)
TextFileBodyC::Save(void)
TextFileBodyC::SetFilename(const StringC &)
TextFileBodyC::Filename(void)
TextFileBodyC::Filename(void) const
TextFileBodyC::operator +=(const StringC &)
TextFileBodyC::SetRenumber(void)
TextFileBodyC::Empty(void)
TextFileBodyC::Dump(ostream &) const
TextFileBodyC::IsLoaded(void) const
TextFileBodyC::FindLineMatch(const StringC &)
TextBufferBodyC::Load(const StringC &)
TextBufferBodyC::AppendFile(const StringC &)
TextBufferBodyC::Load(istream &)
TextBufferBodyC::Append(istream &)
TextBufferBodyC::SaveAs(const StringC &)
TextBufferBodyC::AppendLine(const StringC &,bool)
TextBufferBodyC::Append(const StringC &,bool)
TextBufferBodyC::GlobalSubst(const StringC &,const StringC &)
TextBufferBodyC::Empty(void)
TextBufferBodyC::Dump(ostream &) const
TextBufferBodyC::NoLines(void) const
TextBufferBodyC::IsReadonly(void) const
TextBufferBodyC::SetModified(void)
TextBufferBodyC::Lines(void)
TextBufferBodyC::operator [](IntT)
TextBufferBodyC::IsModified(void) const
TextBufferBodyC::SetReadonly(bool)
TextBufferBodyC::RemoveTrailingWhiteSpace(void)
RCBodyVC::Save(ostream &) const
RCBodyVC::Save(BinOStreamC &) const
RCBodyVC::Copy(void) const
RCBodyVC::DeepCopy(UIntT) const
RCBodyC::References(void) const
RCBodyC::Copy(void) const
RCBodyC::DeepCopy(UIntT) const
RCBodyC::IncRefCounter(void)
RCBodyC::DecRefCounter(void)

   TextFileBodyC   
 
Text File, for use in text processing.
 
include "Ravl/Text/TextFile.hh"
Created:05/12/1997 
Source file:Ravl/OS/Text/TextFile.hh
User Level:Normal
Library:RavlOS
In Scope:RavlN

Comments:
This is a BIG object!

Parent Classes: Derived Classes: Variables:
StringC filename;
Name of file.

bool renumber;
Need to renumber

bool loaded;

Methods:
TextFileBodyC()
Default constructor.

TextFileBodyC(TextBufferC & tb)
Default constructor.

TextFileBodyC(const StringC & filename)
Constructor from a file.

TextFileBodyC(const StringC & text,bool noFinalRet,bool concat = false)
Construct from a string.
If 'noFinalReturn' is false, ensure each line ends with '\n', otherwise leave it alone.

concat, if true don't split lines, otherwise do.


TextFileBodyC(istream & fin)
Constructor from a stream.

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

bool Load(istream & instrm)
Load buffer from a stream.

bool Save()
Try and save this file.

bool SetFilename(const StringC & filename)
Set filename to use.

StringC & Filename()
Get the name of the file.

const StringC & Filename() const
Get the name of the file.

void operator +=(const StringC & text)
Append a line of text to the end of the file.

void SetRenumber()
Set renumber flag.

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

void Dump(ostream & strm) const
Dump to stdout.

bool IsLoaded() const
Have file loaded into memory ?

IntT FindLineMatch(const StringC & str)
Find a line begining with string 'str'.
returns line no otherwise -1.

#include "Ravl/Text/TextBuffer.hh"
bool Load(const StringC & filename)
Try and load a file.

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

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

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 noFinalReturn = false)
Append a line of text to file.
If 'noFinalReturn' is false, check each line ends with '\n', otherwise leave it alone.

returns LineNo or -1 if failed.


UIntT Append(const StringC & text,bool noFinalReturn = false)
Append a line of text to file.
If 'noFinalReturn' is false, check 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.

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.
This function is SLOW! Use a TextCursorC for iterating through a buffer.

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/RCHandleV.hh"
bool Save(ostream & out) const
Save to stream 'out'.

bool Save(BinOStreamC & out) const
Save to binary stream 'out'.

RCBodyVC & Copy() const
Make copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

RCBodyC & DeepCopy(UIntT levels = ((UIntT))) const
Make a deep copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

#include "Ravl/RefCounter.hh"
UIntT References() const
Access count of handles open to this object.

RCBodyC & Copy() const
Make copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

RCBodyC & DeepCopy(UIntT levels = ((UIntT))) const
Make a deep copy of body.
This should be provided in derived classes. this funtion will issue an assertion failure if called.

void IncRefCounter()
Increment reference counter.

bool DecRefCounter()
Decrement reference counter.


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