Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

DataFormatLib Class Reference

PatternSet data file format library. More...

#include <dataformat.h>

List of all members.

Static Public Methods

void load (const String &filename, PatternSet &set) throw (file_not_found, invalid_format, assertion_failed)
void load (TextIStream &in, PatternSet &set, const String &filetype=".raw") throw (invalid_format, assertion_failed)
void save (const String &filename, const PatternSet &set) throw (invalid_filename)

Static Protected Methods

DataFormatcreate (const String &filename)


Detailed Description

PatternSet data file format library.

Patterns:

Definition at line 37 of file dataformat.h.


Member Function Documentation

DataFormat * create const String &    filename [static, protected]
 

Factory creates a data format handler according to filename.

To make the factory more extensible, there would need to be some sort of dynamic registry of Factory Methods.

Definition at line 113 of file dataformat.cc.

void load TextIStream &    in,
PatternSet   set,
const String &    filetype = ".raw"
throw (invalid_format, assertion_failed) [static]
 

Loads pattern set from the given stream.

Exceptions:
file_not_found  , invalid_format, assertion_failed
Parameters:
in  Input stream
set  Pattern set to load.
filetype  File name extension; ".raw",".pat" (SNNS), or ".dt" (Proben1)

Definition at line 75 of file dataformat.cc.

References DataFormat::load().

void load const String &    filename,
PatternSet   set
throw (file_not_found, invalid_format, assertion_failed) [static]
 

Tries to load the given file to the given pattern set.

Exceptions:
file_not_found  , invalid_format, assertion_failed

Definition at line 45 of file dataformat.cc.

Referenced by PatternSet::load().

void save const String &    filename,
const PatternSet   set
throw (invalid_filename) [static]
 

Tries to load the given file to the given pattern set.

Exceptions:
file_not_found  , invalid_format, assertion_failed

Definition at line 91 of file dataformat.cc.

References DataFormat::save().

Referenced by PatternSet::save().


The documentation for this class was generated from the following files:
Generated on Thu Feb 10 20:06:45 2005 for Inanna by doxygen1.2.18