Go to the documentation of this file. 1 #ifndef __JLANG__JPRINTHELPER__
2 #define __JLANG__JPRINTHELPER__
17 namespace JPP {
using namespace JLANG; }
43 virtual std::ostream&
print(std::ostream& out,
const void*
p)
const = 0;
61 virtual std::ostream&
print(std::ostream& out,
const void*
p)
const
63 return out << ((
const T*)
p)->__str__();;
88 template<class T, bool is_primitive = JClass<T>::is_primitive>
139 inline std::ostream&
print(std::ostream& out)
const
163 typedef std::ostream& (*io_manip) (std::ostream&);
174 return __out << manip;
187 return __out << object;
205 return object.print(out);
virtual std::ostream & print(std::ostream &out, const void *p) const
Print object.
std::ostream &(* io_manip)(std::ostream &)
Type definition of I/O operator.
Auxiliary class for a type holder.
virtual std::ostream & print(std::ostream &out, const void *p) const =0
Print object.
virtual ~JTypeout()
Virtual destructor.
JTypeout * typeout
pointer to printer interface
std::ostream & print(std::ostream &out) const
Print object.
static JTypeout * get(JType< T > type, JBool< true > option)
Get type writer.
static const bool __str__
static JFalse test(...)
default false
const void * p
pointer to object
Auxiliary base class for compile time evaluation of test.
std::ostream & operator<<(io_manip manip)
Parse I/O manipulator.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
#define JTEST(__A__)
Test macro.
JPrintHelper(const T &object)
Constructor.
Auxiliary template class for type bool.
Auxiliary class to temporarily replace std::ostream.
Test for availability of member method const char* str() const;.
std::ostream & operator<<(const T &object)
Parse object.
static JTrue test(JTypecheck< const char *(U::*)() const, &U::__str__ > *)
JLANG::JPrinter operator<<(std::ostream &out, const JLANG::JPrintHelper &object)
Print object via helper.
Auxiliary class for type checking.
Auxiliary classes and methods for language specific functionality.
Type writer implementation of interface JTypeout based on member method const char* str() const;
Auxiliary class to print via member method const char* str() const;.
~JPrintHelper()
Destructor.
JPrinter(std::ostream &out)
Constructor.