28 bool less(
const __A__&
object)
const
30 return this->value <
object.value;
33 friend std::istream&
operator>>(std::istream& in, __A__&
object)
35 return in >>
object.value;
38 friend std::ostream&
operator<<(std::ostream& out,
const __A__&
object)
40 return out <<
object.value;
54 bool less(
const __B__&
object)
const
56 return this->value <
object.value;
59 friend std::istream&
operator>>(std::istream& in, __B__&
object)
61 return in >>
object.value;
64 friend std::ostream&
operator<<(std::ostream& out,
const __B__&
object)
66 return out <<
object.value;
81 friend std::istream&
operator>>(std::istream& in, __C__&
object)
83 return in >>
static_cast<__A__&
>(object)
84 >>
static_cast<__B__&
>(
object);
87 friend std::ostream&
operator<<(std::ostream& out,
const __C__&
object)
89 return out << static_cast<const __A__&>(
object) <<
' '
90 <<
static_cast<const __B__&
>(object);
113 JParser<> zap(
"Example program to test hierarchical comparisons of objects.");
120 catch(
const exception &error) {
121 FATAL(error.what() << endl);
124 DEBUG(
"before:" << endl);
125 for (buffer_type::const_iterator i = buffer.begin(); i != buffer.end(); ++i) {
129 sort(buffer.begin(), buffer.end());
131 DEBUG(
"after:" << endl);
132 for (buffer_type::const_iterator i = buffer.begin(); i != buffer.end(); ++i) {
136 ASSERT(buffer.size() > 1);
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)));
std::istream & operator>>(std::istream &in, JAANET::JHead &header)
Read header from input.
General purpose messaging.
#define DEBUG(A)
Message macros.
#define ASSERT(A,...)
Assert macro.
int main(int argc, char **argv)
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).
std::vector< JHitW0 > buffer_type
hits
Template definition of auxiliary base class for comparison of data structures.
Template definition of auxiliary base class for composite data structures composed of base classes wi...