Public Member Functions
ESBTL::Line_reader< Line_format, Line_selector, Builder > Class Template Reference

#include <line_reader.h>

List of all members.

Public Member Functions

 Line_reader (Line_selector &line_selector, Builder &builder)
template<Reading_mode mode, class Occupancy_handler >
bool read (const std::string &filename, Occupancy_handler occupancy, char default_altloc=' ')
template<class Occupancy_handler >
bool read (const std::string &filename, Occupancy_handler occupancy, char default_altloc=' ')

Detailed Description

template<class Line_format, class Line_selector, class Builder>
class ESBTL::Line_reader< Line_format, Line_selector, Builder >

Class responsible for reading the lines of a file and provide information to a builder to create a system.

Template Parameters:
Line_formatis a helper class that can extract fields from a molecular data file (like ESBTL::PDB::Line_format for example).
Line_selectoris a line selector object that must follow the concept of Line selectors.
Builderis a class able to build a molecular system (like ESBTL::All_atom_system_builder for example).

Constructor & Destructor Documentation

template<class Line_format, class Line_selector, class Builder>
ESBTL::Line_reader< Line_format, Line_selector, Builder >::Line_reader ( Line_selector &  line_selector,
Builder &  builder 
) [inline]

Constructor.


Member Function Documentation

template<class Line_format, class Line_selector, class Builder>
template<Reading_mode mode, class Occupancy_handler >
bool ESBTL::Line_reader< Line_format, Line_selector, Builder >::read ( const std::string &  filename,
Occupancy_handler  occupancy,
char  default_altloc = ' ' 
) [inline]

Reads the line of a file and give instruction to the builder to construct molecular system(s).

Template Parameters:
modeindicate the encoding of the file to be read. To read a compressed file, you must include the file <ESBTL/compressed_ifstream.h>, and the boost_iostreams headers and library must be installed on your system.
Occupancy_handleris an occupancy policy that must be a model of the concept Occupancy policies.
Parameters:
filenameis the name of the file to be read.
occupancyis the occupancy policy
default_altlocis the alternate location identification that must be selected. If the white space character is specified, the first alternate location identification read will be used as default.

A version of this function with reading mode ASCII is also provided.

template<class Line_format, class Line_selector, class Builder>
template<class Occupancy_handler >
bool ESBTL::Line_reader< Line_format, Line_selector, Builder >::read ( const std::string &  filename,
Occupancy_handler  occupancy,
char  default_altloc = ' ' 
) [inline]

The documentation for this class was generated from the following file: