CGAL 4.12.2 - IO Streams
|
#include <CGAL/IO/io.h>
The purpose of Output_rep
is to provide a way to control output formatting that works independently of the object's stream output operator.
If you dont specialize Output_rep
for T
, T
's stream output operator is called from within Output_rep
, by default. If you want another behaviour for your type T
, you have to provide a specialization for that type. Furthermore, you can provide specializations with a second template parameter (a formatting tag). The second template parameter defaults to Null_tag
and means default behaviour.
Specializations of Output_rep
should provide the following features:
You can also specialize for a formatting tag F
.
The constant is_specialized
can be tested by meta-programming tools to verify that a given type can be used with oformat()
. Its value has to be true
in a specialization of Output_rep
. When there is no specialization for a type, the class template Output_rep
defines is_specialized
to the default value false
.