begin of advanced section  advanced  begin of advanced section

CGAL::File_header

Definition

Generally, the File_header class defines and sets parameters that should be defined while using the I/O functions. This configuration includes the verbose flag, a flag that controls writing a file with or without comments, etc. The class is the base class of the classes Pm_file_scanner and Pm_file_writer. The list of parameters for File_header is as follows:

In addition the File_header class includes the information regarding the number of vertices, halfedges and faces the Planar map has.

Creation

When creating a File_header object, the user sets the parameters as needed.

File_header file_header;
constructs a default File_header which contains the default configuration.


File_header 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 File_header with v vertices h halfedges and f faces, the other parameters can also be set by the user, otherwise they are set to their default values.


File_header file_header ( file_header);
copy construction.

Modifiers

void file_header.set_verbose ( bool b)
sets the verbose flag to b.
void file_header.set_ascii ( bool b)
sets the ascii flag to b.
void file_header.set_no_comments ( bool b)
sets the no_comments flag to b.
void file_header.set_index_offset ( int i)
sets index_offset to i.
void file_header.set_colors ( bool b)
sets the colors flag to b.
void file_header.set_dimension ( int i)
sets the dimension to i.
void file_header.set_number_of_vertices ( size_t n)
sets the number of vertices to n.
void file_header.set_number_of_halfedges ( size_t n)
sets the number of halfedges to n.
void file_header.set_number_of_faces ( size_t n)
sets the number of faces to n.

Access Functions

bool file_header.verbose ()
returns true if the format is verbose.
bool file_header.ascii ()
returns true if the format is given by ascii.
bool file_header.no_comments ()
returns true if the format is defined without comments.
bool file_header.comments ()
returns true if the format is defined with comments.
int file_header.index_offset ()
returns the offset defined for the indices in the format.
bool file_header.has_colors ()
returns true if the format presents the Planar map by colors.
int file_header.dimension ()
returns the dimension defined by the format.
size_t file_header.number_of_vertices ()
returns the number of vertices defined by the format.
size_t file_header.number_of_halfedges ()
returns the number of halfedges defined by the format.
size_t file_header.number_of_faces ()
returns the number of faces defined by the format.

end of advanced section  advanced  end of advanced section