22 bool less(
const __A__&
object)
const
24 return this->value <
object.value;
27 friend std::ostream&
operator<<(std::ostream& out,
const __A__&
object)
29 return out <<
object.value;
40 __B__(
const int __value) :
44 bool less(
const __B__&
object)
const
46 return this->value <
object.value;
49 bool less(
const int value)
const
51 return this->value < value;
54 bool more(
const int value)
const
56 return this->value > value;
59 friend std::ostream&
operator<<(std::ostream& out,
const __B__&
object)
61 return out <<
object.value;
75 #define PRINT(OUT,OP,A,B) \
76 OUT << "(" << A << ") " << #OP " (" << B << ") => " << (A OP B) << std::endl;
85 int main(
int argc,
char **argv)
94 JParser<> zap(
"Example program to test comparisons of objects.");
100 catch(
const exception &error) {
101 FATAL(error.what() << endl);
108 PRINT(cout, ==, a1, a2);
109 PRINT(cout, !=, a1, a2);
110 PRINT(cout, <, a1, a2);
111 PRINT(cout, <=, a1, a2);
112 PRINT(cout, >, a1, a2);
113 PRINT(cout, >=, a1, a2);
118 PRINT(cout, ==, b1, b1);
119 PRINT(cout, !=, b1, b2);
120 PRINT(cout, <, b1, b2);
121 PRINT(cout, <=, b1, b2);
122 PRINT(cout, >, b1, b2);
123 PRINT(cout, >=, b1, b2);
125 PRINT(cout, ==, b1, 1);
126 PRINT(cout, !=, b1, 1);
127 PRINT(cout, <, b1, 1);
128 PRINT(cout, <=, b1, 1);
129 PRINT(cout, >, b1, 1);
130 PRINT(cout, >=, b1, 1);
int main(int argc, char **argv)
#define PRINT(OUT, OP, A, B)
Print.
General purpose messaging.
#define ASSERT(A,...)
Assert macro.
Utility class to parse command line options.
#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).
Template definition of auxiliary base class for comparison of data structures.