Developer Documentation
RAVL, Recognition And Vision Library
USER HOME PAGE CLASS LIST CONTENTS
Ravl - OS - Configuration Files - ConfigFileC
 

  PUBLIC
ConfigFileC::ConfigFileC(void)
ConfigFileC::ConfigFileC(bool)
ConfigFileC::ConfigFileC(const StringC &,bool)
ConfigFileC::ConfigFileC(const RCAbstractC &)
ConfigFileC::ConfigFileC(ConfigFileBodyC &)
ConfigFileC::ConfigFileC(TextFileC &,const StringC &)
ConfigFileC::SetVar(const StringC &,const StringC &,const TextFragmentC &)
ConfigFileC::AddVar(const StringC &,const StringC &,const TextFragmentC &)
ConfigFileC::AddSection(const StringC &,ConfigFileC &,const TextFragmentC &)
ConfigFileC::Load(const StringC &,bool)
ConfigFileC::Name(void) const
ConfigFileC::CheckTag(const StringC &)
ConfigFileC::Value(const StringC &)
ConfigFileC::Value(const StringC &) const
ConfigFileC::Order(const StringC &)
ConfigFileC::operator [](const StringC &)
ConfigFileC::operator [](const StringC &) const
ConfigFileC::IsDefined(StringC)
ConfigFileC::Section(const StringC &)
ConfigFileC::IterVars(void)
ConfigFileC::ListSections(void)
ConfigFileC::Dump(ostream &,int)
RCHandleVC::Body(void) const
RCHandleVC::Body(void)
RCHandleVC::Save(ostream &) const
RCHandleVC::Save(BinOStreamC &) const
RCHandleVC::Abstract(void)
RCHandleVC::operator >>(istream &,RCHandleVC &)
RCHandleVC::operator >>(BinIStreamC &,RCHandleVC &)
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 &)

   ConfigFileC   
 
Config file.
 
include "Ravl/Text/ConfigFile.hh"
Created:14/05/1998 
Source file:Ravl/OS/Text/ConfigFile.hh
User Level:Normal
Library:RavlOS
Example:exConfigFile.cc
In Scope:RavlN

Parent Classes: Methods:
ConfigFileC()
Default constructor.
Creates an invalid handle.

ConfigFileC(bool)
Constructor.

ConfigFileC(const StringC & fn,bool doCheck = true)
Filename.

ConfigFileC(const RCAbstractC & ah)
Abstract constructor.
Note: If ah is not a handle for a config file an invalid handle will be created. As with the default constructor this can be checked for with the IsValid() method

ConfigFileC(ConfigFileBodyC & bod)
Body constructor.

ConfigFileC(TextFileC & af,const StringC & name)
Sub-section. constructor.

void SetVar(const StringC & str,const StringC & val,const TextFragmentC & frag)
Set a new variable.

void AddVar(const StringC & tag,const StringC & data,const TextFragmentC & nf)
Add text to a variable.

void AddSection(const StringC & tag,ConfigFileC & cf,const TextFragmentC & nf)
Add section.

bool Load(const StringC & fn,bool doCheck = true)
Load a def file.
If this is an invalid handle a new ConfigFileC will be created.

**** Derived classes MUST overload this function to ensure the correct class is created. ****


const StringC & Name() const
Get name of configuration.
In sections it will be the name of the current section, otherwise it will be set to the name of the file.

bool CheckTag(const StringC & tag)
Check if a tag is valid.

StringC Value(const StringC & tag)
Get value of tag.

StringC Value(const StringC & tag) const
Get value of tag.

UIntT Order(const StringC & tag)
Get the order no for tagged object.

StringC & operator [](const StringC & tag)
Get value of tag.

const StringC & operator [](const StringC & tag) const
Get value of tag.

bool IsDefined(StringC tag)
Is tag defined ?

ConfigFileC Section(const StringC & tag)
Look for sub-section.
If none found an invalid handle is returned.

ConfigFileIterVarC IterVars()
Iterate variables.

DListC<StringC> ListSections()
Make a list of sections.

void Dump(ostream & out,int depth = 0)
Dump contents of file to 'out' stream.

#include "Ravl/RCHandleV.hh"
const ConfigFileBodyC & Body() const
Constant access to body of object.

ConfigFileBodyC & Body()
Constant access to body of object.

bool Save(ostream & out) const
Save to stream 'out'.

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

RCAbstractC Abstract()
Create an abstract handle.

istream & operator >>(istream & strm,RCHandleVC<ConfigFileBodyC> & obj)

BinIStreamC & operator >>(BinIStreamC & strm,RCHandleVC<ConfigFileBodyC> & obj)

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

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

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

bool operator !=(const RCHandleC<ConfigFileBodyC> & 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.

ConfigFileBodyC & Body()
Access body of object.

const ConfigFileBodyC & 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<ConfigFileBodyC> & obj)

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


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