User Documentation
RAVL, Recognition And Vision Library
DEVELOP HOME PAGE CLASS LIST CONTENTS
Ravl - Core - XML - XMLIStreamC
 

  PUBLIC
XMLIStreamC::XMLIStreamC(IStreamC &)
XMLIStreamC::XMLIStreamC(const StringC &)
XMLIStreamC::ReadTag(StringC &,RCHashC &)
XMLIStreamC::ReadTag(StringC &)
XMLIStreamC::SkipElement(void)
XMLIStreamC::SkipToElement(const StringC &,RCHashC &)
XMLIStreamC::ReadID(void)
XMLIStreamC::GetAttrib(const StringC &,StringC &)
XMLIStreamC::GetAttrib(const StringC &,IntT &)
XMLIStreamC::GetAttrib(const StringC &,UIntT &)
XMLIStreamC::GetAttrib(const StringC &,RealT &)
XMLIStreamC::GetAttrib(const StringC &,const DataT &)
IStreamC::Unget(StringC)
IStreamC::Unget(const char *,int)
IStreamC::CopyTo(OStreamC &,IntT)
IStreamC::is(void)
IStreamC::is(void) const
IStreamC::operator istream &(void)
IStreamC::operator const istream &(void) const
IStreamC::read(char *,streamsize)
IStreamC::get(char &)
IStreamC::get(void)
IStreamC::get(char *,int)
IStreamC::getline(char *,int)
IStreamC::gcount(void)
IStreamC::operator >>(DataT &)
IStreamC::operator >>(char *)
IStreamC::Tell(void) const
IStreamC::Seek(streampos)
IStreamC::tellg(void) const
IStreamC::seekg(streampos)
IStreamC::seekg(streampos,SeekDirT)
IStreamC::IsEndOfStream(void)
IStreamC::GetChar(void)
IStreamC::SkipWhiteSpace(void)
IStreamC::Skip(const char *)
IStreamC::SkipTo(const StringC &)
IStreamC::SkipTo(char)
IStreamC::ClipTo(char)
IStreamC::ClipTo(const StringC &)
IStreamC::ClipWord(const char *,bool)
XMLBaseC::EncodeLitteral(const StringC &)
XMLBaseC::DecodeLitteral(const StringC &)
XMLBaseC::Context(void)
XMLBaseC::IsContext(void) const
XMLBaseC::ContextName(void) const
XMLBaseC::Context(void) const
XMLBaseC::StartContext(const StringC &,bool)
XMLBaseC::StartContext(const StringC &,const RCHashC &,bool)
XMLBaseC::StartContext(const XMLElementC &)
XMLBaseC::EndOfContext(const StringC &)
XMLBaseC::EndOfContext(void)
XMLBaseC::IsStrict(void) const
XMLBaseC::IsContent(void) const
XMLBaseC::SetContent(bool)
XMLBaseC::LevelsNested(void) const
XMLBaseC::GetAttrib(const StringC &,StringC &)
XMLBaseC::SetAttrib(const StringC &,const StringC &)
StreamBaseC::Name(void) const
StreamBaseC::IsOpen(void) const
StreamBaseC::good(void) const
StreamBaseC::bad(void) const
StreamBaseC::eof(void) const
StreamBaseC::fail(void) const
StreamBaseC::operator !(void) const
StreamBaseC::operator void *(void) const
StreamBaseC::DiagnoseStream(ostream &)
StreamBaseC::Close(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 &)
HandleRefCounterC::SetDestructionOp(const TriggerC &)
HandleRefCounterC::References(void) const
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 &)

   XMLIStreamC   
 
XML Input Stream.
 
include "Ravl/XMLStream.hh"
User Level:Normal
Library:RavlCore
In Scope:RavlN

Comments:
Provides extra functionality for parsing of XML streams.

Parent Classes: Methods:
XMLIStreamC(IStreamC & is)
Construct from an ordinary stream.

XMLIStreamC(const StringC & fn)
Construct from an ordinary stream.

XMLTagOpsT ReadTag(StringC & name,RCHashC<StringC,StringC> & attr)
Read a tag from a stream.
returns XMLBeginTag, XMLEndTag or XMLEmptyTag. This will skip comments and DTD info, and anything else it doesn't understand.

XMLTagOpsT ReadTag(StringC & name)
Read a tag from a stream.
returns XMLBeginTag, XMLEndTag or XMLEmptyTag. This will skip comments and DTD info, and anything else it doesn't understand.

bool SkipElement()
Skip to after the end of the current element.

XMLTagOpsT SkipToElement(const StringC & elementName,RCHashC<StringC,StringC> & attr)
Skip to named element.
This will skip to the next tag of the given name. if the Current context ends it will return XMLEndTag.

StringC ReadID()
Read an ID from the stream.
This will skip any intial white space, but will return an empty string if an invalid characters is found.

bool GetAttrib(const StringC & name,StringC & val)
Get a string attribute for entity.
This can only be called between StartTag and StartContents. This returns true if attribute is set.

bool GetAttrib(const StringC & name,IntT & val)
Get an integer attribute for entity.
This can only be called between StartTag and StartContents. This returns true if attribute is set.

bool GetAttrib(const StringC & name,UIntT & val)
Get an unsigned integer attribute for entity.
This can only be called between StartTag and StartContents. This returns true if attribute is set.

bool GetAttrib(const StringC & name,RealT & val)
Get a real valued attribute for entity.
This can only be called between StartTag and StartContents. This returns true if attribute is set.

bool GetAttrib(const StringC & name,const DataT & val)
Get an abitary valued attribute for entity.
This can only be called between StartTag and StartContents. The attribute value is stored using its default streaming operators. (ostream and istream)

#include "Ravl/Stream.hh"
void Unget(StringC text)
Put string pack. (Puts a '\n')

void Unget(const char * dat,int len)
Put string pack.

IntT CopyTo(OStreamC & out,IntT maxChars = - 1)
Copy stream to output.

istream & is()
Access input stream.

const istream & is() const
Access input stream.

operator istream &()
Converter.

operator const istream &() const
Converter.

istream & read(char * d,streamsize n)
read data.
istream compatable function.

istream & get(char & ch)
Get character.
istream compatable function.

char get()
Get character.
istream compatable function.

istream & get(char * buff,int buffsize)
Read in a line.
istream compatable function.

istream & getline(char * buff,int buffsize)
Read in a line.
istream compatable function.

streamsize gcount()
Get number of character read in last operation.
istream compatable function.

istream & operator >>(DataT & dat)

istream & operator >>(char * dat)

streampos Tell() const
Where are we in the stream.

void Seek(streampos to)
Goto a position in the stream.

streampos tellg() const
Where are we in the stream.
istream compatable function.

istream & seekg(streampos to)
Goto a position in the stream.
istream compatable function.

istream & seekg(streampos to,SeekDirT dir)
Goto a position in the stream.
istream compatable.

bool IsEndOfStream()
Test if its the end of the stream is comming up...
Maybe there's a better way ?

Parsing Functions.

Some methods to help parse text streams.
char GetChar()
Get next character.
This will throw an ExceptionEndOfStreamC if the end of the input stream is found.

char SkipWhiteSpace()
Skip white space characters.
returns the first non-white space character found.

This will throw an ExceptionEndOfStreamC if the end of the input stream is found.


bool Skip(const char * delim = " \n\t\r")
Skip all 'delim' characters.
Leaves stream at first character this is not one of those listed in 'delim'. If end of stream is found before returns false.

bool SkipTo(const StringC & endStr)
Skip through stream until endStr is found.
this leaves the stream positioned at the first character after the string.

returns false if the end of the stream is found first.


bool SkipTo(char let)
Skip through stream until 'let' is found.
returns false if the end of the stream is found first.

StringC ClipTo(char let)
Return all characters before let.
the 'let' character is discarded.

If the end of stream is found, all data found upto that point is returned.


StringC ClipTo(const StringC & endStr)
Return all characters before 'endStr'.
this leaves the stream positioned at the first character after the string.

If the end of stream is found, all data found upto that point is returned.


StringC ClipWord(const char * delim = " \n\t\r",bool initalSkipDelim = false)
Clip word until one of 'delim' characters are found.

#include "Ravl/XMLStream.hh"
static StringC EncodeLitteral(const StringC & str)
Convert a string into a form that will not confuse XML.

static StringC DecodeLitteral(const StringC & str)
Decode a string from its XML encoding to the original string.

XMLElementC & Context()
Access current context.

bool IsContext() const
Are we in a valid context ?

StringC ContextName() const
Get the name of the current context (the last open tag.)

const XMLElementC & Context() const
Access current context.

bool StartContext(const StringC & str,bool emptyTag = false)
Start a new element.

bool StartContext(const StringC & str,const RCHashC<StringC,StringC> & attrs,bool emptyTag = false)
Start a new element

bool StartContext(const XMLElementC & elem)
Start a new element

bool EndOfContext(const StringC & nm)
End the current context.

bool EndOfContext()
End the current context.

bool IsStrict() const
In strict mode ?
if true issue errors if XML consitancy check fails in reading or writing.

bool IsContent() const
Got content ?
True if content has been found.

void SetContent(bool cont)
Set got content.

UIntT LevelsNested() const
Number of open elements in the stack.

bool GetAttrib(const StringC & name,StringC & val)
Set string attribute.

void SetAttrib(const StringC & name,const StringC & val)
Set a string valued attribute.

#include "Ravl/Stream.hh"
const StringC & Name() const
Returns the name of the stream.

bool IsOpen() const
Test if this stream is open.

bool good() const
Is stream good ?

bool bad() const
Is stream corrupted ?

bool eof() const
End of file ?

bool fail() const
Operation failed ?

bool operator !() const
Not failed ?

operator void *() const
Ok ?

bool DiagnoseStream(ostream & out)
Print diagnostic message about the streams state to out.

bool Close()
Close this stream.
After this is called no further IO should be attempted!

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

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

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

bool operator !=(const RCHandleC<XMLBaseBodyC> & 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<XMLBaseBodyC> & obj)

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

#include "Ravl/HandleRefCounter.hh"
void SetDestructionOp(const TriggerC & ntrig)
Set trigger to call on delete.

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

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

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

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

bool operator !=(const RCHandleC<HandleRefCounterBodyC> & 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<HandleRefCounterBodyC> & obj)

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


Maintainer:Charles Galambos, Documentation by CxxDoc: Tue Aug 13 09:59:02 2002