Example program to test JLANG::JComparible class.  
More...
#include <iostream>
#include <iomanip>
#include <vector>
#include <set>
#include <algorithm>
#include "JLang/JComparable.hh"
#include "JLang/JMultiComparable.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
 
Go to the source code of this file.
 | 
| int  | main (int argc, char **argv) | 
|   | 
Example program to test JLANG::JComparible class. 
- Author
 - mdejong 
 
Definition in file JMultiComparable.cc.
 
◆ main()
      
        
          | int main  | 
          ( | 
          int |           argc,  | 
        
        
           | 
           | 
          char ** |           argv ) | 
        
      
 
Definition at line 101 of file JMultiComparable.cc.
  102{
  105 
  107  
  110 
  111  try {
  112 
  113    JParser<> zap(
"Example program to test hierarchical comparisons of objects.");
 
  114 
  117 
  118    zap(argc, argv);
  119  }
  120  catch(const exception &error) {
  121    FATAL(error.what() << endl);
 
  122  }
  123 
  124  DEBUG(
"before:" << endl);
 
  125  for (buffer_type::const_iterator i = buffer.begin(); i != buffer.end(); ++i) {
  127  }
  128    
  129  sort(buffer.begin(), buffer.end());
  130  
  131  DEBUG(
"after:" << endl);
 
  132  for (buffer_type::const_iterator i = buffer.begin(); i != buffer.end(); ++i) {
  134  }
  135 
  136  ASSERT(buffer.size() > 1);
 
  137  
  138  for (buffer_type::const_iterator q = buffer.begin(), p = q++; q != buffer.end(); ++p, ++q) {
  139    ASSERT((
static_cast<const __A__&
>(*p) <  
static_cast<const __A__&
>(*q))    ||
 
  140           (static_cast<const __A__&>(*p) == static_cast<const __A__&>(*q) &&
  141            static_cast<const __B__&>(*p) <  static_cast<const __B__&>(*q)));
  142  }
  143}
#define DEBUG(A)
Message macros.
 
#define ASSERT(A,...)
Assert macro.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
Utility class to parse command line options.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
std::vector< JHitW0 > buffer_type
hits