Developer Documentation
RAVL, Recognition And Vision Library
USER HOME PAGE CLASS LIST CONTENTS
Ravl - Core - XML - XMLOStreamC
 

  PUBLIC
XMLOStreamC::XMLOStreamC(OStreamC &)
XMLOStreamC::XMLOStreamC(const StringC &)
XMLOStreamC::StartTag(const StringC &,const RCHashC &,bool)
XMLOStreamC::StartTag(const StringC &,bool)
XMLOStreamC::StartContents(void)
XMLOStreamC::EndTag(const StringC &)
XMLOStreamC::EndTag(void)
XMLOStreamC::Indent(int)
XMLOStreamC::SetAttrib(const StringC &,const DataT &)
XMLOStreamC::SetAttrib(const StringC &,const StringC &)
XMLOStreamC::SetAttrib(const StringC &,const IntT &)
XMLOStreamC::SetAttrib(const StringC &,const UIntT &)
XMLOStreamC::SetAttrib(const StringC &,const char *&)
XMLOStreamC::SetAttrib(const StringC &,const RealT &)
OStreamC::form(const char *,...)
OStreamC::os(void)
OStreamC::os(void) const
OStreamC::operator ostream &(void)
OStreamC::operator const ostream &(void) const
OStreamC::write(const char *,StreamSizeT)
OStreamC::put(char)
OStreamC::operator <<(const char *)
OStreamC::operator <<(const DataT &)
OStreamC::Tell(void) const
OStreamC::Seek(streampos)
OStreamC::tellp(void) const
OStreamC::seekp(streampos)
OStreamC::seekp(streampos,SeekDirT)
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)
StreamBaseC::Init(istream *,StringC,bool)
StreamBaseC::Init(ostream *,StringC,bool)
StreamBaseC::buf(void)
StreamBaseC::buf(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::Body(void)
RCHandleC::Body(void) 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::Body(void)
RCHandleC::Body(void) const
RCHandleC::References(void) const
RCHandleC::operator <<(ostream &,const RCHandleC &)
RCHandleC::operator >>(istream &,RCHandleC &)

   XMLOStreamC   
 
XML Output Stream.
 
include "Ravl/XMLStream.hh"
Source file:Ravl/Core/System/XMLStream.hh
User Level:Normal
Library:RavlCore
In Scope:RavlN

Comments:
Provides extra functionality for generation of XML streams.

Parent Classes: Methods:
XMLOStreamC(OStreamC & os)
Construct from an ordinary stream.

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

void StartTag(const StringC & name,const RCHashC<StringC,StringC> & attribs,bool emptyTag = false)
Begin writting a tag with the given attributes.

void StartTag(const StringC & name,bool emptyTag = false)
Begin writting a tag with the given attributes.

void StartContents()
Call before writting contents of entity to stream.

void EndTag(const StringC & name)
End writting a tag.
if strict checking is enabled, name will be check against that of the open tag.

void EndTag()
End writting current entity.

void Indent(int off = 0)
Indent the following line appropriatly.

void SetAttrib(const StringC & name,const DataT & val)
Set 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)

void SetAttrib(const StringC & name,const StringC & val)
Set an integer attribute for entity.
This can only be called between StartTag and StartContents.

void SetAttrib(const StringC & name,const IntT & val)
Set an integer attribute for entity.
This can only be called between StartTag and StartContents.

void SetAttrib(const StringC & name,const UIntT & val)
Set an unsigned integer attribute for entity.
This can only be called between StartTag and StartContents.

void SetAttrib(const StringC & name,const char *& val)
Set a 'C' string attribute for entity.
This can only be called between StartTag and StartContents.

void SetAttrib(const StringC & name,const RealT & val)
Set a real valued attribute for entity.
This can only be called between StartTag and StartContents.

#include "Ravl/Stream.hh"
ostream & form(const char * format,...)
Print to stream using good old 'C' sytle formating.
This isn't the saftest function, it uses a fixed buffer of 4096 bytes.

This is a duplication of the function GNU iostreams for those platforms that don't have this function.


ostream & os()
Access ostream.

const ostream & os() const
Access ostream.

operator ostream &()
Converter.

operator const ostream &() const
Converter.

ostream & write(const char * d,StreamSizeT n)
Write data.
ostream compatable.

ostream & put(char ch)
Put character.
ostream compatable.

ostream & operator <<(const char * txt)
Output text.

ostream & operator <<(const DataT & dat)

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

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

streampos tellp() const
Where are we in the stream.
ostream compatable.

ostream & seekp(streampos to)
Goto a position in the stream.
ostream compatable.

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

#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!

bool Init(istream * ns,StringC afilename,bool nDelOnClose = true)
Setup
This should only be called on Stream's constructed with the default constructor!

bool Init(ostream * ns,StringC afilename,bool nDelOnClose = true)
Setup
This should only be called on Stream's constructed with the default constructor!

ios & buf()
Access handle.

const ios & buf() const
Access handle.

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

XMLBaseBodyC & Body()
Access body of object.

const XMLBaseBodyC & 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<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.

HandleRefCounterBodyC & Body()
Access body of object.

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

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


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