Developer Documentation
RAVL, Recognition And Vision Library
USER HOME PAGE CLASS LIST CONTENTS
Ravl - Source Tools - Code Manager - SourceFileBodyC
 

  PUBLIC
SourceFileBodyC::SourceFileBodyC(void)
SourceFileBodyC::SourceFileBodyC(const StringC &)
SourceFileBodyC::SourceFileBodyC(const StringC &,bool,bool)
SourceFileBodyC::SourceFileBodyC(istream &)
SourceFileBodyC::Load(const StringC &)
SourceFileBodyC::CheckDocVar(const StringC &,const StringC &,bool)
SourceFileBodyC::CheckDocVarSub(const StringC &,const StringC &,const StringC &,bool)
SourceFileBodyC::GetDocValue(const StringC &)
SourceFileBodyC::CheckHeader(const TextBufferC &,const StringC &,const StringC &,const StringC &,const StringC &)
SourceFileBodyC::FileType(void)
SourceFileBodyC::FileType(void) const
SourceFileBodyC::IdFile(void)
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)

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

Parent Classes: Variables:
StringC fileType;
"Unknown"=Completely unknown. "Text"=Unknown text file. "C"=C source. "CH"=C header file. "C++"=C++ source "C++H"=C++ Header "Make"=Make file. "Java"=Java code. "Perl"=Perl code. "Lex"=Lex or Flex file. "Yacc"=Yacc or Bison file.

static HashC extToType;

static HashC commentString;

static HashC commentEndString;

Methods:
SourceFileBodyC()
Default constructor.

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

SourceFileBodyC(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 up lines, otherwise do.


SourceFileBodyC(istream & fin)
Constructor from a stream.

bool Load(const StringC & filename)
Load from file.

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.

StringC & FileType()
Access file type.

const StringC & FileType() const
Access file type.

StringC IdFile()
Id the current file.

#include "Ravl/Text/TextFile.hh"
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, Documentation by CxxDoc: Tue Aug 13 09:59:30 2002