Developer Documentation
RAVL, Recognition And Vision Library
USER HOME PAGE CLASS LIST CONTENTS
Ravl - Core - IO - Formats - FileFormatGenericC
 

  PUBLIC
FileFormatGenericC::FileFormatGenericC(void)
FileFormatGenericC::FileFormatGenericC(const StringC &,const type_info &,FileFormatGenericBodyC::LoadFuncT,FileFormatGenericBodyC::SaveFuncT,FileFormatGenericBodyC::LoadFuncFnT,FileFormatGenericBodyC::SaveFuncFnT,const StringC &,const StringC &,bool,IntT,const StringC &)
FileFormatGenericC::FileFormatGenericC(const StringC &,const type_info &,FileFormatGenericBodyC::LoadFuncT,FileFormatGenericBodyC::SaveFuncT,const StringC &,const StringC &,bool,IntT,const StringC &)
FileFormatGenericC::FileFormatGenericC(const StringC &,const type_info &,FileFormatGenericBodyC::LoadFuncFnT,FileFormatGenericBodyC::SaveFuncFnT,const StringC &,const StringC &,bool,IntT,const StringC &)
FileFormatBaseC::Name(void) const
FileFormatBaseC::Description(void) const
FileFormatBaseC::ProbeLoad(IStreamC &,const type_info &) const
FileFormatBaseC::ProbeLoad(const StringC &,IStreamC &,const type_info &) const
FileFormatBaseC::ProbeLoad(const StringC &,const type_info &) const
FileFormatBaseC::ProbeSave(const StringC &,const type_info &,bool) const
FileFormatBaseC::ProbeLoad(const type_info &) const
FileFormatBaseC::ProbeSave(const type_info &) const
FileFormatBaseC::CreateInput(const StringC &,const type_info &) const
FileFormatBaseC::CreateOutput(const StringC &,const type_info &) const
FileFormatBaseC::CreateInput(IStreamC &,const type_info &) const
FileFormatBaseC::CreateOutput(OStreamC &,const type_info &) const
FileFormatBaseC::DefaultType(void) const
FileFormatBaseC::Priority(void) const
FileFormatBaseC::IsStream(void) const
FileFormatBaseC::Body(void)
FileFormatBaseC::Body(void) const
DPEntityC::operator =(const DPEntityC &)
DPEntityC::Body(void)
DPEntityC::Body(void) const
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 &)

   FileFormatGenericC   
 
Generic format loader.
 
include "Ravl/DP/FileFormatGen.hh"
Created:17/07/2000 
Source file:Ravl/Core/IO/FileFormatGen.hh
User Level:Normal
Library:RavlIO
In Scope:RavlN

Comments:
This class provides a simple way of adding new file formats to the system, all it needs is a few points to functions which create the appropriate I/O streams.

Parent Classes: Methods:
FileFormatGenericC()
Default constructor.
Creates an invalid object.

FileFormatGenericC(const StringC & nformatName,const type_info & formatType,FileFormatGenericBodyC::LoadFuncT nLoadFunc,FileFormatGenericBodyC::SaveFuncT nSaveFunc,FileFormatGenericBodyC::LoadFuncFnT nLoadFuncFn,FileFormatGenericBodyC::SaveFuncFnT nSaveFuncFn,const StringC & nDesc = "None.",const StringC & nExt = "",bool naStream = false,IntT priority = 0,const StringC & nHdrData = "")
Constructor.

FileFormatGenericC(const StringC & nformatName,const type_info & formatType,FileFormatGenericBodyC::LoadFuncT nLoadFunc,FileFormatGenericBodyC::SaveFuncT nSaveFunc,const StringC & nDesc = "None.",const StringC & nExt = "",bool naStream = false,IntT priority = 0,const StringC & nHdrData = "")
Constructor.

FileFormatGenericC(const StringC & nformatName,const type_info & formatType,FileFormatGenericBodyC::LoadFuncFnT nLoadFunc,FileFormatGenericBodyC::SaveFuncFnT nSaveFunc,const StringC & nDesc = "None.",const StringC & nExt = "",bool naStream = false,IntT priority = 0,const StringC & nHdrData = "")
Constructor.

#include "Ravl/DP/FileFormat.hh"
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' ? Returns a suggested load type. (Which may or mayno match 'obj_type'.), This will be typeid(void), if failed.

const type_info & ProbeLoad(const StringC & filename,IStreamC & in,const type_info & obj_type) const
Is Filename in this format (for load) ?
This asks the question: Can file 'filename' be loaded with object 'obj_type' ? If used with a empty filename then in is invalid and it asks: Can load this type of object ? Returns a suggested load type. (Which may or mayno match 'obj_type'.), This will be typeid(void), if failed.

const type_info & ProbeLoad(const StringC & filename,const type_info & obj_type) const
Is Filename in this format (for load) ?
Returns a suggested load type. (Which may or mayno match 'obj_type'.), This will be typeid(void), if failed.

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' ? This uses extention to check consistancy. If used with a empty filename asks: Can save this type of object ? Returns a suggested load type. (Which may or mayno match 'obj_type'.), This will be typeid(void), if failed.

const type_info & ProbeLoad(const type_info & obj_type) const
Is Filename in this format (for load) ?
Alias for ProbeLoad("",IStreamC(),obj_type); Returns a suggested load type. (Which may or mayno match 'obj_type'.), This will be typeid(void), if failed.

const type_info & ProbeSave(const type_info & obj_type) const
Is Filename in this format ?
Alias for ProbeSave("",obj_type);

DPIPortBaseC CreateInput(const StringC & filename,const type_info & obj_type) const
Create a input port for loading.
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.
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.
Will create an Invalid port if not supported.

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

const type_info & DefaultType() const
Get prefered IO type.
typeid(void) if none.

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.

FileFormatBodyC & Body()

const FileFormatBodyC & Body() const

#include "Ravl/DP/Entity.hh"
const DPEntityC & operator =(const DPEntityC & dat)
Assignment.

DPEntityBodyC & Body()
Access body.

const DPEntityBodyC & Body() const
Access body.

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

DPEntityBodyC & 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<DPEntityBodyC> & obj)

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

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

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

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

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

DPEntityBodyC & Body()
Access body of object.

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

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


Maintainer:Charles Galambos, Created: 17/07/2000, Documentation by CxxDoc: Tue Aug 13 09:59:30 2002