QGTextFileHandler Class Reference

List of all members.

Detailed Description

Class to handle input and output for text files.

Author:
Adam Bryant (adam_bryant@berkeley.edu)


Public Member Functions

 QGTextFileHandler ()
 Constructor.
virtual ~QGTextFileHandler ()
 Destructor.
void AppendLine (std::string key="", std::string value="")
 Append a key and value to the file.
void AppendLine (std::string key, Double_t value)
 Append a key and (Double_t) value to the file.
void AppendLine (std::string key, Int_t value)
 Append a key and (Int_t) value to the file.
bool DoesKeyExist (std::string key)
 Return true if key exists.
const std::vector< std::pair<
std::string, std::string > > & 
GetLines ()
 Get the lines of the file as key, value pairs.
std::string GetValue (std::string key)
 Retrieve value associated with a key.
bool ReadFile (std::string filename)
 Read file, returns true if successful.
bool WriteFile (std::string filename)
 Write file, returns true if successful.

Private Member Functions

std::pair< std::string, std::string > ParseLine (const std::string &line)
 Parse a line of a text file, splitting at a delimiter.
std::string BuildLine (const std::pair< std::string, std::string > &parsedLine)
 Build a line from a key and value, inserting a delimiter.

Private Attributes

std::map< std::string, std::string > fFileMap
 Contents of text file, useful for unique keys.
std::vector< std::pair< std::string,
std::string > > 
fFileLines
 Contents of text file, line by line.


The documentation for this class was generated from the following files:
Generated on Fri Mar 6 13:40:43 2009 for CUORE Software by  doxygen 1.5.1