added operator<<

This commit is contained in:
Eric Berberich 2008-02-08 10:34:41 +00:00
parent ef6370cf40
commit 03273c9fae
1 changed files with 40 additions and 3 deletions

View File

@ -477,6 +477,31 @@ public:
//!@}
//!\name IO
//!@{
//! write represenation to \c os
void write(std::ostream& os) const {
os << "Arc_2l(";
if (this->is_z_vertical()) {
os << "Point_2(" << this->projected_point() << "), ";
os << "MinPoint(" << this->curve_end(CGAL::ARR_MIN_END) << "), ";
os << "MaxPoint(" << this->curve_end(CGAL::ARR_MAX_END) << "), ";
os << "Surface(" << this->surface() << ")";
} else {
os << "Arc_2(" << this->projected_arc() << "), ";
os << "MinPoint(" << this->curve_end(CGAL::ARR_MIN_END) << "), ";
os << "MaxPoint(" << this->curve_end(CGAL::ARR_MAX_END) << "), ";
os << "Surface(" << this->surface() << ", "
<< this->sheet() << ", " << this->sheet(CGAL::ARR_MIN_END)
<< ", " << this->sheet(CGAL::ARR_MAX_END)
<< ")";
}
os << std::flush;
}
//!@}
//!\name Friends
//!@{
@ -489,12 +514,24 @@ public:
//!@}
};
/*!\relates Quadric_arc_2
* \brief
* output operator
*/
template < class CurvedKernelViaAnalysis_2l, class SurfacePair_3 >
std::ostream& operator<< (
std::ostream& os,
const
Surface_arc_2l< CurvedKernelViaAnalysis_2l, SurfacePair_3 >& arc) {
arc.write(os);
return os;
}
// FUTURE TODO a surface can have a vertical plane here over the arc_2
// -> Surface_patch_2l{};
// TODO operator<< (Pavel)
} // namespace CGALi
CGAL_END_NAMESPACE