SeldonData::FormatFormattedText Class Reference

Input/ouput class to read formatted text files. More...

#include <Format.hxx>

Inheritance diagram for SeldonData::FormatFormattedText:

SeldonData::Format List of all members.

Public Member Functions

 FormatFormattedText (string format, string comments="#%", string delimiters=" \t:;,|\n")
 Main constructor.
 ~FormatFormattedText ()
 Destructor.
string GetFormat () const
 Returns the current format description.
string GetDelimiters () const
 Returns the current delimiters.
string GetComments () const
 Returns the current characters that denote a comment line.
void SetFormat (string format)
 Sets the format description.
void SetDelimiters (string delimiters)
 Sets the delimiters.
void SetComments (string comments)
 Sets the characters that denote a comment line.
template<class TG>
void Read (string FileName, string extract, RegularGrid< TG > &G) const
 Reads a text file.
template<class TG>
void Read (ExtStream &FileStream, string extract, RegularGrid< TG > &G) const
 Reads a text file.
template<class TG, int N>
void Read (string FileName, string extract, GeneralGrid< TG, N > &G) const
 Reads a text file.
template<class TG, int N>
void Read (ExtStream &FileStream, string extract, GeneralGrid< TG, N > &G) const
 Reads a text file.
template<class TD, int N, class TG>
void Read (string FileName, string extract, Data< TD, N, TG > &D) const
 Reads a text file.
template<class TD, int N, class TG>
void Read (ExtStream &FileStream, string extract, Data< TD, N, TG > &D) const
 Reads a text file.
template<class TA, int N>
void Read (string FileName, string extract, Array< TA, N > &A) const
 Reads a text file.
template<class TA, int N>
void Read (ExtStream &FileStream, string extract, Array< TA, N > &A) const
 Reads a text file.

Protected Attributes

string format_
 Description of the file format.
string comments_
 Characters that denote a comment line.
string delimiters_
 Characters considered as delimiters.
vector< string > info_str
 First vector describing the format.
vector< int > info_nb0
 Second vector describing the format.
vector< int > info_nb1
 Third vector describing the format.

Detailed Description

Input/ouput class to read formatted text files.


Constructor & Destructor Documentation

SeldonData::FormatFormattedText::FormatFormattedText ( string  format,
string  comments = "#%",
string  delimiters = " \t:;,|\n" 
)

Main constructor.

Parameters:
format format of the file.
commments characters that denote a comment line.
delimiters characters used to delimit elements in the file.


Member Function Documentation

string SeldonData::FormatFormattedText::GetFormat (  )  const

Returns the current format description.

Returns:
The current format description.

string SeldonData::FormatFormattedText::GetDelimiters (  )  const

Returns the current delimiters.

Returns:
The current delimiters.

string SeldonData::FormatFormattedText::GetComments (  )  const

Returns the current characters that denote a comment line.

Returns:
The current characters that denote a comment line.

void SeldonData::FormatFormattedText::SetFormat ( string  format  ) 

Sets the format description.

Parameters:
format the new format description.

void SeldonData::FormatFormattedText::SetDelimiters ( string  delimiters  ) 

Sets the delimiters.

Parameters:
delimiters the new delimiters.

void SeldonData::FormatFormattedText::SetComments ( string  comments  ) 

Sets the characters that denote a comment line.

Parameters:
the new characters that denote a comment line.


The documentation for this class was generated from the following files:
Generated on Tue Nov 17 11:20:52 2009 for SeldonData by  doxygen 1.5.1