1#ifndef __JLANG__JPRINTHELPER__
2#define __JLANG__JPRINTHELPER__
17namespace 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 override
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
169 typedef std::ostream& (*io_manip) (std::ostream&);
180 return __out << manip;
193 return __out << object;
211 return object.print(out);
JLANG::JPrinter operator<<(std::ostream &out, const JLANG::JPrintHelper &object)
Print object via helper.
#define JTEST(__A__)
Test macro.
Test for availability of member method const char* str() const;.
static const bool __str__
static JTrue test(JTypecheck< const char *(U::*)() const, &U::__str__ > *)
Auxiliary class to print via member method const char* str() const;.
std::ostream & print(std::ostream &out) const
Print object.
JPrintHelper(JPrintHelper &&)
static JTypeout * get(JType< T > type, JBool< true > option)
Get type writer.
~JPrintHelper()
Destructor.
JPrintHelper & operator=(const JPrintHelper &)
JPrintHelper & operator=(JPrintHelper &&)
JTypeout * typeout
pointer to printer interface
const void * p
pointer to object
JPrintHelper(const JPrintHelper &)
JPrintHelper(const T &object)
Constructor.
Auxiliary classes and methods for language specific functionality.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary template class for type bool.
virtual ~JTypeout()
Virtual destructor.
virtual std::ostream & print(std::ostream &out, const void *p) const =0
Print object.
Type writer implementation of interface JTypeout based on member method const char* str() const;
virtual std::ostream & print(std::ostream &out, const void *p) const override
Print object.
Auxiliary class to temporarily replace std::ostream.
std::ostream & operator<<(io_manip manip)
Parse I/O manipulator.
std::ostream & operator<<(const T &object)
Parse object.
std::ostream &(*) io_manip(std::ostream &)
Type definition of I/O operator.
JPrinter(std::ostream &out)
Constructor.
Auxiliary class for type checking.
Auxiliary base class for compile time evaluation of test.
static JFalse test(...)
default false
Auxiliary class for a type holder.