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

ANNFileFormatLib Class Reference

ANNetwork data file format library. More...

#include <annfilef.h>

List of all members.

Static Public Methods

ANNetworkload (const String &filename) throw (file_not_found, invalid_format, assertion_failed)
void load (const String &filename, ANNetwork &net) throw (file_not_found, invalid_format, assertion_failed, open_failure)
void load (TextIStream &in, ANNetwork &net, const String &filetype) throw (invalid_format, assertion_failed)
void save (const String &filename, const ANNetwork &net, const char *fileformat=NULL) throw (invalid_filename, invalid_format, assertion_failed, stream_failure, open_failure)
void save (TextOStream &out, const ANNetwork &net, const String &filetype) throw (assertion_failed, invalid_filename, stream_failure)

Static Protected Methods

ANNFileFormatcreate (const String &fileformat) throw (invalid_format)


Detailed Description

ANNetwork data file format library.

Patterns:

Definition at line 49 of file annfilef.h.


Member Function Documentation

ANNFileFormat * create const String &    fileformat throw (invalid_format) [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 144 of file annfilef.cc.

void load TextIStream &    in,
ANNetwork   net,
const String &    filetype
throw (invalid_format, assertion_failed) [static]
 

Loads network from the given stream.

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

Definition at line 64 of file annfilef.cc.

References ANNFileFormat::load().

void load const String &    filename,
ANNetwork   net
throw (file_not_found, invalid_format, assertion_failed, open_failure) [static]
 

Tries to load the given file to the given network.

Exceptions:
file_not_found  , invalid_format, assertion_failed

Definition at line 43 of file annfilef.cc.

ANNetwork* load const String &    filename throw (file_not_found, invalid_format, assertion_failed) [static]
 

Creates a network from the given file.

Exceptions:
file_not_found  , invalid_format, assertion_failed

void save TextOStream &    out,
const ANNetwork   net,
const String &    filetype
throw (assertion_failed, invalid_filename, stream_failure) [static]
 

Writes the given network to file with the given name.

File format can also be specified.

Exceptions:
assertion_failed 
Parameters:
out  Output stream to write to.
net  Network to serialize.
filetype  File format to use.

Definition at line 121 of file annfilef.cc.

References ANNFileFormat::save().

void save const String &    filename,
const ANNetwork   net,
const char *    fileformat = NULL
throw (invalid_filename, invalid_format, assertion_failed, stream_failure, open_failure) [static]
 

Writes the given network to file with the given name.

File format can also be specified.

Exceptions:
file_not_found  , invalid_format, assertion_failed
Parameters:
filename  Network save file name.
net  Network object to be saved.
fileformat  File format.

Definition at line 83 of file annfilef.cc.


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