Checks whether the input contains a given tag. Throws an std::runtime_error if the tag is not found. More...
#include <element_to_refine.h>
Public Member Functions | |
| TagChecker (const std::string &tag) | |
| Constructor. | |
| const std::string & | get_tag () const |
| Returns tag. | |
Checks whether the input contains a given tag. Throws an std::runtime_error if the tag is not found.
The class works with std::istream. The following code shows checking for tag 'TAG' in the input file stream:
std::ifstream fin("my_file.txt"); fin >> TagChecker("TAG");
| TagChecker::TagChecker | ( | const std::string & | tag | ) | [inline, explicit] |
Constructor.
| [in] | tag | A tag. |
| const std::string& TagChecker::get_tag | ( | ) | const [inline] |
Returns tag.
1.6.3