25 inline typename T::value_type get(
const T& buffer,
int index)
27 typename T::const_iterator p = buffer.begin();
42 int main(
int argc,
char **argv)
51 JParser<> zap(
"Example program to test assignment of comma separated values.");
57 catch(
const exception &error) {
58 FATAL(error.what() << endl);
72 ASSERT(get(buffer,1) == b);
73 ASSERT(get(buffer,2) == c);
74 ASSERT(get(buffer,3) == d);
83 ASSERT(get(buffer,1) == b);
84 ASSERT(get(buffer,2) == c);
85 ASSERT(get(buffer,3) == d);
91 assign(buffer) = make_pair(1,-1), make_pair(2,-2), make_pair(3,-3), make_pair(4,-4);
102 assign(front_inserter(buffer)) = b,
a;
103 assign(back_inserter (buffer)) = c, d;
106 ASSERT(get(buffer,1) == b);
107 ASSERT(get(buffer,2) == c);
108 ASSERT(get(buffer,3) == d);
int main(int argc, char **argv)
Utility method to assign multiple values to STD container.
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.
JAssignSequence< typename JContainer_t::value_type > assign(JContainer_t &out)
Helper method to assign sequence of Comma Separated Values to output container.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
counter_type advance(counter_type &counter, const counter_type value, const counter_type limit=std::numeric_limits< counter_type >::max())
Advance counter.