BALL::MolFileFactory Class Reference

This class offers a factory method that given a path to a molecule file determines the file type based on the file extension and returns a pointer to an appropriate subclass of GenericMolFile. More...

#include <molFileFactory.h>

List of all members.


Static Public Member Functions

static GenericMolFile * open (const String &name, File::OpenMode open_mode=std::ios::in)
This method tries to determine the filetype based on the file extension of name and returns a pointer to an object of the appropriate subclass of GenericMolFile if available.

Detailed Description

This class offers a factory method that given a path to a molecule file determines the file type based on the file extension and returns a pointer to an appropriate subclass of GenericMolFile.

Member Function Documentation

static GenericMolFile* BALL::MolFileFactory::open ( const String & name,
File::OpenMode open_mode = std::ios::in
) [static]

This method tries to determine the filetype based on the file extension of name and returns a pointer to an object of the appropriate subclass of GenericMolFile if available.

Parameters:
name the path to the requested molecule file
Returns:
a pointer to a subclass of GenericMolFile, NULL if none is appropriate. Be aware, that the file handle has not been checked for validity and that you have to delete it yourself

Generated on Thu Aug 6 18:30:29 2009 for BALL by doxygen 1.5.8