29 friend inline std::ostream&
operator<<(std::ostream& out,
const __A__&
object) {
return out <<
object.a; }
36 void print(std::ostream& out,
int debug,
const char* title,
T __begin,
T __end)
43 copy(__begin, __end, ostream_iterator<typename T::value_type>(out,
" "));
56 int main(
int argc,
char **argv)
65 JParser<> zap(
"Auxiliary program to test object selection methods.");
71 catch(
const exception &error) {
72 FATAL(error.what() << endl);
77 buffer.push_back(__A__(3));
78 buffer.push_back(__A__(4));
79 buffer.push_back(__A__(2));
80 buffer.push_back(__A__(1));
81 buffer.push_back(__A__(5));
84 print(cout, debug,
"data:", buffer.begin(), buffer.end());
91 DEBUG(
"has " << x <<
"? " << (p != buffer.end() ?
"yes" :
"no") << endl);
93 ASSERT(p != buffer.end() && p->a == x);
99 DEBUG(
"has " << x <<
"? " << (p != buffer.end() ?
"yes" :
"no") << endl);
101 ASSERT(p != buffer.end() && p->get() == x);
107 print(cout, debug,
"selection:", buffer.begin(), p);
Utility class to parse command line options.
JPredicate< JResult_t T::*, JComparison::eq > make_predicate(JResult_t T::*member, const JResult_t value)
Helper method to create predicate for data member.
int main(int argc, char *argv[])
T get(const JHead &header)
Get object from header.
#define ASSERT(A,...)
Assert macro.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
do set_variable OUTPUT_DIRECTORY $WORKDIR T
General purpose messaging.
then $JPP_DIR software JCalibrate JCalibrateToT a
Utility class to parse command line options.
void copy(const Head &from, JHead &to)
Copy header from from to to.
#define DEBUG(A)
Message macros.