21 friend inline std::istream&
operator>>(std::istream& in, __A__&
object)
39 inline std::ostream&
operator<<(std::ostream& out,
const __B__<T>&
object)
41 return out <<
"__B__";
58 for (
int value; in >> value; ) {
59 object.push_back(value);
95 out <<
object << std::endl;
109 out <<
"No output operation available." << std::endl;
120 inline void print(std::ostream& out,
const T&
object)
132 #define PRINT(OUT, CLASS) \
133 OUT << std::setw(12) << std::left << #CLASS << ' ' ; \
134 OUT << JStreamAvailable<CLASS>::has_istream << '/'; \
135 OUT << JStreamAvailable<CLASS>::has_ostream << std::endl;
145 int main(
int argc,
char **argv)
154 JParser<> zap(
"Example program to test availability of I/O stream redirection.");
160 catch(
const exception &error) {
161 FATAL(error.what() << endl);
167 cout << setw(12) << left <<
"class" <<
" I/O" << endl;
168 cout << setw(12) << right << setfill(
'-') <<
"" <<
"+---" << setfill(
' ') << endl;
172 PRINT(cout, __B__<int>);
183 cout <<
"STREAM << __A__: " <<
STREAM(
"?") <<
a << endl;
184 cout <<
"STREAM << __B__: " <<
STREAM(
"?") << b << endl;
185 cout <<
"STREAM << __C__: " <<
STREAM(
"?") << c << endl;
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
int main(int argc, char **argv)
#define PRINT(OUT, CLASS)
Print class parameters.
std::ostream & operator<<(std::ostream &out, const __B__< T > &object)
Write object to output.
Utility class to parse command line options.
Test availability of stream operators.
std::ostream & print(std::ostream &out, const JTestSummary &summary, const char delimiter=' ', const bool useColors=true)
Print test summary.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
std::ostream & operator<<(std::ostream &out, const std::vector< int > &object)
Write std::vector<int> to output.
std::istream & operator>>(std::istream &in, std::vector< int > &object)
Read std::vector<int> from input.
Auxiliary template class for type bool.
Auxiliary data structure for handling std::ostream.
friend std::istream & operator>>(std::istream &in, __A__ &object)
Read object from input.