19 static const std::string set_t =
"set";
34 mechanics = this->mechanics;
49 friend inline std::istream&
operator>>(std::istream&
in, JModifier& modifier)
51 return in >> modifier.id >> modifier.action >> modifier.mechanics;
62 friend inline std::ostream&
operator<<(std::ostream& out,
const JModifier& modifier)
66 out << modifier.action;
68 out << modifier.mechanics;
92 int main(
int argc,
char **argv)
105 JParser<> zap(
"Auxiliary program to modify mechanical model data.");
107 zap[
'f'] =
make_field(file_name,
"mechanic file");
113 catch(
const exception &error) {
114 FATAL(error.what() << endl);
119 data.load(file_name.c_str());
121 data.comment.add(
JMeta(argc, argv));
125 for (container_type::iterator
target = data.begin();
target != data.end(); ++
target) {
127 if (
target->first == i->id) {
129 DEBUG(
"Modifier" <<
' '
131 <<
"action" <<
' ' << i->mechanics << endl);
133 if (!i->apply(
target->second)) {
134 ERROR(
"No valid action: " << *i << endl);
140 data.store(file_name.c_str());
Mechanical modelling of string.
Utility class to parse command line options.
int main(int argc, char *argv[])
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
I/O formatting auxiliaries.
Auxiliary wrapper for I/O of container with optional comment (see JComment).
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
General purpose messaging.
Auxiliary data structure for sequence of same character.
std::istream & operator>>(std::istream &in, JAANET::JHead &header)
Read header from input.
Utility class to parse command line options.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
#define DEBUG(A)
Message macros.
Auxiliary data structure for parameters of mechanical model.