mirror of https://github.com/CGAL/cgal
Doc. for new Planar_map IO file.
This commit is contained in:
parent
2384adc72f
commit
aa92b2a4ec
|
|
@ -0,0 +1,113 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Pm_bounding_box_traits.tex (Planar_map)
|
||||
% +------------------------------------------------------------------------+
|
||||
% |
|
||||
% | Package: pm (Planar_map_2)
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\ccRefPageBegin
|
||||
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
%File_header
|
||||
\begin{ccRefClass}{File_header}
|
||||
|
||||
\ccCreationVariable{file_header}
|
||||
|
||||
\ccDefinition
|
||||
Generally, the \ccRefName class contains configurations the user defines before using the IO functions.
|
||||
These configurations concern the verbose flag, writing a file with or without comments etc.
|
||||
This class is the base class of \ccc{Pm_file_scanner} \ccc{Pm_file_writer}.
|
||||
The list of configurations of \ccRefName are written below:
|
||||
|
||||
\begin{itemize}
|
||||
\item {\bf verbose } define a verbose format for printing the \ccc{Planar map}. This flag is set by default to false.
|
||||
\item {\bf ascii} ascii format. This flag is set by default to true.
|
||||
\item {\bf no\_comments} - no comments in output. This flag is set by default to false.
|
||||
\item {\bf index\_offset} - offset for the indices. This flag is set by default to 0.
|
||||
\item {\bf has\_colors} - The format specifies the colors of the \ccc{Planer map} components. This flag is set by default to false.
|
||||
\item {\bf dimension} - specifies the dimension of \ccc{Planer map}. This flag is set by default to 2.
|
||||
\end{itemize}
|
||||
|
||||
In addition the \ccRefName class includes the information regarding the number of vertices, halfedges and faces the
|
||||
\ccc{Planar map} has.
|
||||
|
||||
%The following requirement catalog lists the primitives, i.e., types, member functions
|
||||
%etc., that must be defined for any \ccc{Planar map} file writer class that can be used to parameterize the reading function of \ccc{Planar map}.
|
||||
|
||||
|
||||
\ccCreation
|
||||
When creating \ccRefName object, the user has to define all the configurations he needed, the default configurations are provided as above and hence the user has to define only those configurations which are different from the default.
|
||||
Here \ccStyle{Self} is a typedef of \ccRefName.
|
||||
|
||||
\ccConstructor{File_header ();}
|
||||
{constructs a default \ccRefName\ which contains all the default configurations.}
|
||||
|
||||
\ccConstructor{File_header (int v, int h, int f, bool verbose = false, bool no_comments = false,
|
||||
bool ascii = true, int offset = 0, bool colors = false, int dim = 2);}
|
||||
{constructs \ccRefName\ with \ccc{v} vertices \ccc{h} halfedges and \ccc{f} faces, the other parameters can also be set by the user, otherwise they are getting their default values.}
|
||||
|
||||
\ccConstructor{File_header (const Self& file_header);}{copy constructor.}
|
||||
|
||||
\ccModifiers
|
||||
|
||||
\ccMethod{void set_verbose(bool b);}{setting the verbose flag to b.}
|
||||
|
||||
\ccMethod{void set_ascii(bool b);}{setting the ascii flag to b.}
|
||||
|
||||
\ccMethod{void set_no_comments(bool b);}{setting the no\_comments flag to b.}
|
||||
|
||||
\ccMethod{void set_index_offset(int i);}{setting index\_offset to i.}
|
||||
|
||||
\ccMethod{void set_colors(bool b);}{setting the colors flag to b.}
|
||||
|
||||
\ccMethod{void set_dimension(int i);}{setting the dimension to i.}
|
||||
|
||||
\ccMethod{void set_number_of_vertices(size_t n);}{setting the number of vertices to n.}
|
||||
|
||||
\ccMethod{void set_number_of_halfedges(size_t n);}{setting the number of halfedges to n.}
|
||||
|
||||
\ccMethod{void set_number_of_faces(size_t n);}{setting the number of faces to n.}
|
||||
|
||||
\ccAccessFunctions
|
||||
\ccMethod{bool verbose();} {return true if the format is verbose.}
|
||||
|
||||
\ccMethod{bool ascii();} {return true if the format is given by ascii.}
|
||||
|
||||
\ccMethod{bool no_comments();} {return true if the format is defined without comments.}
|
||||
|
||||
\ccMethod{bool comments();} {return true if the format is defined with comments.}
|
||||
|
||||
\ccMethod{int index_offset();} {return the offset defined for the indices in the format.}
|
||||
|
||||
\ccMethod{bool has_colors();} {return true if the format presents the \ccc{Planar map} by colors.}
|
||||
|
||||
\ccMethod{int dimension();} {return the dimension defined by the format.}
|
||||
|
||||
\ccMethod{size_t number_of_vertices();} {return the number of vertices defined by the format.}
|
||||
|
||||
\ccMethod{size_t number_of_halfedges();} {return the number of halfedges defined by the format.}
|
||||
|
||||
\ccMethod{size_t number_of_faces();} {return the number of faces defined by the format.}
|
||||
|
||||
\end{ccRefClass} % File_header
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
\ccRefPageEnd
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Pm_bounding_box_traits.tex (Planar_map)
|
||||
% +------------------------------------------------------------------------+
|
||||
% |
|
||||
% | Package: pm (Planar_map_2)
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\ccRefPageBegin
|
||||
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
%Pm_file_writer
|
||||
\begin{ccRefClass}{Pm_drawer<Planar_map, Window>}
|
||||
|
||||
\ccCreationVariable{pm_drawer}
|
||||
|
||||
\ccDefinition
|
||||
The \ccRefName\ class is inherited from the \ccc{File_header} class.
|
||||
This class contains functions for writing the \ccc{Planar map} components to a given graphic stream.
|
||||
The user has to make sure that methods for writing {\em Point} and {\em X\_curve} types of \ccc{Planar_map} are defined in the graphic stream he chooses to work with.
|
||||
This class is templated with \ccc{Planar map} and the graphic stream type, and hence the user can work with \ccRefName\ with its own \ccc{Planar map} and graphic stream.
|
||||
|
||||
%The following requirement catalog lists the primitives, i.e., types, member functions
|
||||
%etc., that must be defined for any \ccc{Planar map} file writer class that can be used to parameterize the reading function of \ccc{Planar map}.
|
||||
|
||||
\ccTypes
|
||||
|
||||
The following handles and iterators have appropriate constant counterparts. The mutable types are assignable to their
|
||||
constant counterparts. The iterators are assignable to the respective handle types.
|
||||
Wherever the handles appear in function parameter lists, the appropriate iterator can be used as well.
|
||||
|
||||
\ccNestedType{Vertex_handle}{handle to the \ccc{Planar map} vertex.}
|
||||
\ccNestedType{Halfedge_handle}{handle to the \ccc{Planar map} halfedge.}
|
||||
\ccNestedType{Face_handle}{handle to the \ccc{Planar map} face}.
|
||||
\ccNestedType{Vertex_iterator}{a bidirectional iterator over the vertices of the \ccc{Planar map}.}
|
||||
\ccNestedType{Halfedge_iterator}{a bidirectional iterator over the halfedges of the \ccc{Planar map}.}
|
||||
\ccNestedType{Face_iterator}{a bidirectional iterator over the faces of the \ccc{Planar map}.}
|
||||
|
||||
\ccCreation
|
||||
|
||||
\ccConstructor{Pm_drawer (Window& w);} {constructs \ccRefName\ for a given graphic stream.}
|
||||
|
||||
\ccOperations
|
||||
|
||||
\ccMethod{Window& window();}
|
||||
{return the graphic stream the \ccc{Planar map} is written to.}
|
||||
|
||||
\ccMethod{void draw_vertex (Vertex_handle v);}{writing a vertex of the \ccc{Planar map} to the graphic stream.}
|
||||
\ccMethod{void draw_halfedge (Halfedge_handle h);}{writing an halfedge of the \ccc{Planar map} to the graphic stream.}
|
||||
\ccMethod{void draw_face (Face_handle f);}{writing a face of the \ccc{Planar map} to the graphic stream.}
|
||||
|
||||
\ccMethod{void draw_vertices (Vertex_iterator Vertices_begin, Vertex_iterator Vertices_end);}{writing all the vertices in the range [Vertices\_begin, Vertices\_end) to the graphic stream.}
|
||||
|
||||
\ccMethod{void draw_halfedges (Halfedge_const_iterator Halfedges_begin, Halfedge_const_iterator Halfedges_end);}{writing all the halfedges in the range [Halfedges\_begin, Halfedges\_end) to the graphic stream.}
|
||||
|
||||
\ccMethod{void draw_write_faces (Face_iterator Faces_begin, Face_iterator Faces_end);}{writing all the faces in the range [Faces\_begin, Faces\_end) to the graphic stream.}
|
||||
|
||||
\end{ccRefClass} % Pm_file_writer
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
\ccRefPageEnd
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%%% Local Variables:
|
||||
%%% mode: latex
|
||||
%%% TeX-master: "Pm_file_scanner"
|
||||
%%% End:
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Pm_bounding_box_traits.tex (Planar_map)
|
||||
% +------------------------------------------------------------------------+
|
||||
% |
|
||||
% | Package: pm (Planar_map_2)
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\ccRefPageBegin
|
||||
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
%Pm_file_writer
|
||||
\begin{ccRefConcept}{Pm_drawer}
|
||||
|
||||
\ccCreationVariable{pm_drawer}
|
||||
|
||||
\ccDefinition
|
||||
The class \ccRefName\ contains functions for writing (or drawing) the \ccc{Planar map} componenets to a given graphic stream.
|
||||
The user has to make sure that methods for writing Point and X_curve types of \ccc{Planar_map} are defined in the graphic stream he chooses to work with.
|
||||
This class is templated with \ccc{Planar map}, and hence the user can work with \ccRefName\ with its own \ccc{Planar map}.
|
||||
|
||||
%The following requirement catalog lists the primitives, i.e., types, member functions
|
||||
%etc., that must be defined for any \ccc{Planar map} file writer class that can be used to parameterize the reading function of \ccc{Planar map}.
|
||||
|
||||
\ccTypes
|
||||
|
||||
The following handles and iterators have appropriate constant counterparts. The mutable types are assignable to their
|
||||
constant counterparts. The iterators are assignable to the respective handle types.
|
||||
Wherever the handles appear in function parameter lists, the appropriate iterator can be used as well.
|
||||
|
||||
\ccNestedType{Vertex_handle}{handle to the \ccc{Planar map} vertex.}
|
||||
\ccNestedType{Halfedgee_handle}{handle to the \ccc{Planar map} halfedge.}
|
||||
\ccNestedType{Face_handle}{handle to the \ccc{Planar map} face}.
|
||||
\ccNestedType{Vertex_iterator}{a bidirectional iterator over the vertices of the \ccc{Planar map.}
|
||||
\ccNestedType{Halfedge_iterator}{a bidirectional iterator over the halfedges of the \ccc{Planar map} .}
|
||||
\ccNestedType{Face_iterator}{a bidirectional iterator over the faces of the \ccc{Planar map} .}
|
||||
|
||||
\ccCreation
|
||||
|
||||
\ccConstructor{Pm_drawer(Window& w);}
|
||||
{constructs \ccRefName\ for a given graphic stream.}
|
||||
|
||||
\ccOperations
|
||||
|
||||
\ccMethod{Window& window();}
|
||||
{return the graphic stream the \ccc{Planar map} is written to.}
|
||||
|
||||
\ccMethod{void draw_vertex(Vertex_handle v);}{writing a vertex of the \ccc{Planat map} to the grapihc stream.}
|
||||
\ccMethod{void draw_halfedge(Halfedge_handle h);}{writing an halfedge of the \ccc{Planat map} to the grapihc stream.}
|
||||
\ccMethod{void draw_face(Face_handle f);}{writing a face of the \ccc{Planat map} to the grapihc stream.}
|
||||
|
||||
\ccMethod{void draw_vertices(Vertex_iterator Vertices_begin, Vertex_iterator Vertices_end);}
|
||||
{writing all the vertices in the range [Vertices_begin, Vertices_end) to the grapihc stream.}
|
||||
|
||||
\ccMethod{draw_halfedges(Halfedge_const_iterator Halfedges_begin, Halfedge_const_iterator Halfedges_end);}
|
||||
{writing all the halfedges in the range [Halfedges_begin, Halfedges_end) to the grapihc stream.}
|
||||
|
||||
\ccMethod{draw_faces(Face_iterator Faces_begin, Face_iterator Faces_end);}
|
||||
{writing all the faces in the range [Faces_begin, Faces_end) to the grapihc stream.}
|
||||
|
||||
\end{ccRefConcept} % Pm_file_writer
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
\ccRefPageEnd
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Pm_bounding_box_traits.tex (Planar_map)
|
||||
% +------------------------------------------------------------------------+
|
||||
% |
|
||||
% | Package: pm (Planar_map_2)
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\ccRefPageBegin
|
||||
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
%Pm_file_scanner
|
||||
\begin{ccRefClass}{Pm_file_scanner<Planar_map>}
|
||||
|
||||
\ccCreationVariable{pm_file_scanner}
|
||||
|
||||
\ccDefinition
|
||||
The \ccRefName\ class is inherited from the \ccc{File_header} class.
|
||||
This class contains functions for reading the \ccc{Planar map} components from a given input stream.
|
||||
The user has to make sure that methods for reading {\em Point} and {\em X\_curve} types of \ccc{Planar_map} are defined in the input stream he chooses to work with.
|
||||
This class is templated with \ccc{Planar map}, and hence the user can work with \ccRefName\ with its own \ccc{Planar map}.
|
||||
|
||||
%The following requirement catalog lists the primitives, i.e., types, member functions
|
||||
%etc., that must be defined for any \ccc{Planar map} file scanner class that can be used to parameterize the reading function of \ccc{Planar map}.
|
||||
|
||||
\ccTypes
|
||||
|
||||
\ccNestedType{Traits}{Representation of a bounded curve.}
|
||||
\ccNestedType{Point}{A type to hold the location of a vertex in the plane.}
|
||||
\ccNestedType{X_curve}{A type to hold an $x$-monotone curve in the plane.}
|
||||
|
||||
\ccNestedType{D_vertex}{The \ccc{Dcel} vertex type.}
|
||||
\ccNestedType{D_halfedge}{The \ccc{Dcel} halfedge type.}
|
||||
\ccNestedType{D_face}{The \ccc{Dcel} face type.}
|
||||
|
||||
\ccCreation
|
||||
|
||||
\ccConstructor{Pm_file_scanner (istream& in, bool verbose = false)} {A constructor for a given input stream and a vervose choice.}
|
||||
\ccConstructor{Pm_file_scanner (istream& in, const File_header& header)} {A constructor for a given input stream and File header.}
|
||||
|
||||
\ccOperations
|
||||
\ccMethod{void scan_pm_vhf_sizes ();}{scanning the number of vertices, halfedges and faces in the \ccc{Planar map}.}
|
||||
\ccMethod{void scan_index (size_t& index);}{scanning one index.}
|
||||
\ccMethod{istream& in ();}{return the input stream the \ccc{Planar map} is scanned of.}
|
||||
|
||||
\ccMethod{void scan_vertex (D_vertex* v);}{scanning a vertex of the \ccc{Dcel}.}
|
||||
|
||||
\ccMethod{X_curve scan_halfedge (D_halfedge* h);}
|
||||
{scanning an halfedge of the \ccc{Dcel}. This function also returns the scanned curve, the reason for returning that value is because the \ccc{Arrangement} does not update its halfedge with the curve.}
|
||||
|
||||
\ccMethod{void scan_face (D_face* f);}{scanning a face of the \ccc{Dcel}.}
|
||||
|
||||
\end{ccRefClass} % Pm_file_scanner
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
\ccRefPageEnd
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%%% Local Variables:
|
||||
%%% mode: latex
|
||||
%%% TeX-master: "draw_pm"
|
||||
%%% End:
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Pm_bounding_box_traits.tex (Planar_map)
|
||||
% +------------------------------------------------------------------------+
|
||||
% |
|
||||
% | Package: pm (Planar_map_2)
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\ccRefPageBegin
|
||||
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
%Pm_file_writer
|
||||
\begin{ccRefClass}{Pm_file_writer<Planar_map>}
|
||||
|
||||
\ccCreationVariable{pm_file_writer}
|
||||
|
||||
\ccDefinition
|
||||
The \ccRefName\ class is inherited from the \ccc{File_header} class.
|
||||
This class contains functions for writing the \ccc{Planar map} components to a given output stream.
|
||||
The user has to make sure that methods for writing {\em Point} and {\em X\_curve} types of \ccc{Planar_map} are defined in the output stream he chooses to work with.
|
||||
This class is templated with \ccc{Planar map}, and hence the user can work with \ccRefName\ with its own \ccc{Planar map}.
|
||||
|
||||
%The following requirement catalog lists the primitives, i.e., types, member functions
|
||||
%etc., that must be defined for any \ccc{Planar map} file writer class that can be used to parameterize the reading function of \ccc{Planar map}.
|
||||
|
||||
\ccTypes
|
||||
|
||||
The following handles and iterators have appropriate constant counterparts. The mutable types are assignable to their
|
||||
constant counterparts. The iterators are assignable to the respective handle types.
|
||||
Wherever the handles appear in function parameter lists, the appropriate iterator can be used as well.
|
||||
|
||||
\ccNestedType{Vertex_handle}{handle to the \ccc{Planar map} vertex.}
|
||||
\ccNestedType{Halfedge_handle}{handle to the \ccc{Planar map} halfedge.}
|
||||
\ccNestedType{Face_handle}{handle to the \ccc{Planar map} face}.
|
||||
\ccNestedType{Vertex_iterator}{a bidirectional iterator over the vertices of the \ccc{Planar map}.}
|
||||
\ccNestedType{Halfedge_iterator}{a bidirectional iterator over the halfedges of the \ccc{Planar map}.}
|
||||
\ccNestedType{Face_iterator}{a bidirectional iterator over the faces of the \ccc{Planar map}.}
|
||||
|
||||
\ccCreation
|
||||
As described in the introduction, the planar map users can choose a verbose format for printing their \ccc{Planar map}, this is done by putting this option in the constructor.
|
||||
|
||||
\ccConstructor{Pm_file_writer(std::ostream& o, const PM& pm, bool verbose = false);}
|
||||
{constructs \ccRefName\ for a given output stream, the specified \ccc{Planar map} and a verbose choice.}
|
||||
|
||||
\ccConstructor{Pm_file_writer(std::ostream& o, const PM& pm, const File_header& h)}
|
||||
{constructs \ccRefName\ for a given output stream, the specified \ccc{Planar map} and a file header.}
|
||||
|
||||
\ccOperations
|
||||
|
||||
In the following operations the methods for writing lines in comments are defined only if the comments flag is set to true:
|
||||
|
||||
\ccMethod{void write_title (const char *feature_name); }
|
||||
{writing a title (in comments) to the output stream.}
|
||||
|
||||
\ccMethod{void write_pm_vhf_sizes ();}
|
||||
{writing the number of vertices, halfedges and faces in the \ccc{Planar map} to the output stream.}
|
||||
|
||||
\ccMethod{void write_vertices_header ();}
|
||||
{writing a title (in comments) that begins the vertices list to the output stream.}
|
||||
|
||||
\ccMethod{void write_halfedges_header ();}
|
||||
{writing a title (in comments) that begins the halfedges list to the output stream.}
|
||||
|
||||
\ccMethod{void write_faces_header ();}
|
||||
{writing a title (in comments) that begins the faces list to the output stream.}
|
||||
|
||||
\ccMethod{void write_comment (const char *str);}
|
||||
{writing a line by comments with the information noted in {\em str} to the output stream.}
|
||||
|
||||
\ccMethod{void write_comment (const char *str, int i);}
|
||||
{writing a line by comments with the information noted in {\em str} and {\em i} to the output stream.}
|
||||
|
||||
\ccMethod{void write_value (unsigned int val, char deliminator = \'\\n\');}
|
||||
{writing an integer value followed by a deliminator to the output stream.}
|
||||
|
||||
\ccMethod{ostream& out();}
|
||||
{return the output stream the \ccc{Planar map} is written to.}
|
||||
|
||||
\ccMethod{void write_vertex (Vertex_handle v);}{writing a vertex of the \ccc{Planar map} to the output stream.}
|
||||
\ccMethod{void write_halfedge (Halfedge_handle h);}{writing an halfedge of the \ccc{Planar map} to the output stream.}
|
||||
\ccMethod{void write_face (Face_handle f);}{writing a face of the \ccc{Planar map} to the output stream.}
|
||||
|
||||
\ccMethod{void write_vertices (Vertex_iterator Vertices_begin, Vertex_iterator Vertices_end);}{writing all the vertices in the range [Vertices\_begin, Vertices\_end) to the output stream.}
|
||||
|
||||
\ccMethod{void write_halfedges (Halfedge_const_iterator Halfedges_begin, Halfedge_const_iterator Halfedges_end);}
|
||||
{writing all the halfedges in the range [Halfedges\_begin, Halfedges\_end) to the output stream.}
|
||||
|
||||
\ccMethod{void write_faces (Face_iterator Faces_begin, Face_iterator Faces_end);}
|
||||
{writing all the faces in the range [Faces\_begin, Faces\_end) to the output stream.}
|
||||
|
||||
\end{ccRefClass} % Pm_file_writer
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
\ccRefPageEnd
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%%% Local Variables:
|
||||
%%% mode: latex
|
||||
%%% TeX-master: "Pm_drawer"
|
||||
%%% End:
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Pm_bounding_box_traits.tex (Planar_map)
|
||||
% +------------------------------------------------------------------------+
|
||||
% |
|
||||
% | Package: pm (Planar_map_2)
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\ccRefPageBegin
|
||||
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
%write_pm
|
||||
\begin{ccRefFunction}{draw_pm<Planar_map,Drawer,Window>(Planar_map pm, Drawer& drawer,Window& w);}
|
||||
|
||||
\ccCreationVariable{draw_pm}
|
||||
|
||||
\ccDefinition
|
||||
\ccStyle{draw_pm} is a global function defined for writing \ccc{Planar map} to a graphic stream.
|
||||
The function is templated with the \ccc{Planar map}, the \ccStyle{drawer} and the graphic stream.
|
||||
This function uses the functions defined in \ccStyle{drawer}.
|
||||
The operators defined for writing \ccc{Planar map} to a graphic stream use this function when parameterize the
|
||||
\ccStyle{drawer} with an object derived from \ccc{Pm_drawer}. The user may also notice that since the graphic stream is also
|
||||
a templated parameter, he may call this function with any graphic stream he chooses as long as functions for writing the geometric
|
||||
components are provided in his graphic stream.
|
||||
|
||||
\end{ccRefFunction} % writer_pm
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
\ccRefPageEnd
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%%% Local Variables:
|
||||
%%% mode: latex
|
||||
%%% TeX-master: "write_pm"
|
||||
%%% End:
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Pm_bounding_box_traits.tex (Planar_map)
|
||||
% +------------------------------------------------------------------------+
|
||||
% |
|
||||
% | Package: pm (Planar_map_2)
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\ccRefPageBegin
|
||||
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
%write_pm
|
||||
\begin{ccRefFunction}{write_pm<Planar_map,Writer>(Planar_map pm, Writer& writer, ostream& o);}
|
||||
|
||||
\ccCreationVariable{write_pm}
|
||||
|
||||
\ccDefinition
|
||||
\ccc{write_pm} is a global function defined for writing \ccc{Planar map}.
|
||||
The function is templated with the \ccc{Planar map}, and the \ccStyle{writer}.
|
||||
This function uses the functions defined in \ccStyle{writer}, and prints the \ccc{planar map}
|
||||
in the format discussed in \ccRefPage{Pm_IO_format}.
|
||||
The operator defined for writing \ccc{Planar map} to an output stream uses this function when parameterize the
|
||||
\ccStyle{writer} with an object derived from \ccc{Pm_file_writer}.
|
||||
|
||||
|
||||
\end{ccRefFunction} % writer_pm
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
\ccRefPageEnd
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%%% Local Variables:
|
||||
%%% mode: latex
|
||||
%%% TeX-master: "Pm_file_scanner"
|
||||
%%% End:
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Pm_bounding_box_traits.tex (Planar_map)
|
||||
% +------------------------------------------------------------------------+
|
||||
% |
|
||||
% | Package: pm (Planar_map_2)
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\ccRefPageBegin
|
||||
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
%File_header
|
||||
\begin{ccRefClass}{File_header}
|
||||
|
||||
\ccCreationVariable{file_header}
|
||||
|
||||
\ccDefinition
|
||||
Generally, the \ccRefName class contains configurations the user defines before using the IO functions.
|
||||
These configurations concern the verbose flag, writing a file with or without comments etc.
|
||||
This class is the base class of \ccc{Pm_file_scanner} \ccc{Pm_file_writer}.
|
||||
The list of configurations of \ccRefName are written below:
|
||||
|
||||
\begin{itemize}
|
||||
\item {\bf verbose } define a verbose format for printing the \ccc{Planar map}. This flag is set by default to false.
|
||||
\item {\bf ascii} ascii format. This flag is set by default to true.
|
||||
\item {\bf no\_comments} - no comments in output. This flag is set by default to false.
|
||||
\item {\bf index\_offset} - offset for the indices. This flag is set by default to 0.
|
||||
\item {\bf has\_colors} - The format specifies the colors of the \ccc{Planer map} components. This flag is set by default to false.
|
||||
\item {\bf dimension} - specifies the dimension of \ccc{Planer map}. This flag is set by default to 2.
|
||||
\end{itemize}
|
||||
|
||||
In addition the \ccRefName class includes the information regarding the number of vertices, halfedges and faces the
|
||||
\ccc{Planar map} has.
|
||||
|
||||
%The following requirement catalog lists the primitives, i.e., types, member functions
|
||||
%etc., that must be defined for any \ccc{Planar map} file writer class that can be used to parameterize the reading function of \ccc{Planar map}.
|
||||
|
||||
|
||||
\ccCreation
|
||||
When creating \ccRefName object, the user has to define all the configurations he needed, the default configurations are provided as above and hence the user has to define only those configurations which are different from the default.
|
||||
Here \ccStyle{Self} is a typedef of \ccRefName.
|
||||
|
||||
\ccConstructor{File_header ();}
|
||||
{constructs a default \ccRefName\ which contains all the default configurations.}
|
||||
|
||||
\ccConstructor{File_header (int v, int h, int f, bool verbose = false, bool no_comments = false,
|
||||
bool ascii = true, int offset = 0, bool colors = false, int dim = 2);}
|
||||
{constructs \ccRefName\ with \ccc{v} vertices \ccc{h} halfedges and \ccc{f} faces, the other parameters can also be set by the user, otherwise they are getting their default values.}
|
||||
|
||||
\ccConstructor{File_header (const Self& file_header);}{copy constructor.}
|
||||
|
||||
\ccModifiers
|
||||
|
||||
\ccMethod{void set_verbose(bool b);}{setting the verbose flag to b.}
|
||||
|
||||
\ccMethod{void set_ascii(bool b);}{setting the ascii flag to b.}
|
||||
|
||||
\ccMethod{void set_no_comments(bool b);}{setting the no\_comments flag to b.}
|
||||
|
||||
\ccMethod{void set_index_offset(int i);}{setting index\_offset to i.}
|
||||
|
||||
\ccMethod{void set_colors(bool b);}{setting the colors flag to b.}
|
||||
|
||||
\ccMethod{void set_dimension(int i);}{setting the dimension to i.}
|
||||
|
||||
\ccMethod{void set_number_of_vertices(size_t n);}{setting the number of vertices to n.}
|
||||
|
||||
\ccMethod{void set_number_of_halfedges(size_t n);}{setting the number of halfedges to n.}
|
||||
|
||||
\ccMethod{void set_number_of_faces(size_t n);}{setting the number of faces to n.}
|
||||
|
||||
\ccAccessFunctions
|
||||
\ccMethod{bool verbose();} {return true if the format is verbose.}
|
||||
|
||||
\ccMethod{bool ascii();} {return true if the format is given by ascii.}
|
||||
|
||||
\ccMethod{bool no_comments();} {return true if the format is defined without comments.}
|
||||
|
||||
\ccMethod{bool comments();} {return true if the format is defined with comments.}
|
||||
|
||||
\ccMethod{int index_offset();} {return the offset defined for the indices in the format.}
|
||||
|
||||
\ccMethod{bool has_colors();} {return true if the format presents the \ccc{Planar map} by colors.}
|
||||
|
||||
\ccMethod{int dimension();} {return the dimension defined by the format.}
|
||||
|
||||
\ccMethod{size_t number_of_vertices();} {return the number of vertices defined by the format.}
|
||||
|
||||
\ccMethod{size_t number_of_halfedges();} {return the number of halfedges defined by the format.}
|
||||
|
||||
\ccMethod{size_t number_of_faces();} {return the number of faces defined by the format.}
|
||||
|
||||
\end{ccRefClass} % File_header
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
\ccRefPageEnd
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Pm_bounding_box_traits.tex (Planar_map)
|
||||
% +------------------------------------------------------------------------+
|
||||
% |
|
||||
% | Package: pm (Planar_map_2)
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\ccRefPageBegin
|
||||
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
%Pm_file_writer
|
||||
\begin{ccRefClass}{Pm_drawer<Planar_map, Window>}
|
||||
|
||||
\ccCreationVariable{pm_drawer}
|
||||
|
||||
\ccDefinition
|
||||
The \ccRefName\ class is inherited from the \ccc{File_header} class.
|
||||
This class contains functions for writing the \ccc{Planar map} components to a given graphic stream.
|
||||
The user has to make sure that methods for writing {\em Point} and {\em X\_curve} types of \ccc{Planar_map} are defined in the graphic stream he chooses to work with.
|
||||
This class is templated with \ccc{Planar map} and the graphic stream type, and hence the user can work with \ccRefName\ with its own \ccc{Planar map} and graphic stream.
|
||||
|
||||
%The following requirement catalog lists the primitives, i.e., types, member functions
|
||||
%etc., that must be defined for any \ccc{Planar map} file writer class that can be used to parameterize the reading function of \ccc{Planar map}.
|
||||
|
||||
\ccTypes
|
||||
|
||||
The following handles and iterators have appropriate constant counterparts. The mutable types are assignable to their
|
||||
constant counterparts. The iterators are assignable to the respective handle types.
|
||||
Wherever the handles appear in function parameter lists, the appropriate iterator can be used as well.
|
||||
|
||||
\ccNestedType{Vertex_handle}{handle to the \ccc{Planar map} vertex.}
|
||||
\ccNestedType{Halfedge_handle}{handle to the \ccc{Planar map} halfedge.}
|
||||
\ccNestedType{Face_handle}{handle to the \ccc{Planar map} face}.
|
||||
\ccNestedType{Vertex_iterator}{a bidirectional iterator over the vertices of the \ccc{Planar map}.}
|
||||
\ccNestedType{Halfedge_iterator}{a bidirectional iterator over the halfedges of the \ccc{Planar map}.}
|
||||
\ccNestedType{Face_iterator}{a bidirectional iterator over the faces of the \ccc{Planar map}.}
|
||||
|
||||
\ccCreation
|
||||
|
||||
\ccConstructor{Pm_drawer (Window& w);} {constructs \ccRefName\ for a given graphic stream.}
|
||||
|
||||
\ccOperations
|
||||
|
||||
\ccMethod{Window& window();}
|
||||
{return the graphic stream the \ccc{Planar map} is written to.}
|
||||
|
||||
\ccMethod{void draw_vertex (Vertex_handle v);}{writing a vertex of the \ccc{Planar map} to the graphic stream.}
|
||||
\ccMethod{void draw_halfedge (Halfedge_handle h);}{writing an halfedge of the \ccc{Planar map} to the graphic stream.}
|
||||
\ccMethod{void draw_face (Face_handle f);}{writing a face of the \ccc{Planar map} to the graphic stream.}
|
||||
|
||||
\ccMethod{void draw_vertices (Vertex_iterator Vertices_begin, Vertex_iterator Vertices_end);}{writing all the vertices in the range [Vertices\_begin, Vertices\_end) to the graphic stream.}
|
||||
|
||||
\ccMethod{void draw_halfedges (Halfedge_const_iterator Halfedges_begin, Halfedge_const_iterator Halfedges_end);}{writing all the halfedges in the range [Halfedges\_begin, Halfedges\_end) to the graphic stream.}
|
||||
|
||||
\ccMethod{void draw_write_faces (Face_iterator Faces_begin, Face_iterator Faces_end);}{writing all the faces in the range [Faces\_begin, Faces\_end) to the graphic stream.}
|
||||
|
||||
\end{ccRefClass} % Pm_file_writer
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
\ccRefPageEnd
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%%% Local Variables:
|
||||
%%% mode: latex
|
||||
%%% TeX-master: "Pm_file_scanner"
|
||||
%%% End:
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Pm_bounding_box_traits.tex (Planar_map)
|
||||
% +------------------------------------------------------------------------+
|
||||
% |
|
||||
% | Package: pm (Planar_map_2)
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\ccRefPageBegin
|
||||
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
%Pm_file_writer
|
||||
\begin{ccRefConcept}{Pm_drawer}
|
||||
|
||||
\ccCreationVariable{pm_drawer}
|
||||
|
||||
\ccDefinition
|
||||
The class \ccRefName\ contains functions for writing (or drawing) the \ccc{Planar map} componenets to a given graphic stream.
|
||||
The user has to make sure that methods for writing Point and X_curve types of \ccc{Planar_map} are defined in the graphic stream he chooses to work with.
|
||||
This class is templated with \ccc{Planar map}, and hence the user can work with \ccRefName\ with its own \ccc{Planar map}.
|
||||
|
||||
%The following requirement catalog lists the primitives, i.e., types, member functions
|
||||
%etc., that must be defined for any \ccc{Planar map} file writer class that can be used to parameterize the reading function of \ccc{Planar map}.
|
||||
|
||||
\ccTypes
|
||||
|
||||
The following handles and iterators have appropriate constant counterparts. The mutable types are assignable to their
|
||||
constant counterparts. The iterators are assignable to the respective handle types.
|
||||
Wherever the handles appear in function parameter lists, the appropriate iterator can be used as well.
|
||||
|
||||
\ccNestedType{Vertex_handle}{handle to the \ccc{Planar map} vertex.}
|
||||
\ccNestedType{Halfedgee_handle}{handle to the \ccc{Planar map} halfedge.}
|
||||
\ccNestedType{Face_handle}{handle to the \ccc{Planar map} face}.
|
||||
\ccNestedType{Vertex_iterator}{a bidirectional iterator over the vertices of the \ccc{Planar map.}
|
||||
\ccNestedType{Halfedge_iterator}{a bidirectional iterator over the halfedges of the \ccc{Planar map} .}
|
||||
\ccNestedType{Face_iterator}{a bidirectional iterator over the faces of the \ccc{Planar map} .}
|
||||
|
||||
\ccCreation
|
||||
|
||||
\ccConstructor{Pm_drawer(Window& w);}
|
||||
{constructs \ccRefName\ for a given graphic stream.}
|
||||
|
||||
\ccOperations
|
||||
|
||||
\ccMethod{Window& window();}
|
||||
{return the graphic stream the \ccc{Planar map} is written to.}
|
||||
|
||||
\ccMethod{void draw_vertex(Vertex_handle v);}{writing a vertex of the \ccc{Planat map} to the grapihc stream.}
|
||||
\ccMethod{void draw_halfedge(Halfedge_handle h);}{writing an halfedge of the \ccc{Planat map} to the grapihc stream.}
|
||||
\ccMethod{void draw_face(Face_handle f);}{writing a face of the \ccc{Planat map} to the grapihc stream.}
|
||||
|
||||
\ccMethod{void draw_vertices(Vertex_iterator Vertices_begin, Vertex_iterator Vertices_end);}
|
||||
{writing all the vertices in the range [Vertices_begin, Vertices_end) to the grapihc stream.}
|
||||
|
||||
\ccMethod{draw_halfedges(Halfedge_const_iterator Halfedges_begin, Halfedge_const_iterator Halfedges_end);}
|
||||
{writing all the halfedges in the range [Halfedges_begin, Halfedges_end) to the grapihc stream.}
|
||||
|
||||
\ccMethod{draw_faces(Face_iterator Faces_begin, Face_iterator Faces_end);}
|
||||
{writing all the faces in the range [Faces_begin, Faces_end) to the grapihc stream.}
|
||||
|
||||
\end{ccRefConcept} % Pm_file_writer
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
\ccRefPageEnd
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Pm_bounding_box_traits.tex (Planar_map)
|
||||
% +------------------------------------------------------------------------+
|
||||
% |
|
||||
% | Package: pm (Planar_map_2)
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\ccRefPageBegin
|
||||
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
%Pm_file_scanner
|
||||
\begin{ccRefClass}{Pm_file_scanner<Planar_map>}
|
||||
|
||||
\ccCreationVariable{pm_file_scanner}
|
||||
|
||||
\ccDefinition
|
||||
The \ccRefName\ class is inherited from the \ccc{File_header} class.
|
||||
This class contains functions for reading the \ccc{Planar map} components from a given input stream.
|
||||
The user has to make sure that methods for reading {\em Point} and {\em X\_curve} types of \ccc{Planar_map} are defined in the input stream he chooses to work with.
|
||||
This class is templated with \ccc{Planar map}, and hence the user can work with \ccRefName\ with its own \ccc{Planar map}.
|
||||
|
||||
%The following requirement catalog lists the primitives, i.e., types, member functions
|
||||
%etc., that must be defined for any \ccc{Planar map} file scanner class that can be used to parameterize the reading function of \ccc{Planar map}.
|
||||
|
||||
\ccTypes
|
||||
|
||||
\ccNestedType{Traits}{Representation of a bounded curve.}
|
||||
\ccNestedType{Point}{A type to hold the location of a vertex in the plane.}
|
||||
\ccNestedType{X_curve}{A type to hold an $x$-monotone curve in the plane.}
|
||||
|
||||
\ccNestedType{D_vertex}{The \ccc{Dcel} vertex type.}
|
||||
\ccNestedType{D_halfedge}{The \ccc{Dcel} halfedge type.}
|
||||
\ccNestedType{D_face}{The \ccc{Dcel} face type.}
|
||||
|
||||
\ccCreation
|
||||
|
||||
\ccConstructor{Pm_file_scanner (istream& in, bool verbose = false)} {A constructor for a given input stream and a vervose choice.}
|
||||
\ccConstructor{Pm_file_scanner (istream& in, const File_header& header)} {A constructor for a given input stream and File header.}
|
||||
|
||||
\ccOperations
|
||||
\ccMethod{void scan_pm_vhf_sizes ();}{scanning the number of vertices, halfedges and faces in the \ccc{Planar map}.}
|
||||
\ccMethod{void scan_index (size_t& index);}{scanning one index.}
|
||||
\ccMethod{istream& in ();}{return the input stream the \ccc{Planar map} is scanned of.}
|
||||
|
||||
\ccMethod{void scan_vertex (D_vertex* v);}{scanning a vertex of the \ccc{Dcel}.}
|
||||
|
||||
\ccMethod{X_curve scan_halfedge (D_halfedge* h);}
|
||||
{scanning an halfedge of the \ccc{Dcel}. This function also returns the scanned curve, the reason for returning that value is because the \ccc{Arrangement} does not update its halfedge with the curve.}
|
||||
|
||||
\ccMethod{void scan_face (D_face* f);}{scanning a face of the \ccc{Dcel}.}
|
||||
|
||||
\end{ccRefClass} % Pm_file_scanner
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
\ccRefPageEnd
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%%% Local Variables:
|
||||
%%% mode: latex
|
||||
%%% TeX-master: "draw_pm"
|
||||
%%% End:
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Pm_bounding_box_traits.tex (Planar_map)
|
||||
% +------------------------------------------------------------------------+
|
||||
% |
|
||||
% | Package: pm (Planar_map_2)
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\ccRefPageBegin
|
||||
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
%Pm_file_writer
|
||||
\begin{ccRefClass}{Pm_file_writer<Planar_map>}
|
||||
|
||||
\ccCreationVariable{pm_file_writer}
|
||||
|
||||
\ccDefinition
|
||||
The \ccRefName\ class is inherited from the \ccc{File_header} class.
|
||||
This class contains functions for writing the \ccc{Planar map} components to a given output stream.
|
||||
The user has to make sure that methods for writing {\em Point} and {\em X\_curve} types of \ccc{Planar_map} are defined in the output stream he chooses to work with.
|
||||
This class is templated with \ccc{Planar map}, and hence the user can work with \ccRefName\ with its own \ccc{Planar map}.
|
||||
|
||||
%The following requirement catalog lists the primitives, i.e., types, member functions
|
||||
%etc., that must be defined for any \ccc{Planar map} file writer class that can be used to parameterize the reading function of \ccc{Planar map}.
|
||||
|
||||
\ccTypes
|
||||
|
||||
The following handles and iterators have appropriate constant counterparts. The mutable types are assignable to their
|
||||
constant counterparts. The iterators are assignable to the respective handle types.
|
||||
Wherever the handles appear in function parameter lists, the appropriate iterator can be used as well.
|
||||
|
||||
\ccNestedType{Vertex_handle}{handle to the \ccc{Planar map} vertex.}
|
||||
\ccNestedType{Halfedge_handle}{handle to the \ccc{Planar map} halfedge.}
|
||||
\ccNestedType{Face_handle}{handle to the \ccc{Planar map} face}.
|
||||
\ccNestedType{Vertex_iterator}{a bidirectional iterator over the vertices of the \ccc{Planar map}.}
|
||||
\ccNestedType{Halfedge_iterator}{a bidirectional iterator over the halfedges of the \ccc{Planar map}.}
|
||||
\ccNestedType{Face_iterator}{a bidirectional iterator over the faces of the \ccc{Planar map}.}
|
||||
|
||||
\ccCreation
|
||||
As described in the introduction, the planar map users can choose a verbose format for printing their \ccc{Planar map}, this is done by putting this option in the constructor.
|
||||
|
||||
\ccConstructor{Pm_file_writer(std::ostream& o, const PM& pm, bool verbose = false);}
|
||||
{constructs \ccRefName\ for a given output stream, the specified \ccc{Planar map} and a verbose choice.}
|
||||
|
||||
\ccConstructor{Pm_file_writer(std::ostream& o, const PM& pm, const File_header& h)}
|
||||
{constructs \ccRefName\ for a given output stream, the specified \ccc{Planar map} and a file header.}
|
||||
|
||||
\ccOperations
|
||||
|
||||
In the following operations the methods for writing lines in comments are defined only if the comments flag is set to true:
|
||||
|
||||
\ccMethod{void write_title (const char *feature_name); }
|
||||
{writing a title (in comments) to the output stream.}
|
||||
|
||||
\ccMethod{void write_pm_vhf_sizes ();}
|
||||
{writing the number of vertices, halfedges and faces in the \ccc{Planar map} to the output stream.}
|
||||
|
||||
\ccMethod{void write_vertices_header ();}
|
||||
{writing a title (in comments) that begins the vertices list to the output stream.}
|
||||
|
||||
\ccMethod{void write_halfedges_header ();}
|
||||
{writing a title (in comments) that begins the halfedges list to the output stream.}
|
||||
|
||||
\ccMethod{void write_faces_header ();}
|
||||
{writing a title (in comments) that begins the faces list to the output stream.}
|
||||
|
||||
\ccMethod{void write_comment (const char *str);}
|
||||
{writing a line by comments with the information noted in {\em str} to the output stream.}
|
||||
|
||||
\ccMethod{void write_comment (const char *str, int i);}
|
||||
{writing a line by comments with the information noted in {\em str} and {\em i} to the output stream.}
|
||||
|
||||
\ccMethod{void write_value (unsigned int val, char deliminator = \'\\n\');}
|
||||
{writing an integer value followed by a deliminator to the output stream.}
|
||||
|
||||
\ccMethod{ostream& out();}
|
||||
{return the output stream the \ccc{Planar map} is written to.}
|
||||
|
||||
\ccMethod{void write_vertex (Vertex_handle v);}{writing a vertex of the \ccc{Planar map} to the output stream.}
|
||||
\ccMethod{void write_halfedge (Halfedge_handle h);}{writing an halfedge of the \ccc{Planar map} to the output stream.}
|
||||
\ccMethod{void write_face (Face_handle f);}{writing a face of the \ccc{Planar map} to the output stream.}
|
||||
|
||||
\ccMethod{void write_vertices (Vertex_iterator Vertices_begin, Vertex_iterator Vertices_end);}{writing all the vertices in the range [Vertices\_begin, Vertices\_end) to the output stream.}
|
||||
|
||||
\ccMethod{void write_halfedges (Halfedge_const_iterator Halfedges_begin, Halfedge_const_iterator Halfedges_end);}
|
||||
{writing all the halfedges in the range [Halfedges\_begin, Halfedges\_end) to the output stream.}
|
||||
|
||||
\ccMethod{void write_faces (Face_iterator Faces_begin, Face_iterator Faces_end);}
|
||||
{writing all the faces in the range [Faces\_begin, Faces\_end) to the output stream.}
|
||||
|
||||
\end{ccRefClass} % Pm_file_writer
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
\ccRefPageEnd
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%%% Local Variables:
|
||||
%%% mode: latex
|
||||
%%% TeX-master: "Pm_drawer"
|
||||
%%% End:
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Pm_bounding_box_traits.tex (Planar_map)
|
||||
% +------------------------------------------------------------------------+
|
||||
% |
|
||||
% | Package: pm (Planar_map_2)
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\ccRefPageBegin
|
||||
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
%write_pm
|
||||
\begin{ccRefFunction}{draw_pm<Planar_map,Drawer,Window>(Planar_map pm, Drawer& drawer,Window& w);}
|
||||
|
||||
\ccCreationVariable{draw_pm}
|
||||
|
||||
\ccDefinition
|
||||
\ccStyle{draw_pm} is a global function defined for writing \ccc{Planar map} to a graphic stream.
|
||||
The function is templated with the \ccc{Planar map}, the \ccStyle{drawer} and the graphic stream.
|
||||
This function uses the functions defined in \ccStyle{drawer}.
|
||||
The operators defined for writing \ccc{Planar map} to a graphic stream use this function when parameterize the
|
||||
\ccStyle{drawer} with an object derived from \ccc{Pm_drawer}. The user may also notice that since the graphic stream is also
|
||||
a templated parameter, he may call this function with any graphic stream he chooses as long as functions for writing the geometric
|
||||
components are provided in his graphic stream.
|
||||
|
||||
\end{ccRefFunction} % writer_pm
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
\ccRefPageEnd
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%%% Local Variables:
|
||||
%%% mode: latex
|
||||
%%% TeX-master: "write_pm"
|
||||
%%% End:
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Pm_bounding_box_traits.tex (Planar_map)
|
||||
% +------------------------------------------------------------------------+
|
||||
% |
|
||||
% | Package: pm (Planar_map_2)
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\ccRefPageBegin
|
||||
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
%write_pm
|
||||
\begin{ccRefFunction}{write_pm<Planar_map,Writer>(Planar_map pm, Writer& writer, ostream& o);}
|
||||
|
||||
\ccCreationVariable{write_pm}
|
||||
|
||||
\ccDefinition
|
||||
\ccc{write_pm} is a global function defined for writing \ccc{Planar map}.
|
||||
The function is templated with the \ccc{Planar map}, and the \ccStyle{writer}.
|
||||
This function uses the functions defined in \ccStyle{writer}, and prints the \ccc{planar map}
|
||||
in the format discussed in \ccRefPage{Pm_IO_format}.
|
||||
The operator defined for writing \ccc{Planar map} to an output stream uses this function when parameterize the
|
||||
\ccStyle{writer} with an object derived from \ccc{Pm_file_writer}.
|
||||
|
||||
|
||||
\end{ccRefFunction} % writer_pm
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
\ccRefPageEnd
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%%% Local Variables:
|
||||
%%% mode: latex
|
||||
%%% TeX-master: "Pm_file_scanner"
|
||||
%%% End:
|
||||
Loading…
Reference in New Issue