11 #include <boost/tokenizer.hpp>
50 typedef boost::escaped_list_separator<char> Separator;
51 typedef boost::tokenizer<Separator> BT;
71 Tokenizer( std::istream &in);
78 void set_comment_pattern(
const std::string &pattern);
90 bool skip_to(
const std::string &pattern,
const std::string &end_search_pattern=
"");
103 bool next_line(
bool assert_for_remaining_tokens=
true);
113 inline BT::iterator & operator ++() {
114 if (! eol()) {position_++; ++tok_;}
116 while (! eol() && (*tok_).size()==0 ) {position_++; ++tok_;}
123 inline bool eol()
const
124 {
return tok_ == line_tokenizer_.end(); }
129 inline bool eof()
const
130 {
return in_->eof(); }
135 inline unsigned int pos()
const
142 inline unsigned int line_num()
const
143 {
return line_counter_;}
148 inline const std::string &f_name()
const
154 std::string position_msg()
const;
159 inline const std::string &
line()
const
169 void set_tokenizer();
174 std::ifstream *own_stream_;
180 std::string comment_pattern_;
183 unsigned int line_counter_;
184 unsigned int position_;
189 Separator separator_;
UnitSI operator*(const UnitSI &a, const UnitSI &b)
Product of two units.
Dedicated class for storing path to input and output files.