User Documentation
RAVL, Recognition And Vision Library
DEVELOP HOME PAGE CLASS LIST CONTENTS
Ravl - Source Tools - Code Manager - SourceFileC
 

  PUBLIC
SourceFileC::SourceFileC(void)
SourceFileC::SourceFileC(bool)
SourceFileC::SourceFileC(const StringC &)
SourceFileC::SourceFileC(const StringC &,bool,bool)
SourceFileC::SourceFileC(istream &)
SourceFileC::Load(const StringC &)
SourceFileC::Load(istream &)
SourceFileC::CheckDocVar(const StringC &,const StringC &,bool)
SourceFileC::CheckDocVarSub(const StringC &,const StringC &,const StringC &,bool)
SourceFileC::GetDocValue(const StringC &)
SourceFileC::CheckHeader(const TextBufferC &,const StringC &,const StringC &,const StringC &,const StringC &)
SourceFileC::FileType(void)
SourceFileC::FileType(void) const
TextFileC::Load(const StringC &)
TextFileC::Load(istream &)
TextFileC::Save(void)
TextFileC::SetFilename(const StringC &)
TextFileC::Filename(void) const
TextFileC::Filename(void)
TextFileC::operator +=(const StringC &)
TextFileC::SetRenumber(void)
TextFileC::Empty(void)
TextFileC::Dump(ostream &) const
TextFileC::IsLoaded(void) const
TextFileC::FindLineMatch(const StringC &)
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::References(void) const
RCHandleC::operator <<(ostream &,const RCHandleC &)
RCHandleC::operator >>(istream &,RCHandleC &)

   SourceFileC   
 
Source File Body
 
include "Ravl/SourceTools/SourceFile.hh"
User Level:Develop
Library:RavlSourceTools
In Scope:RavlN

Parent Classes: Methods:
SourceFileC()
Default constructor.
Creates an in valid handle.

SourceFileC(bool)
Default constructor.
Creates an in valid handle.

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

SourceFileC(const StringC & text,bool noFinalReturn,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 at \n's, otherwise do.


SourceFileC(istream & fin)
Constructor from a stream.

bool Load(const StringC & filename)
Try and load a file.
NB. If this is called on an invalid buffer a new buffer will be created.

** MUST BE OVERLOADED IN DERIVED CLASSES **


bool Load(istream & instrm)
Load buffer from a stream.
NB. If this is called on an invalid buffer a new buffer will be created.

** MUST BE OVERLOADED IN DERIVED CLASSES **


bool CheckDocVar(const StringC & var,const StringC & value,bool force = false)
Check variable exists in hdr file.
if 'force' is true then update variable regardless if is there already or not.

bool CheckDocVarSub(const StringC & var,const StringC & subs,const StringC & value,bool force = false)
Check variable exists in hdr file.
if 'force' is true then update variable regardless if is there already or not.

StringC GetDocValue(const StringC & var)
Find a return a documentation value from the buffer.
Returns empty string if not found.

bool CheckHeader(const TextBufferC & hdr,const StringC & eoh,const StringC & name,const StringC & desc,const StringC & org)
Check a header is on file.
eoh, is the string that marks the 'end of header'. Returns true if the header has been updated.

StringC & FileType()
Access file type.

const StringC & FileType() const
Access file type.

#include "Ravl/Text/TextFile.hh"
bool Load(const StringC & filename)
Try and load a file.
NB. If this is called on an invalid buffer a new buffer will be created.

** MUST BE OVERLOADED IN DERIVED CLASSES **


bool Load(istream & instrm)
Load buffer from a stream.
NB. If this is called on an invalid buffer a new buffer will be created.

** MUST BE OVERLOADED IN DERIVED CLASSES **


bool Save()
Try and save this file.

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

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

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

bool 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 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.

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, Documentation by CxxDoc: Tue Aug 13 09:59:02 2002