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);
Auxiliary class to print via member method const char* str() const;.
#define JTEST(__A__)
Test macro.
std::ostream & print(std::ostream &out) const
Print object.
static JFalse test(...)
default false
JTypeout * typeout
pointer to printer interface
Auxiliary class to temporarily replace std::ostream.
std::ostream & operator<<(io_manip manip)
Parse I/O manipulator.
std::ostream &(* io_manip)(std::ostream &)
Type definition of I/O operator.
Auxiliary class for a type holder.
virtual ~JTypeout()
Virtual destructor.
JPrinter(std::ostream &out)
Constructor.
Test for availability of member method const char* str() const;.
Auxiliary template class for type bool.
Auxiliary base class for compile time evaluation of test.
do set_variable OUTPUT_DIRECTORY $WORKDIR T
~JPrintHelper()
Destructor.
JPrintHelper(const T &object)
Constructor.
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
Print object.
static JTypeout * get(JType< T > type, JBool< true > option)
Get type writer.
virtual std::ostream & print(std::ostream &out, const void *p) const =0
Print object.
const void * p
pointer to object
static const bool __str__
static JTrue test(JTypecheck< const char *(U::*)() const,&U::__str__ > *)
std::ostream & operator<<(const T &object)
Parse object.
Auxiliary class for type checking.