#include <nocomment.h>
Collaboration diagram for Dv::Util::nocommentstream:
Public Member Functions | |
nocommentstream (std::istream &is) | |
Constructor. | |
~nocommentstream () | |
Destructor. | |
Private Attributes | |
NoCommentFilter | filter_ |
Filter. |
All characters following (and including) a '#' are ignored up to (but not including) the next newline character.
Example usage:
std::ifstream ifs("config.txt"); if (!ifs) throw std::runtime_error("config.txt: cannot open"); Dv::Util::nocommentstream nocifs(ifs); std::string line; while ( std::getline(nocifs, line) ) { // line does not contain comments }
Definition at line 34 of file nocomment.h.
|
Constructor.
|
|
Destructor.
|
|
Filter. Definition at line 59 of file nocomment.h. |
dvutil-0.13.15 | [30 December, 2004] |