21 friend inline std::istream&
operator>>(std::istream& in, __A__&
object)
39 inline std::ostream& operator<<(std::ostream& out, const __B__<T>& object)
57 for (
int value; in >> value; ) {
58 object.push_back(value);
72 inline std::ostream& operator<<(std::ostream& out, const std::vector<int>& object)
94 out <<
object << std::endl;
108 out <<
"No output operation available." << std::endl;
119 inline void print(std::ostream& out,
const T&
object)
131 #define PRINT(OUT, CLASS) \
132 OUT << std::setw(12) << std::left << #CLASS << ' ' ; \
133 OUT << JRedirectAvailable<CLASS>::has_istream << '/'; \
134 OUT << JRedirectAvailable<CLASS>::has_ostream << std::endl;
144 int main(
int argc,
char **argv)
153 JParser<> zap(
"Example program to test availability of I/O stream redirection.");
159 catch(
const exception &error) {
160 FATAL(error.what() << endl);
168 cout << setw(12) << left <<
"class" <<
" I/O" << endl;
169 cout << setw(12) << right << setfill(
'-') <<
"" <<
"+---" << setfill(
' ') << endl;
173 PRINT(cout, __B__<int>);
Utility class to parse command line options.
std::istream & operator>>(std::istream &in, JHead &header)
Read header from input.
#define PRINT(OUT, CLASS)
Print class parameters.
void print(const TH1 &h1, std::ostream &out)
Print histogram parameters.
friend std::istream & operator>>(std::istream &in, __A__ &object)
Read object from input.
#define ASSERT(A)
Assert macro.
Auxiliary template class for type bool.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
General purpose messaging.
Utility class to parse command line options.
Test availability of redirect operators.
int main(int argc, char *argv[])