Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Binary Polyhedron_3 I/O questions

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Binary Polyhedron_3 I/O questions


Chronological Thread 
  • From: "Joe C" <>
  • To:
  • Subject: Re: [cgal-discuss] Binary Polyhedron_3 I/O questions
  • Date: Wed, 19 Nov 2008 09:56:11 -0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=xqznt4K6rIUlG8GYyO+2L6iIMVOaMObVemq6pvI7SRcOUw5I6DI5d2+oBC6pazv8ci h289PhAim4yeycE/uspEE6wjd2PtnHmbZ7plZeGoZE8KCMAHVryve8tF+PAkYv7WIco6 8s5yuvCMdj+NVNXPmaRB9AgLZDI5QMabkycu8=

Thank Rui and Laurent for your reply.

Laurent, I am working on Windows XP platform. I did use CGAL::set_binary_mode to create my binary file, otherwise I would not get a binary file. As you suggested, I also tried std::ios::binary when creating the binary file. But neither of them worked. My data should be O.K. because the ascii mode works fine. Any ideas why this curruption only happens in binary mode? Do I need to do some other stuff before reading in polyhedron binary file?

Thanks.

Joe

On Wed, Nov 19, 2008 at 1:58 AM, Laurent Rineau <> wrote:
On Wednesday 19 November 2008 04:17:34 Rui Guo wrote:
> It seems that the operator>> is the std::operator>>.

> #include <CGAL/IO/Polyhedron_iostream.h>
> use CGAL::operator>>

No. std::operator>> cannot has a polyhedron as second operand. Due to Koenig
lookup¹ (also named "argument dependent name lookup"), the compiler search a
matching operator>> in the namespace of the second operand, which is CGAL.
And it find the following operator:

template < class Traits,
          class Items,
          template < class T, class I, class A>
          class HDS, class Alloc>
std::istream& operator>>(std::istream& in,
                        Polyhedron_3<Traits,Items,HDS,Alloc>& P)

which is defined in <CGAL/IO/Polyhedron_iostream.h> (unless that file is not
included).

¹) For Koenig lookup, see:
 http://en.wikipedia.org/wiki/Koenig_Lookup
--
Laurent Rineau, PhD
Engineer at GeometryFactory
http://www.geometryfactory.com/
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss




Archive powered by MHonArc 2.6.16.

Top of Page