Auxiliary program to test JLANG::JPredicate class and helper methods.
More...
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <iterator>
#include "JLang/JFind_if.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Auxiliary program to test JLANG::JPredicate class and helper methods.
- Author
- mdejong
Definition in file JFind_if.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 68 of file JFind_if.cc.
77 JParser<> zap(
"Auxiliary program to test object selection methods.");
83 catch(
const exception &error) {
84 FATAL(error.what() << endl);
89 buffer.push_back(__A__(3));
90 buffer.push_back(__A__(4));
91 buffer.push_back(__A__(2));
92 buffer.push_back(__A__(1));
93 buffer.push_back(__A__(5));
96 print(cout,
debug,
"data:", buffer.begin(), buffer.end());
98 JPredicate_t predicate(3);
103 DEBUG(
"has " << predicate.value <<
"? " << (p != buffer.end() ?
"yes" :
"no") << endl);
105 ASSERT(p != buffer.end() && p->a == predicate.value);
111 DEBUG(
"has " << predicate.value <<
"? " << (p != buffer.end() ?
"yes" :
"no") << endl);
113 ASSERT(p != buffer.end() && p->get() == predicate.value);
Utility class to parse command line options.
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
JFind_if< JResult_t T::*, JPredicate_t > make_find_if(JResult_t T::*member, const JPredicate_t &predicate)
Helper method to create find_if for data member.
#define DEBUG(A)
Message macros.