Uniformize os/is/s/i stream parameter name in Stream_support/io

+ remove extra backticks in NP doc
This commit is contained in:
Mael Rouxel-Labbé 2021-06-23 22:56:35 +02:00
parent 3613a94638
commit a34debc92b
23 changed files with 72 additions and 72 deletions

View File

@ -270,7 +270,7 @@ bool read_GOCAD(const std::string& fname, Graph& g,
/// \cgalParamNBegin{stream_precision}
/// \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
/// \cgalParamType{int}
/// \cgalParamDefault{`the precision of the stream `os``}
/// \cgalParamDefault{the precision of the stream `os`}
/// \cgalParamNEnd
/// \cgalNamedParamsEnd
///
@ -378,7 +378,7 @@ bool write_GOCAD(std::ostream& os, const char* name, const Graph& g,
/// \cgalParamNBegin{stream_precision}
/// \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
/// \cgalParamType{int}
/// \cgalParamDefault{`the precision of the stream `os``}
/// \cgalParamDefault{the precision of the stream `os`}
/// \cgalParamNEnd
/// \cgalNamedParamsEnd
///

View File

@ -230,7 +230,7 @@ bool read_OBJ(const std::string& fname, Graph& g,
\cgalParamNBegin{stream_precision}
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
\cgalParamType{int}
\cgalParamDefault{`the precision of the stream `os``}
\cgalParamDefault{the precision of the stream `os`}
\cgalParamNEnd
\cgalNamedParamsEnd

View File

@ -392,7 +392,7 @@ bool write_OFF_BGL(std::ostream& os,
\cgalParamNBegin{stream_precision}
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
\cgalParamType{int}
\cgalParamDefault{`the precision of the stream `os``}
\cgalParamDefault{the precision of the stream `os`}
\cgalParamNEnd
\cgalNamedParamsEnd

View File

@ -310,7 +310,7 @@ bool read_PLY(const std::string& fname, Graph& g,
\cgalParamNBegin{stream_precision}
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
\cgalParamType{int}
\cgalParamDefault{`the precision of the stream `os``}
\cgalParamDefault{the precision of the stream `os`}
\cgalParamExtra{This parameter is only meaningful while using ASCII encoding.}
\cgalParamNEnd
\cgalNamedParamsEnd

View File

@ -230,7 +230,7 @@ bool read_STL(const std::string& fname, Graph& g) { return read_STL(fname, g, pa
\cgalParamNBegin{stream_precision}
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
\cgalParamType{int}
\cgalParamDefault{`the precision of the stream `os``}
\cgalParamDefault{the precision of the stream `os`}
\cgalParamExtra{This parameter is only meaningful while using ASCII encoding.}
\cgalParamNEnd
\cgalNamedParamsEnd

View File

@ -417,7 +417,7 @@ void write_polys_points(std::ostream& os,
* \cgalParamNBegin{stream_precision}
* \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
* \cgalParamType{int}
* \cgalParamDefault{`the precision of the stream `os``}
* \cgalParamDefault{the precision of the stream `os`}
* \cgalParamNEnd
* \cgalNamedParamsEnd
*

View File

@ -61,7 +61,7 @@ namespace IO {
\cgalParamNBegin{stream_precision}
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
\cgalParamType{int}
\cgalParamDefault{`the precision of the stream `os``}
\cgalParamDefault{the precision of the stream `os`}
\cgalParamNEnd
\cgalNamedParamsEnd

View File

@ -140,7 +140,7 @@ namespace IO {
\cgalParamNBegin{stream_precision}
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
\cgalParamType{int}
\cgalParamDefault{`the precision of the stream `os``}
\cgalParamDefault{the precision of the stream `os`}
\cgalParamNEnd
\cgalNamedParamsEnd

View File

@ -458,7 +458,7 @@ namespace IO {
\cgalParamNBegin{stream_precision}
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
\cgalParamType{int}
\cgalParamDefault{`the precision of the stream `os``}
\cgalParamDefault{the precision of the stream `os`}
\cgalParamExtra{This parameter is only meaningful while using ASCII encoding.}
\cgalParamNEnd
\cgalNamedParamsEnd

View File

@ -138,7 +138,7 @@ namespace IO {
\cgalParamNBegin{stream_precision}
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
\cgalParamType{int}
\cgalParamDefault{`the precision of the stream `os``}
\cgalParamDefault{the precision of the stream `os`}
\cgalParamNEnd
\cgalNamedParamsEnd

View File

@ -126,7 +126,7 @@ namespace IO {
\cgalParamNBegin{stream_precision}
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
\cgalParamType{int}
\cgalParamDefault{`the precision of the stream `os``}
\cgalParamDefault{the precision of the stream `os`}
\cgalParamNEnd
\cgalNamedParamsEnd

View File

@ -177,7 +177,7 @@ template <typename PointRange,
\cgalParamNBegin{stream_precision}
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
\cgalParamType{int}
\cgalParamDefault{`the precision of the stream `os``}
\cgalParamDefault{the precision of the stream `os`}
\cgalParamExtra{This parameter is only meaningful while using ASCII encoding.}
\cgalParamNEnd
\cgalNamedParamsEnd

View File

@ -123,7 +123,7 @@ namespace IO {
\cgalParamNBegin{stream_precision}
\cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
\cgalParamType{int}
\cgalParamDefault{`the precision of the stream `os``}
\cgalParamDefault{the precision of the stream `os`}
\cgalParamNEnd
\cgalNamedParamsEnd

View File

@ -356,7 +356,7 @@ bool write_GOCAD(std::ostream& os,
* \cgalParamNBegin{stream_precision}
* \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
* \cgalParamType{int}
* \cgalParamDefault{`the precision of the stream `os``}
* \cgalParamDefault{the precision of the stream `os`}
* \cgalParamNEnd
* \cgalNamedParamsEnd
*

View File

@ -318,7 +318,7 @@ bool read_OBJ(const std::string& fname, PointRange& points, PolygonRange& polygo
* \cgalParamNBegin{stream_precision}
* \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
* \cgalParamType{int}
* \cgalParamDefault{`the precision of the stream `os``}
* \cgalParamDefault{the precision of the stream `os`}
* \cgalParamNEnd
* \cgalNamedParamsEnd
*

View File

@ -297,7 +297,7 @@ bool read_OFF(const std::string& fname, PointRange& points, PolygonRange& polygo
* \cgalParamNBegin{stream_precision}
* \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
* \cgalParamType{int}
* \cgalParamDefault{`the precision of the stream `os``}
* \cgalParamDefault{the precision of the stream `os`}
* \cgalParamNEnd
* \cgalNamedParamsEnd
*

View File

@ -444,7 +444,7 @@ bool read_PLY(const std::string& fname, PointRange& points, PolygonRange& polygo
* \cgalParamNBegin{stream_precision}
* \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
* \cgalParamType{int}
* \cgalParamDefault{`the precision of the stream `os``}
* \cgalParamDefault{the precision of the stream `os`}
* \cgalParamExtra{This parameter is only meaningful while using ASCII encoding.}
* \cgalParamNEnd
* \cgalNamedParamsEnd

View File

@ -286,7 +286,7 @@ bool read_STL(const std::string& fname, PointRange& points, TriangleRange& facet
* \cgalParamNBegin{stream_precision}
* \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
* \cgalParamType{int}
* \cgalParamDefault{`the precision of the stream `os``}
* \cgalParamDefault{the precision of the stream `os`}
* \cgalParamExtra{This parameter is only meaningful while using ASCII encoding.}
* \cgalParamNEnd
* \cgalNamedParamsEnd

View File

@ -371,7 +371,7 @@ void write_soup_polys_points(std::ostream& os,
* \cgalParamNBegin{stream_precision}
* \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
* \cgalParamType{int}
* \cgalParamDefault{`the precision of the stream `os``}
* \cgalParamDefault{the precision of the stream `os`}
* \cgalParamNEnd
* \cgalNamedParamsEnd
*

View File

@ -55,28 +55,28 @@ I_Binary_write_bool(std::ostream& out, bool b) {
// Special function to read size_t from 32b integer to ensure files
inline void
I_Binary_read_uinteger32(std::istream& in, std::uint32_t& u) {
in.read( (char*)(&u), 4);
I_Binary_read_uinteger32(std::istream& is, std::uint32_t& u) {
is.read( (char*)(&u), 4);
}
// written by 64b systems are still readable by 32b ones
inline void
I_Binary_read_size_t_from_uinteger32(std::istream& in, std::size_t& s) {
I_Binary_read_size_t_from_uinteger32(std::istream& is, std::size_t& s) {
std::uint32_t s32;
I_Binary_read_uinteger32 (in, s32);
I_Binary_read_uinteger32 (is, s32);
s = static_cast<std::size_t>(s32);
}
inline void
I_Binary_read_integer32(std::istream& in, std::int32_t& i) {
in.read( (char*)(&i), 4);
I_Binary_read_integer32(std::istream& is, std::int32_t& i) {
is.read( (char*)(&i), 4);
}
inline void
I_Binary_read_float32(std::istream& in, float& f) {
in.read( (char*)(&f), 4);
I_Binary_read_float32(std::istream& is, float& f) {
is.read( (char*)(&f), 4);
}
inline void
I_Binary_read_bool(std::istream& in, bool& b) {
I_Binary_read_bool(std::istream& is, bool& b) {
char c;
in.read(&c, 1);
is.read(&c, 1);
b = (c != 0);
}
@ -130,13 +130,13 @@ I_Binary_write_big_endian_float32(std::ostream& out, float f) {
}
inline void
I_Binary_read_big_endian_integer32(std::istream& in, std::int32_t& i) {
in.read( (char*)(&i), 4);
I_Binary_read_big_endian_integer32(std::istream& is, std::int32_t& i) {
is.read( (char*)(&i), 4);
I_swap_to_big_endian( i);
}
inline void
I_Binary_read_big_endian_float32(std::istream& in, float& f) {
in.read( (char*)(&f), 4);
I_Binary_read_big_endian_float32(std::istream& is, float& f) {
is.read( (char*)(&f), 4);
I_swap_to_big_endian( f);
}

View File

@ -161,7 +161,7 @@ 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;
std::ostream& operator()( std::ostream& os ) const;
};
\endcode
@ -184,7 +184,7 @@ public:
//! initialize with a const reference to \a t.
Output_rep( const T& tt) : t(tt) {}
//! perform the output, calls \c operator\<\< by default.
std::ostream& operator()( std::ostream& out) const { return (out << t); }
std::ostream& operator()( std::ostream& os) const { return (os << t); }
};
/*!
@ -197,7 +197,7 @@ public:
The output operator is defined for all classes in the \cgal `Kernel` and for the class `Color` as well.
*/
template <class T, class F>
std::ostream& operator<<( std::ostream& out, Output_rep<T,F> rep) { return rep( out); }
std::ostream& operator<<( std::ostream& os, Output_rep<T,F> rep) { return rep(os); }
namespace IO {
@ -239,7 +239,7 @@ public:
Input_rep( T& tt) : t(tt) {}
//! perform the input, calls \c operator\>\> by default.
std::istream& operator()( std::istream& in) const { return (in >> t); }
std::istream& operator()( std::istream& is) const { return (is >> t); }
};
#if CGAL_FORCE_IFORMAT_DOUBLE || \
@ -396,7 +396,7 @@ as `std::cin`, as well as from `std::istringstream` and `std::ifstream`.
The input operator is defined for all classes in the \cgal `Kernel`.
*/
template <class T>
std::istream& operator>>( std::istream& in, Input_rep<T> rep) { return rep(in); }
std::istream& operator>>( std::istream& is, Input_rep<T> rep) { return rep(is); }
namespace IO {
@ -419,14 +419,14 @@ public:
//! initialize with a const reference to \a t.
Benchmark_rep( const T& tt) : t(tt) {}
//! perform the output, calls \c operator\<\< by default.
std::ostream& operator()( std::ostream& out) const { return out << t; }
std::ostream& operator()( std::ostream& os) const { return os << t; }
// static function to get the benchmark name
static std::string get_benchmark_name() { return ""; }
};
template <class T, class F>
std::ostream& operator<<( std::ostream& out, Benchmark_rep<T,F> rep) { return rep( out); }
std::ostream& operator<<( std::ostream& os, Benchmark_rep<T,F> rep) { return rep(os); }
namespace IO {
@ -450,9 +450,9 @@ returns the printing mode of the %IO stream `s`.
\sa `CGAL::IO::is_binary()`
\sa `CGAL::IO::is_pretty()`
*/
inline Mode get_mode(std::ios& i)
inline Mode get_mode(std::ios& s)
{
return static_cast<Mode>(i.iword(Static::get_mode()));
return static_cast<Mode>(s.iword(Static::get_mode()));
}
/*!
@ -470,10 +470,10 @@ Returns the previous mode of `s`.
\sa `CGAL::IO::is_binary()`
\sa `CGAL::IO::is_pretty()`
*/
inline Mode set_ascii_mode(std::ios& i)
inline Mode set_ascii_mode(std::ios& s)
{
Mode m = get_mode(i);
i.iword(Static::get_mode()) = ASCII;
Mode m = get_mode(s);
s.iword(Static::get_mode()) = ASCII;
return m;
}
@ -492,10 +492,10 @@ Returns the previous mode of `s`.
\sa `CGAL::IO::is_binary()`
\sa `CGAL::IO::is_pretty()`
*/
inline Mode set_binary_mode(std::ios& i)
inline Mode set_binary_mode(std::ios& s)
{
Mode m = get_mode(i);
i.iword(Static::get_mode()) = BINARY;
Mode m = get_mode(s);
s.iword(Static::get_mode()) = BINARY;
return m;
}
@ -514,10 +514,10 @@ Returns the previous mode of `s`.
\sa `CGAL::IO::is_binary()`
\sa `CGAL::IO::is_pretty()`
*/
inline Mode set_pretty_mode(std::ios& i)
inline Mode set_pretty_mode(std::ios& s)
{
Mode m = get_mode(i);
i.iword(Static::get_mode()) = PRETTY;
Mode m = get_mode(s);
s.iword(Static::get_mode()) = PRETTY;
return m;
}
@ -535,10 +535,10 @@ sets the printing mode of the %IO stream `s`.
\sa `CGAL::IO::is_binary()`
\sa `CGAL::IO::is_pretty()`
*/
inline Mode set_mode(std::ios& i, Mode m)
inline Mode set_mode(std::ios& s, Mode m)
{
Mode old = get_mode(i);
i.iword(Static::get_mode()) = m;
Mode old = get_mode(s);
s.iword(Static::get_mode()) = m;
return old;
}
@ -556,7 +556,7 @@ checks if the %IO stream `s` is in `PRETTY` mode.
\sa `CGAL::IO::is_ascii()`
\sa `CGAL::IO::is_binary()`
*/
inline bool is_pretty(std::ios& i) { return i.iword(Static::get_mode()) == PRETTY; }
inline bool is_pretty(std::ios& s) { return s.iword(Static::get_mode()) == PRETTY; }
/*!
\ingroup PkgStreamSupportRef
@ -572,7 +572,7 @@ checks if the %IO stream `s` is in `ASCII` mode.
\sa `CGAL::IO::is_binary()`
\sa `CGAL::IO::is_pretty()`
*/
inline bool is_ascii(std::ios& i) { return i.iword(Static::get_mode()) == ASCII; }
inline bool is_ascii(std::ios& s) { return s.iword(Static::get_mode()) == ASCII; }
/*!
\ingroup PkgStreamSupportRef
@ -588,7 +588,7 @@ checks if the %IO stream `s` is in `BINARY` mode.
\sa `CGAL::IO::is_ascii()`
\sa `CGAL::IO::is_pretty()`
*/
inline bool is_binary(std::ios& i) { return i.iword(Static::get_mode()) == BINARY; }
inline bool is_binary(std::ios& s) { return s.iword(Static::get_mode()) == BINARY; }
} // namespace IO
@ -642,23 +642,23 @@ inline void read(std::istream& is, T& t)
namespace IO {
inline std::ostream& operator<<( std::ostream& out, const Color& col)
inline std::ostream& operator<<( std::ostream& os, const Color& col)
{
switch(get_mode(out))
switch(get_mode(os))
{
case ASCII :
return out << static_cast<int>(col.red()) << ' '
<< static_cast<int>(col.green()) << ' '
<< static_cast<int>(col.blue()) << ' '
<< static_cast<int>(col.alpha());
return os << static_cast<int>(col.red()) << ' '
<< static_cast<int>(col.green()) << ' '
<< static_cast<int>(col.blue()) << ' '
<< static_cast<int>(col.alpha());
case BINARY :
out.write(reinterpret_cast<const char*>(col.to_rgba().data()), 4);
return out;
os.write(reinterpret_cast<const char*>(col.to_rgba().data()), 4);
return os;
default:
return out << "Color(" << static_cast<int>(col.red()) << ", "
<< static_cast<int>(col.green()) << ", "
<< static_cast<int>(col.blue()) << ", "
<< static_cast<int>(col.alpha()) << ")";
return os << "Color(" << static_cast<int>(col.red()) << ", "
<< static_cast<int>(col.green()) << ", "
<< static_cast<int>(col.blue()) << ", "
<< static_cast<int>(col.alpha()) << ")";
}
}

View File

@ -580,7 +580,7 @@ bool write_OFF_with_or_without_vnormals(std::ostream& os,
/// \cgalParamNBegin{stream_precision}
/// \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
/// \cgalParamType{int}
/// \cgalParamDefault{`the precision of the stream `os``}
/// \cgalParamDefault{the precision of the stream `os`}
/// \cgalParamNEnd
/// \cgalNamedParamsEnd
///

View File

@ -902,7 +902,7 @@ namespace IO {
/// \cgalParamNBegin{stream_precision}
/// \cgalParamDescription{a parameter used to set the precision (i.e. how many digits are generated) of the output stream}
/// \cgalParamType{int}
/// \cgalParamDefault{`the precision of the stream `os``}
/// \cgalParamDefault{the precision of the stream `os`}
/// \cgalParamExtra{This parameter is only meaningful while using ASCII encoding.}
/// \cgalParamNEnd
/// \cgalNamedParamsEnd