improved operator<<

This commit is contained in:
Eric Berberich 2007-12-17 10:51:55 +00:00
parent 8f6a81588e
commit 98b24e6fcb
1 changed files with 13 additions and 6 deletions

View File

@ -116,6 +116,11 @@ class Point_2_rep
// befriending the handle
friend class Point_2<Curved_kernel_via_analysis_2, Self>;
friend std::ostream& operator << <>(
std::ostream&,
const Point_2<Curved_kernel_via_analysis_2, Self>&);
};
//! \brief class defines a point on a generic curve
@ -372,10 +377,7 @@ std::ostream& operator <<(std::ostream& os,
switch(::CGAL::get_mode(os)) {
case ::CGAL::IO::PRETTY:
os << "point@" << pt.id() << "(";
if(pt.location() != CGAL::ARR_BOTTOM_BOUNDARY &&
pt.location() != CGAL::ARR_TOP_BOUNDARY) {
os << "sup@" << pt.curve().id();
}
os << "sup@" << pt.curve().id();
os << " ";
pt._dump_boundary_type(os);
os << "; ";
@ -392,8 +394,7 @@ std::ostream& operator <<(std::ostream& os,
os << ", ";
if (pt.location() != CGAL::ARR_BOTTOM_BOUNDARY &&
pt.location() != CGAL::ARR_TOP_BOUNDARY) {
os << "y=n/a, "; // TODO give y-coordinate
os << "ARCNO=" << pt.arcno();
os << "y=n/a"; // TODO give y-coordinate
} else {
if (pt.location() == CGAL::ARR_BOTTOM_BOUNDARY) {
os << "y=-oo";
@ -401,6 +402,12 @@ std::ostream& operator <<(std::ostream& os,
os << "y=+oo";
}
}
os << ", ";
if (pt.ptr()->_m_xy || pt.ptr()->_m_arc_rep != NULL) {
os << "ARCNO=" << pt.arcno();
} else {
os << "VERT" << pt.arcno();
}
os << ")";
break;
case ::CGAL::IO::BINARY: