#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <iterator>
#include "JLang/JPredicate.hh"
#include "JLang/JComparison.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 JPredicate.cc.
 
◆ main()
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          char **  | 
          argv  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 56 of file JPredicate.cc.
   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);
 
 
 
 
 
JPredicate< JResult_t T::*, JComparison::eq > make_predicate(JResult_t T::*member, const JResult_t value)
Helper method to create predicate for data member.