27 std::string value =
"";
28 mutable size_t count = 0;
36 public std::map<std::string, value_type>
44 JEquation operator()(
const JEquation& equation)
const
46 const_iterator p = this->find(equation.getKey());
48 if (p != this->end()) {
52 return JEquation(equation.getKey(), p->second.value);
67int main(
int argc,
char **argv)
72 typedef JToken<
';'> token_type;
95 JParser<> zap(
"General purpose program to edit or create properties file.");
102 zap[
'q'] =
make_field(squash,
"squash meta data");
107 catch(
const exception &error) {
108 FATAL(error.what() << endl);
116 if (!modifier.empty()) {
122 is.imbue(locale(is.getloc(), facet.
clone()));
124 for (
const token_type& token : modifier) {
134 ERROR(
"Invalid modifier: " << token << endl);
145 os.imbue(locale(cout.getloc(), facet.
clone()));
150 ifstream in(inputFile.c_str());
166 is.imbue(locale(is.getloc(), facet.
clone()));
177 if (rm.count(equation.
getKey()) == 0) {
183 os << buffer << endl;
192 for (
const auto& i : zip) {
193 if (i.second.count == 0) {
194 os <<
JEquation(i.first, i.second.value);
207 ostream out(buffer.is_open() ? &buffer : cout.rdbuf());
int main(int argc, char **argv)
General purpose messaging.
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Utility class to parse parameter values.
Utility class to parse parameter values.
Facet class to specify parsing of equations in currect locale (see class JLANG::JEquation).
virtual JEquationFacet * clone() const override
Clone this facet.
Simple data structure to support I/O of equations (see class JLANG::JEquation).
const std::string & getSkipLine() const
Get skip line characters.
bool isSeparator(const char c) const
Test for separator character.
const std::string & getComment() const
Get comment string.
const std::string & getSeparator() const
Get separator characters.
const char getDefaultEndOfLine() const
Get default end of line character.
char getLeftBracket() const
Get left bracket.
const string_type & getEndOfLine() const
Get end of line characters.
char getRightBracket() const
Get right bracket.
const std::string & getDivision() const
Get division characters.
const string_type & getWhiteSpace() const
Get white space characters.
General purpose equation class.
const std::string & getKey() const
Get key.
const std::string & getValue() const
Get value.
const char getSeparator() const
Get separator.
Wrapper class around string.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Empty structure for specification of parser element that is initialised (i.e. does not require input)...