43 IO(
const char* filepattern);
60 void Dump(ostream& out = cout)
const;
84 bool GetOpt(
const char* tag,
const char* key, vector< T >& values)
const;
95 bool GetOpt(
const char* tag,
const char* key, T& value)
const;
105 bool GetOpt(
const char* tag,
const char* key,
string& value)
const;
118 bool GetAllOpt(
const char* tag,
const char* key, vector< T >& values);
131 bool GetAllOpt(
const char* tag,
const char* key, T& value);
139 string GetLineData(
const char* tag,
const char* key)
const;
164bool IO::GetOpt(
const char* tag,
const char* key, vector< T >& values)
const {
168 istringstream in(data.c_str());
173 values.push_back(tmp);
176 return (
bool)values.size();
181bool IO::GetOpt(
const char* tag,
const char* key, T& value)
const{
185 istringstream in(data.c_str());
187 return (!!in)&&data.size();
199 if(!data.compare(
""))
break;
200 istringstream inval(data.c_str());
204 values.push_back(tmp);
209 return (
bool)values.size();
217 if(data.empty())
return false;
219 istringstream in(data.c_str());
Parse option files.
Definition IO.h:29
string fCurtag
Current tag.
Definition IO.h:156
bool ParseFile(const char *filename)
File parser.
Definition IO.cc:22
bool GetOpt(const char *tag, const char *key, vector< T > &values) const
Gets an option vector.
Definition IO.h:164
static const unsigned int sLinesize
Maximum number of characters in a line.
Definition IO.h:157
bool IsZombie(void) const
Flags the parsing sequence.
Definition IO.h:66
Monitor * mon
Class monitor.
Definition IO.h:151
bool GetAllOpt(const char *tag, const char *key, vector< T > &values)
Gets a vector of all options.
Definition IO.h:192
unsigned int fCurline
Current line number.
Definition IO.h:154
string fCurkey
Current key.
Definition IO.h:155
void Dump(ostream &out=cout) const
Dumps all options.
Definition IO.cc:77
vector< pair< string, string > > fAllLines
List of lines.
Definition IO.h:152
string GetNextLineData(const char *tag, const char *key)
Returns the next option line defined by a tag and a keyword.
Definition IO.cc:139
virtual ~IO(void)
Destructor of the IO class.
Definition IO.cc:70
string GetLineData(const char *tag, const char *key) const
Returns the option line defined by a tag and a keyword.
Definition IO.cc:109
friend ostream & operator<<(ostream &out, IO &io)
Flux operator wrapper.
Definition IO.cc:84
Monitor a GWOLLUM processing.
Definition Monitor.h:39