An Accum object is a template class object whose role is to provide a generic interface for any standard sequence container to the accumulate_lines virtual interface. More...
#include <file.h>
Public Member Functions | |
Accum (Container &container) | |
std::string & | back () |
back() is called to get a reference to the last string in the container -- presumbaly one created using the above push_back method. | |
void | push_back (std::string const &s) |
push_back is called to append a new std::string to the end of the container | |
virtual void | setBackHasCR (bool flag) |
read_lines() calls this function to indicate to the line accumulator that the most recently read line, if any had a CR character removed from it. This function will only be called if there is a trailing CR and if the removeCR flag is passed to read_lines(). | |
Public Attributes | |
Container & | container_ |
An Accum object is a template class object whose role is to provide a generic interface for any standard sequence container to the accumulate_lines virtual interface.
By rights, this should be a nested class found within the read_file template function below, but you can't instantiate a template given a function local class. Sooner or later these silly restrictions will go away, but now they haven't.
Definition at line 964 of file file.h.
std::string& back | ( | ) | [virtual] |
back() is called to get a reference to the last string in the container -- presumbaly one created using the above push_back method.
Implements accumulate_lines.
void push_back | ( | std::string const & | new_line | ) | [virtual] |
push_back is called to append a new std::string to the end of the container
Implements accumulate_lines.
virtual void setBackHasCR | ( | bool | flag | ) | [virtual, inherited] |
read_lines() calls this function to indicate to the line accumulator that the most recently read line, if any had a CR character removed from it. This function will only be called if there is a trailing CR and if the removeCR flag is passed to read_lines().
Reimplemented in Accumulate_File_Lines.
Definition at line 912 of file file.h.
Container& container_ |