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

  PUBLIC
FileFormatRegistryC::FileFormatRegistryC(void)
FileFormatRegistryC::FileFormatRegistryC(bool)
FileFormatRegistryC::FileFormatRegistryC(const TypeConverterC &)
FileFormatRegistryC::Insert(FileFormatBaseC &)
FileFormatRegistryC::Remove(FileFormatBaseC &)
FileFormatRegistryC::Formats(void)
FileFormatRegistryC::FormatByName(void)
FileFormatRegistryC::FindFormat(bool,const StringC &,const type_info &,bool)
FileFormatRegistryC::FindFormatFile(bool,const StringC &,const type_info &,StringC,bool)
FileFormatRegistryC::FindFormat(IStreamC &,const type_info &,StringC,bool)
FileFormatRegistryC::FindInputFormat(FileFormatDescC &,StringC,StringC,const type_info &,bool)
FileFormatRegistryC::FindOutputFormat(FileFormatDescC &,StringC,StringC,const type_info &,bool)
FileFormatRegistryC::CreateInput(StringC,StringC,const type_info &,bool)
FileFormatRegistryC::CreateOutput(StringC,StringC,const type_info &,bool)
FileFormatRegistryC::CreateInput(IStreamC &,StringC,const type_info &,bool)
FileFormatRegistryC::CreateOutput(OStreamC &,StringC,const type_info &,bool)
FileFormatRegistryC::Load(const StringC &,DataT &,StringC,bool)
FileFormatRegistryC::Save(const StringC &,const DataT &,StringC,bool)
FileFormatRegistryC::Load(IStreamC &,DataT &,StringC,bool)
FileFormatRegistryC::Save(OStreamC &,const DataT &,StringC,bool)
FileFormatRegistryC::Load(const StringC &,RCWrapAbstractC &,StringC,bool)
FileFormatRegistryC::Save(const StringC &,const RCWrapAbstractC &,StringC,bool)
FileFormatRegistryC::ListFormats(bool,const StringC &,const type_info &)
FileFormatRegistryC::Identify(const StringC &)
FileFormatRegistryC::Identify(IStreamC &)
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 &)

   FileFormatRegistryC   
 
Registry of file formats.
 
include "Ravl/DP/FileFormatRegistry.hh"
Source file:Ravl/Core/IO/FileFormatRegistry.hh
User Level:Advanced
Library:RavlIO
In Scope:RavlN

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

FileFormatRegistryC(bool)
Default constructor.
Creates an invalid handle.

FileFormatRegistryC(const TypeConverterC & aTypeConveter)
Constructor.

bool Insert(FileFormatBaseC & ff)
Add a new format to the registry.

bool Remove(FileFormatBaseC & ff)
Remove an old format from the registry.

DListC<FileFormatBaseC> & Formats()
Access list of available file formats.

HashC<StringC,DListC<FileFormatBaseC>> & FormatByName()
Access list of available file formats by name.

FileFormatBaseC FindFormat(bool forLoad,const StringC & formatName,const type_info & atype = typeid (void),bool useInDirect = true)
Find a format.
This can be input or output.

FileFormatBaseC FindFormatFile(bool forLoad,const StringC & filename,const type_info & atype = typeid (void),StringC formatName = "",bool useInDirect = true)
Find the format of the file.
This can be input or output.

FileFormatBaseC FindFormat(IStreamC & in,const type_info & atype = typeid (void),StringC formatName = "",bool useInDirect = true)
Find the format of the file.
This can only be input.

bool FindInputFormat(FileFormatDescC & fmtInfo,StringC filename,StringC format,const type_info & obj_type,bool verbose = false)
Search for input format.

bool FindOutputFormat(FileFormatDescC & fmtInfo,StringC filename,StringC format,const type_info & obj_type,bool verbose = false)
Search for output format.

DPIPortBaseC CreateInput(StringC filename,StringC format,const type_info & obj_type,bool verbose = false)
Create an input pipe.
if obj_type is typeid(void), then the default load type of the file is used.

DPOPortBaseC CreateOutput(StringC filename,StringC format,const type_info & obj_type,bool verbose = false)
Create an input pipe.

DPIPortBaseC CreateInput(IStreamC & from,StringC format,const type_info & obj_type,bool verbose = false)
Create an input pipe.
if obj_type is typeid(void), then the default load type of the file is used.

DPOPortBaseC CreateOutput(OStreamC & to,StringC format,const type_info & obj_type,bool verbose = false)
Create an input pipe.

bool Load(const StringC & filename,DataT & obj,StringC fileformat = "",bool verbose = false)
Load a single object.
filenamename of file containing object
objname of C++ object
fileformatformat of object file. If fileformat string is empty, the file format is detected automatically. To get a list of file formats, type conv -lf
verbose if true, a message is printed to stdout describing the filename, the format used, the object type being loaded and any status information.
More information here

bool Save(const StringC & filename,const DataT & obj,StringC fileformat = "",bool verbose = false)
Save a single object.
filenamename of file containing object
objname of C++ object
fileformatformat of object file. If fileformat string is empty, the file format is detected automatically. To get a list of file formats, type conv -lf
verbose if true, a message is printed to stdout describing the filename, the format used, the object type being loaded and any status information.
More information here

bool Load(IStreamC & is,DataT & obj,StringC fileformat = "",bool verbose = false)
Load a single object from a stream
osstream from which to load object.
objname of C++ object
fileformatformat of object file. If fileformat string is empty, the file format is detected automatically. To get a list of file formats, type conv -lf
verbose if true, a message is printed to stdout describing the filename, the format used, the object type being loaded and any status information.
More information here

bool Save(OStreamC & os,const DataT & obj,StringC fileformat = "",bool verbose = false)
Save a single object to a stream
osWhere to save the stream to.
objname of C++ object
fileformatformat of object file. If fileformat string is empty, the file format is detected automatically. To get a list of file formats, type conv -lf
verbose if true, a message is printed to stdout describing the filename, the format used, the object type being loaded and any status information.
More information here

bool Load(const StringC & filename,RCWrapAbstractC & obj,StringC fileformat,bool verbose)
Load to an abstract object handle.
NB. an instace of TypeInfoInstC must exists for the contained class if this is to work.

bool Save(const StringC & filename,const RCWrapAbstractC & obj,StringC fileformat,bool verbose)
Save an abstract object handle.
NB. an instace of TypeInfoInstC must exists for the contained class if this is to work.

DListC<FileFormatBaseC> ListFormats(bool forLoad,const StringC & fileFormat = StringC (""),const type_info & typespec = typeid (void))
List all file formats that support the given type.
forLoad == true, then for load. forLoad == false, then for save.

If fileFormat string is empty then all file formats are listed.

If typespec is void then all types are listed.


FileFormatBaseC Identify(const StringC & afile)
Identify a file.
If file format is unrecognised the returned FileFormatBaseC will be an invalid handle.

FileFormatBaseC Identify(IStreamC & is)
Identify a stream.
If file format is unrecognised the returned FileFormatBaseC will be an invalid handle.

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

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

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

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

FileFormatRegistryBodyC & Body()
Access body of object.

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

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


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