User Documentation
RAVL, Recognition And Vision Library
DEVELOP HOME PAGE CLASS LIST CONTENTS
Ravl - Core - IO - Formats - FileFormatBodyC
 

  PUBLIC
FileFormatBodyC::FileFormatBodyC(StringC,StringC,bool)
FileFormatBodyC::~FileFormatBodyC(void)
FileFormatBodyC::Name(void) const
FileFormatBodyC::Description(void) const
FileFormatBodyC::ProbeLoad(IStreamC &,const type_info &) const
FileFormatBodyC::ProbeLoad(const StringC &,IStreamC &,const type_info &) const
FileFormatBodyC::ProbeLoad(const StringC &,const type_info &) const
FileFormatBodyC::ProbeLoad(const type_info &) const
FileFormatBodyC::ProbeSave(const StringC &,const type_info &,bool) const
FileFormatBodyC::ProbeSave(const type_info &) const
FileFormatBodyC::CreateInput(const StringC &,const type_info &) const
FileFormatBodyC::CreateOutput(const StringC &,const type_info &) const
FileFormatBodyC::CreateInput(IStreamC &,const type_info &) const
FileFormatBodyC::CreateOutput(OStreamC &,const type_info &) const
FileFormatBodyC::DefaultType(void) const
FileFormatBodyC::Priority(void) const
FileFormatBodyC::IsStream(void) const
FileFormatBodyC::ReadString(IStreamC &,StringC &,UIntT)
FileFormatBodyC::ExtractDevice(const StringC &)
FileFormatBodyC::ExtractParams(const StringC &)
FileFormatBodyC::Extension(const StringC &)
DPEntityBodyC::Save(ostream &) const
DPEntityBodyC::Save(BinOStreamC &) const
DPEntityBodyC::Copy(void) const
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)

   FileFormatBodyC   
 
File format implementation.
 
include "Ravl/DP/FileFormat.hh"
Created:13/08/1998 
User Level:Develop
Library:RavlIO
Example:exFileFormat.cc
In Scope:RavlN

Comments:
To add new file formats to the system derive a new class from this one and provide new Probe(), CreateInput/CreateOutput, and DefaultType functions. Then create a new handle class for your format and declare it as a global variable.

Parent Classes: Derived Classes: Variables:
Methods:
FileFormatBodyC(StringC nformatName = "",StringC nDesc = "None.",bool pubList = true)
Constructor.
'nformatName' is the name of the file format being registered. pubList, Indicates if format should be entered into the public database.

~FileFormatBodyC()
Destructor

const StringC & Name() const
Name of file format.

const StringC & Description() const
Description of fileformat.

const type_info & ProbeLoad(IStreamC & in,const type_info & obj_type) const
Is stream in this format ?
This asks the question: Can stream 'in' be loaded into object 'obj_type' ? typeid(void) == no, otherwise returns the prefered load type.

const type_info & ProbeLoad(const StringC & filename,IStreamC & in,const type_info & obj_type) const
Is stream in this format ?
This asks the question: Can stream 'in' be loaded into object 'obj_type' ? If used with a empty filename asks: Can load this type of object ? typeid(void) == no, otherwise returns the prefered load type.

const type_info & ProbeLoad(const StringC & filename,const type_info & obj_type) const
Is stream in this format ?
This asks the question: Can stream 'in' be loaded into object 'obj_type' ? If used with a empty filename asks: Can load this type of object ? typeid(void) == no, otherwise returns the prefered load type.

const type_info & ProbeLoad(const type_info & obj_type) const
Is stream in this format ?
Alias for ProbeLoad("",IStreamC(),obj_type); typeid(void) == no, otherwise returns the prefered load type.

const type_info & ProbeSave(const StringC & filename,const type_info & obj_type,bool forceFormat) const
Is Filename in this format ?
This asks the question: Can file 'filename' be saved with object 'obj_type' ? If used with a empty filename asks: Can save this type of object ? typeid(void) == no, otherwise returns the prefered save type.

const type_info & ProbeSave(const type_info & obj_type) const
Alias for ProbeSave("",IStreamC(),obj_type);
typeid(void) == no, otherwise returns the prefered save type.

DPIPortBaseC CreateInput(const StringC & filename,const type_info & obj_type) const
Create a input port for loading from file 'filename'.
Will create an Invalid port if not supported.

The default version of this functions opens the file and passes the stream to CreateInput(IStreamC ....)


DPOPortBaseC CreateOutput(const StringC & filename,const type_info & obj_type) const
Create a output port for saving to file 'filename'..
Will create an Invalid port if not supported.

The default version of this functions opens the file and passes the stream to CreateOutput(OStreamC ....)


DPIPortBaseC CreateInput(IStreamC & in,const type_info & obj_type) const
Create a input port for loading from stream 'in'.
Will create an Invalid port if not supported.

DPOPortBaseC CreateOutput(OStreamC & out,const type_info & obj_type) const
Create a output port for saving to stream 'out'.
Will create an Invalid port if not supported.

const type_info & DefaultType() const
Get prefered IO type.
This specifies the native class for representing the data in a file.

typeid(void) if none, indicates an indirect driver.


IntT Priority() const
Find the priority of the format. the higher the better.
Default is zero.

bool IsStream() const
Test if format is a fully streamable.
i.e. check if you can read/write more than object object. (Default value of this function is true).

static bool ReadString(IStreamC & is,StringC & buff,UIntT maxLen = 256)
read a string form the input.
returns false if the stream contains non text charators or is longer than the given length. This will also restore the file read position after the read.

static StringC ExtractDevice(const StringC & nm)
Get the device from the full name.
For use in '@X:' style device formats.

static StringC ExtractParams(const StringC & nm)
Get the device from the full name.
For use in '@X:' style device formats.

static StringC Extension(const StringC & afn)
Return the extension of filename 'afn'.

#include "Ravl/DP/Entity.hh"
bool Save(ostream & out) const
Save to ostream.

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

RCBodyVC & Copy() const
Creat a copy of this object.

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