"Fossies" - the Fresh Open Source Software Archive

Member "doc_html/Stream_support/classCGAL_1_1Output__rep.html" (8 Nov 2019, 10433 Bytes) of package /linux/misc/CGAL-4.14.2-doc_html.tar.xz:


Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. You can here alternatively try to browse the pure source code or just view or download the uninterpreted raw source code. If the rendering is insufficient you may try to find and view the page on the CGAL-4.14.2-doc_html.tar.xz project site itself.

\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)

CGAL 4.14.2 - IO Streams
CGAL::Output_rep< T, F > Class Template Reference

#include <CGAL/IO/io.h>

Definition

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:

template< class F >
struct Output_rep< Some_type, F > {
static const bool is_specialized = true;
Output_rep( const Some_type& t );
std::ostream& operator()( std::ostream& out ) const;
};

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.