CGAL 4.12 - IO Streams
|
All classes in the CGAL kernel provide input and output operators for IO streams. CGAL provides three different printing mode, defined in the enum IO::Mode
, as well as different functions to set and get the printing mode.
CGAL::get_mode()
CGAL::is_ascii()
CGAL::is_binary()
CGAL::is_pretty()
CGAL::set_mode()
CGAL::set_ascii_mode()
CGAL::set_binary_mode()
CGAL::set_pretty_mode()
CGAL::operator>>()
CGAL::operator<<()
CGAL::iformat()
CGAL::oformat()
CGAL::Color
CGAL::Istream_iterator<T,Stream>
CGAL::Ostream_iterator<T,Stream>
CGAL::Verbose_ostream
CGAL::Input_rep<T,F>
CGAL::Output_rep<T,F>
Modules | |
Stream Operators | |
Classes | |
class | CGAL::Color |
An object of the class Color is a color available for drawing operations in many CGAL output streams. More... | |
class | CGAL::Input_rep< T, F > |
The definition of Input_rep is completely symmetric to Output_rep . More... | |
class | CGAL::Output_rep< T, F > |
The purpose of Output_rep is to provide a way to control output formatting that works independently of the object's stream output operator. More... | |
class | CGAL::Istream_iterator< T, Stream > |
The class Istream_iterator is an input iterator adaptor for the input stream class Stream and value type T . More... | |
class | CGAL::Ostream_iterator< T, Stream > |
The class Ostream_iterator is an output iterator adaptor for the output stream class Stream and value type T . More... | |
class | CGAL::Verbose_ostream |
The class Verbose_ostream can be used as an output stream. More... | |
Enumerations | |
enum | CGAL::IO::Mode { CGAL::IO::ASCII = 0, CGAL::IO::BINARY, CGAL::IO::PRETTY } |
All classes in the CGAL Kernel provide input and output operators for IOStreams. More... | |
Functions | |
IO::Mode | CGAL::get_mode (std::ios &s) |
returns the printing mode of the IO stream s . More... | |
IO::Mode | CGAL::set_ascii_mode (std::ios &s) |
sets the mode of the IO stream s to be the IO::ASCII mode. More... | |
IO::Mode | CGAL::set_binary_mode (std::ios &s) |
IO::Mode | CGAL::set_mode (std::ios &s, IO::Mode m) |
sets the printing mode of the IO stream s . More... | |
IO::Mode | CGAL::set_pretty_mode (std::ios &s) |
sets the mode of the IO stream s to be the IO::PRETTY mode. More... | |
bool | CGAL::is_ascii (std::ios &s) |
checks if the IO stream s is in IO::ASCII mode. More... | |
bool | CGAL::is_binary (std::ios &s) |
checks if the IO stream s is in IO::BINARY mode. More... | |
bool | CGAL::is_pretty (std::ios &s) |
checks if the IO stream s is in IO::PRETTY mode. More... | |
template<class T > | |
Output_rep< T > | CGAL::oformat (const T &t) |
Convenience function to construct an output representation (Output_rep ) for type T . More... | |
template<class T > | |
Input_rep< T > | CGAL::iformat (const T &t) |
The definition of this function is completely symmetric to oformat() . | |
template<class T , typename F > | |
Output_rep< T, F > | CGAL::oformat (const T &t, F) |
Convenience function to construct an output representation (Output_rep ) for type T . More... | |
enum CGAL::IO::Mode |
#include <CGAL/IO/io.h>
All classes in the CGAL Kernel
provide input and output operators for IOStreams.
The basic task of such an operator is to produce a representation of an object that can be written as a sequence of characters on devices as a console, a file, or a pipe. The enum Mode
distinguish between three different printing formats.
In ASCII
mode, numbers e.g. the coordinates of a point or the coefficients of a line, are written in a machine independent format. In BINARY mode, data are written in a binary format, e.g. a double is represented as a sequence of four byte. The format depends on the machine. The mode PRETTY serves mainly for debugging as the type of the geometric object is written, as well as the data defining the object. For example for a point at the origin with Cartesian double coordinates, the output would be PointC2(0.0, 0.0)
. At the moment CGAL does not provide input operations for pretty printed data. By default a stream is in Ascii mode.
CGAL::set_mode()
CGAL::set_ascii_mode()
CGAL::set_binary_mode()
CGAL::set_pretty_mode()
CGAL::get_mode()
CGAL::is_ascii()
CGAL::is_binary()
CGAL::is_pretty()
Enumerator | |
---|---|
ASCII | |
BINARY | |
PRETTY |
IO::Mode CGAL::get_mode | ( | std::ios & | s | ) |
#include <CGAL/IO/io.h>
returns the printing mode of the IO stream s
.
bool CGAL::is_ascii | ( | std::ios & | s | ) |
#include <CGAL/IO/io.h>
checks if the IO stream s
is in IO::ASCII
mode.
bool CGAL::is_binary | ( | std::ios & | s | ) |
#include <CGAL/IO/io.h>
checks if the IO stream s
is in IO::BINARY
mode.
bool CGAL::is_pretty | ( | std::ios & | s | ) |
#include <CGAL/IO/io.h>
checks if the IO stream s
is in IO::PRETTY
mode.
Output_rep<T> CGAL::oformat | ( | const T & | t | ) |
#include <CGAL/IO/io.h>
Convenience function to construct an output representation (Output_rep
) for type T
.
Generic IO for type T
.
Output_rep<T,F> CGAL::oformat | ( | const T & | t, |
F | |||
) |
#include <CGAL/IO/io.h>
Convenience function to construct an output representation (Output_rep
) for type T
.
Generic IO for type T
with formatting tag.
IO::Mode CGAL::set_ascii_mode | ( | std::ios & | s | ) |
#include <CGAL/IO/io.h>
sets the mode of the IO stream s
to be the IO::ASCII
mode.
Returns the previous mode of s
.
IO::Mode CGAL::set_binary_mode | ( | std::ios & | s | ) |
#include <CGAL/IO/io.h>
CGAL::IO::Mode
CGAL::set_mode()
CGAL::set_ascii_mode()
CGAL::set_pretty_mode()
CGAL::get_mode()
CGAL::is_ascii()
CGAL::is_binary()
CGAL::is_pretty()
sets the mode of the IO stream s
to be the IO::BINARY
mode. Returns the previous mode of s
.
#include <CGAL/IO/io.h>
sets the printing mode of the IO stream s
.
IO::Mode CGAL::set_pretty_mode | ( | std::ios & | s | ) |
#include <CGAL/IO/io.h>
sets the mode of the IO stream s
to be the IO::PRETTY
mode.
Returns the previous mode of s
.