Skip to content

Commit fb6f703

Browse files
committed
IO namespace for files in IO directories
1 parent 8005f91 commit fb6f703

File tree

372 files changed

+1802
-1716
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

372 files changed

+1802
-1716
lines changed

AABB_tree/examples/AABB_tree/AABB_cached_bbox_example.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void triangle_mesh(const char* fname)
2727
typedef CGAL::AABB_tree<Traits> Tree;
2828

2929
TriangleMesh tmesh;
30-
if(!CGAL::read_polygon_mesh(fname, tmesh) || CGAL::is_triangle_mesh(tmesh))
30+
if(!CGAL::IO::read_polygon_mesh(fname, tmesh) || CGAL::is_triangle_mesh(tmesh))
3131
{
3232
std::cerr << "Invalid input." << std::endl;
3333
return;

AABB_tree/examples/AABB_tree/AABB_ray_shooting_example.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ int main(int argc, char* argv[])
4747
const char* filename = (argc > 1) ? argv[1] : "data/tetrahedron.off";
4848

4949
Mesh mesh;
50-
if(!CGAL::read_polygon_mesh(filename, mesh))
50+
if(!CGAL::IO::read_polygon_mesh(filename, mesh))
5151
{
5252
std::cerr << "Invalid input." << std::endl;
5353
return 1;

Advancing_front_surface_reconstruction/examples/Advancing_front_surface_reconstruction/reconstruction_structured.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ int main (int argc, char* argv[])
114114
const char* fname = (argc>1) ? argv[1] : "data/cube.pwn";
115115
// Loading point set from a file.
116116

117-
if (!CGAL::read_points(fname, std::back_inserter(points),
118-
CGAL::parameters::point_map(Point_map()).
119-
normal_map(Normal_map())))
117+
if (!CGAL::IO::read_points(fname, std::back_inserter(points),
118+
CGAL::parameters::point_map(Point_map()).
119+
normal_map(Normal_map())))
120120
{
121121
std::cerr << "Error: cannot read file" << std::endl;
122122
return EXIT_FAILURE;

Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/arr_bench.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -277,11 +277,11 @@ inline std::ostream & operator<<(std::ostream & os, const Arr::Vertex & vertex)
277277
inline Window_stream & operator<<(Window_stream & ws, Arr & arr)
278278
{
279279
Arr::Edge_iterator ei;
280-
ws << CGAL::blue();
280+
ws << CGAL::IO::blue();
281281
for (ei = arr.edges_begin(); ei != arr.edges_end(); ++ei)
282282
ws << (*ei).curve();
283283
Arr::Vertex_iterator vi;
284-
ws << CGAL::red();
284+
ws << CGAL::IO::red();
285285
for (vi = arr.vertices_begin(); vi != arr.vertices_end(); ++vi)
286286
ws << (*vi).point();
287287
return ws;

Arrangement_on_surface_2/include/CGAL/Arr_triangulation_point_location.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class Arr_triangulation_point_location : public Arr_observer<Arrangement_>
8080
typedef Triangulation_vertex_base_with_info_2<Vertex_const_handle, Kernel>
8181
Vbb;
8282
typedef Triangulation_hierarchy_vertex_base_2<Vbb> Vb;
83-
//typedef Triangulation_face_base_with_info_2<CGAL::Color,Kernel> Fbt;
83+
//typedef Triangulation_face_base_with_info_2<CGAL::IO::Color,Kernel> Fbt;
8484
typedef Constrained_triangulation_face_base_2<Kernel> Fb;
8585
typedef Triangulation_data_structure_2<Vb,Fb> TDS;
8686
typedef Exact_predicates_tag Itag;

BGL/doc/BGL/PackageDescription.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -756,8 +756,8 @@ user might encounter.
756756
- `CGAL::alpha_expansion_graphcut()`
757757

758758
\cgalCRPSection{I/O Functions}
759-
- `CGAL::read_polygon_mesh()`
760-
- `CGAL::write_polygon_mesh()`
759+
- `CGAL::IO::read_polygon_mesh()`
760+
- `CGAL::IO::write_polygon_mesh()`
761761
- \link PkgBGLIoFuncsSTL I/O for STL files \endlink
762762
- \link PkgBGLIoFuncsPLY I/O for PLY files \endlink
763763
- \link PkgBGLIoFuncsOBJ I/O for OBJ files \endlink

BGL/examples/BGL_LCC/copy_lcc.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ int main(int argc, char* argv[])
3939
Target1 T1;
4040
{
4141
CGAL::copy_face_graph(S, T1);
42-
CGAL::write_OFF("lcc.off", T1);
42+
CGAL::IO::write_OFF("lcc.off", T1);
4343
}
4444

4545
S.clear();

BGL/examples/BGL_LCC/distance_lcc.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ typedef boost::graph_traits<LCC>::vertex_iterator vertex_iterator;
2020
int main(int argc, char** argv)
2121
{
2222
LCC lcc;
23-
CGAL::read_polygon_mesh((argc>1)?argv[1]:"cube.off", lcc);
23+
CGAL::IO::read_polygon_mesh((argc>1)?argv[1]:"cube.off", lcc);
2424

2525
// This is the vector where the distance gets written to
2626
std::vector<int> distance(lcc.vertex_attributes().size());

BGL/examples/BGL_LCC/incident_vertices_lcc.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ OutputIterator adjacent_vertices_V2(const LCC& g,
5151
int main(int argc, char** argv)
5252
{
5353
LCC lcc;
54-
CGAL::read_polygon_mesh((argc>1)?argv[1]:"cube.off", lcc);
54+
CGAL::IO::read_polygon_mesh((argc>1)?argv[1]:"cube.off", lcc);
5555

5656
GraphTraits::vertex_iterator vi = vertices(lcc).first;
5757
std::list<vertex_descriptor> V;

BGL/examples/BGL_LCC/normals_lcc.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ int main(int argc, char** argv)
7070
Face_index_map;
7171

7272
LCC lcc;
73-
CGAL::read_polygon_mesh((argc>1)?argv[1]:"cube.off", lcc);
73+
CGAL::IO::read_polygon_mesh((argc>1)?argv[1]:"cube.off", lcc);
7474

7575
// Ad hoc property_map to store normals. Face_index_map is used to
7676
// map face_descriptors to a contiguous range of indices. See

BGL/examples/BGL_LCC/range_lcc.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void fct(const LCC& lcc)
5252
int main(int argc, char** argv)
5353
{
5454
LCC lcc;
55-
CGAL::read_polygon_mesh((argc>1)?argv[1]:"cube.off", lcc);
55+
CGAL::IO::read_polygon_mesh((argc>1)?argv[1]:"cube.off", lcc);
5656

5757
fct(lcc);
5858
return 0;

BGL/examples/BGL_LCC/transform_iterator_lcc.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ struct Source {
4343
int main(int argc, char** argv)
4444
{
4545
LCC lcc;
46-
CGAL::read_polygon_mesh((argc>1)?argv[1]:"cube.off", lcc);
46+
CGAL::IO::read_polygon_mesh((argc>1)?argv[1]:"cube.off", lcc);
4747
GraphTraits::vertex_descriptor vd = *(vertices(lcc).first);
4848

4949
typedef boost::transform_iterator<Source<LCC>,halfedge_around_target_iterator> adjacent_vertex_iterator;

BGL/examples/BGL_OpenMesh/TriMesh.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ int main(int argc, char** argv )
2828
std::vector<vertex_descriptor> V;
2929
const char* filename = (argc>1)?argv[1]:"in.off";
3030
const char* outname= (argc>2)?argv[2]:"out.off";
31-
CGAL::read_polygon_mesh(filename, mesh);
31+
CGAL::IO::read_polygon_mesh(filename, mesh);
3232

3333
for(vertex_descriptor vd : vertices(mesh)){
3434
for(halfedge_descriptor hd : CGAL::halfedges_around_target(vd,mesh)){
3535
if(! CGAL::is_border(edge(hd,mesh),mesh)){
3636
CGAL::Euler::flip_edge(hd,mesh);
37-
CGAL::write_polygon_mesh(outname, mesh);
37+
CGAL::IO::write_polygon_mesh(outname, mesh);
3838
return 0;
3939
}
4040
}

BGL/examples/BGL_graphcut/face_selection_borders_regularization_example.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ int main(int argc, char** argv)
2121
}
2222

2323
Mesh mesh;
24-
CGAL::read_OFF (in, mesh);
24+
CGAL::IO::read_OFF (in, mesh);
2525

2626
boost::unordered_map<Face_index, bool> is_selected_map;
2727

BGL/examples/BGL_surface_mesh/connected_components.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ int main(int argc, char* argv[])
1717
const char* filename = (argc > 1) ? argv[1] : "data/prim.off";
1818

1919
Mesh sm;
20-
if(!CGAL::read_polygon_mesh(filename, sm))
20+
if(!CGAL::IO::read_polygon_mesh(filename, sm))
2121
{
2222
std::cerr << "Invalid input." << std::endl;
2323
return 1;

BGL/examples/BGL_surface_mesh/prim.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ int main(int argc, char* argv[])
1717
const char* filename = (argc>1) ? argv[1] : "data/prim.off";
1818

1919
Mesh P;
20-
if(!CGAL::read_polygon_mesh(filename, P))
20+
if(!CGAL::IO::read_polygon_mesh(filename, P))
2121
{
2222
std::cerr << "Invalid input." << std::endl;
2323
return 1;

BGL/examples/BGL_surface_mesh/seam_mesh.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ int main(int argc, char* argv[])
3636
const char* filename = (argc>1) ? argv[1] : "data/cube.off";
3737

3838
Mesh sm;
39-
if(!CGAL::read_polygon_mesh(filename, sm))
39+
if(!CGAL::IO::read_polygon_mesh(filename, sm))
4040
{
4141
std::cerr << "Invalid input." << std::endl;
4242
return 1;

BGL/examples/BGL_surface_mesh/surface_mesh_dual.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ int main(int argc, char* argv[])
4040
const char* filename = (argc > 1) ? argv[1] : "data/prim.off";
4141

4242
Mesh primal;
43-
if(!CGAL::read_polygon_mesh(filename, primal))
43+
if(!CGAL::IO::read_polygon_mesh(filename, primal))
4444
{
4545
std::cerr << "Invalid input." << std::endl;
4646
return 1;

BGL/examples/BGL_surface_mesh/surface_mesh_partition.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ int main(int argc, char** argv)
1717
int number_of_parts = (argc>2) ? atoi(argv[2]) : 8;
1818

1919
SM sm;
20-
if(!CGAL::read_polygon_mesh(filename, sm))
20+
if(!CGAL::IO::read_polygon_mesh(filename, sm))
2121
{
2222
std::cerr << "Invalid input." << std::endl;
2323
return 1;
@@ -44,7 +44,7 @@ int main(int argc, char** argv)
4444
CGAL::copy_face_graph(filtered_sm, part_sm);
4545

4646
// Output the mesh extracted from subpart n°0
47-
CGAL::write_polygon_mesh("sm_part_0.off", part_sm, CGAL::parameters::stream_precision(17));
47+
CGAL::IO::write_polygon_mesh("sm_part_0.off", part_sm, CGAL::parameters::stream_precision(17));
4848

4949
// Output all the vertices that are in the part n°0
5050
std::ofstream outxyz("out.xyz");

BGL/examples/BGL_surface_mesh/write_inp.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ int main()
2222

2323
std::ofstream out("out.inp");
2424
out.precision(17);
25-
CGAL::write_INP(out, "out.inp", "S4R", sm);
25+
CGAL::IO::write_INP(out, "out.inp", "S4R", sm);
2626

2727
return EXIT_SUCCESS;
2828
}

BGL/include/CGAL/boost/graph/IO/3MF.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828

2929
namespace CGAL {
3030

31+
namespace IO {
32+
3133
////////////////////////////////////////////////////////////////////////////////////////////////////
3234
////////////////////////////////////////////////////////////////////////////////////////////////////
3335
// Write
@@ -58,7 +60,7 @@ bool write_3MF(const std::string& filename,
5860
const std::vector<std::string>& names
5961
#ifndef DOXYGEN_RUNNING
6062
, typename boost::disable_if<
61-
IO::internal::is_Point_set_or_Range_or_Iterator<
63+
internal::is_Point_set_or_Range_or_Iterator<
6264
typename boost::range_value<GraphRange>::type> >::type* = nullptr
6365
#endif
6466
)
@@ -114,7 +116,7 @@ bool write_3MF(const std::string& filename,
114116
return write_3MF(filename, all_points, all_triangles, names);
115117
}
116118

117-
} // namespace CGAL
119+
} } // namespace CGAL::IO
118120

119121
#endif // defined(CGAL_LINKED_WITH_3MF) || defined(DOXYGEN_RUNNING)
120122

BGL/include/CGAL/boost/graph/IO/GOCAD.h

+16-17
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ class GOCAD_builder
7676
};
7777

7878
} // namespace internal
79-
} // namespace IO
8079

8180
/// \ingroup PkgBGLIoFuncsGOCAD
8281
///
@@ -120,14 +119,14 @@ bool read_GOCAD(std::istream& is,
120119
Graph& g,
121120
const CGAL_BGL_NP_CLASS& np
122121
#ifndef DOXYGEN_RUNNING
123-
, typename boost::disable_if<IO::internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr
122+
, typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr
124123
#endif
125124
)
126125
{
127126
typedef typename CGAL::GetVertexPointMap<Graph, CGAL_BGL_NP_CLASS>::type VPM;
128127
typedef typename boost::property_traits<VPM>::value_type Point;
129128

130-
IO::internal::GOCAD_builder<Graph, Point> builder(is);
129+
internal::GOCAD_builder<Graph, Point> builder(is);
131130
if(!builder(g, np))
132131
return false;
133132

@@ -141,22 +140,22 @@ bool read_GOCAD(std::istream& is,
141140

142141
template <typename Graph>
143142
bool read_GOCAD(std::istream& is, std::pair<std::string, std::string>& name_and_color, Graph& g,
144-
typename boost::disable_if<IO::internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
143+
typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
145144
{
146145
return read_GOCAD(is, name_and_color, g, parameters::all_default());
147146
}
148147

149148
template <typename Graph, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
150149
bool read_GOCAD(std::istream& is, Graph& g, const CGAL_BGL_NP_CLASS& np,
151-
typename boost::disable_if<IO::internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
150+
typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
152151
{
153152
std::pair<std::string, std::string> dummy;
154153
return read_GOCAD(is, dummy, g, np);
155154
}
156155

157156
template <typename Graph>
158157
bool read_GOCAD(std::istream& is, Graph& g,
159-
typename boost::disable_if<IO::internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
158+
typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
160159
{
161160
return read_GOCAD(is, g, parameters::all_default());
162161
}
@@ -207,7 +206,7 @@ bool read_GOCAD(const std::string& fname,
207206
Graph& g,
208207
const CGAL_BGL_NP_CLASS& np
209208
#ifndef DOXYGEN_RUNNING
210-
, typename boost::disable_if<IO::internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr
209+
, typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr
211210
#endif
212211
)
213212
{
@@ -220,22 +219,22 @@ bool read_GOCAD(const std::string& fname,
220219

221220
template <typename Graph>
222221
bool read_GOCAD(const std::string& fname, std::pair<std::string, std::string>& name_and_color, Graph& g,
223-
typename boost::disable_if<IO::internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
222+
typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
224223
{
225224
return read_GOCAD(fname, name_and_color, g, parameters::all_default());
226225
}
227226

228227
template <typename Graph, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
229228
bool read_GOCAD(const std::string& fname, Graph& g, const CGAL_BGL_NP_CLASS& np,
230-
typename boost::disable_if<IO::internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
229+
typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
231230
{
232231
std::pair<std::string, std::string> dummy;
233232
return read_GOCAD(fname, dummy, g, np);
234233
}
235234

236235
template <typename Graph>
237236
bool read_GOCAD(const std::string& fname, Graph& g,
238-
typename boost::disable_if<IO::internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
237+
typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
239238
{
240239
return read_GOCAD(fname, g, parameters::all_default());
241240
}
@@ -284,7 +283,7 @@ bool write_GOCAD(std::ostream& os,
284283
const Graph& g,
285284
const CGAL_BGL_NP_CLASS& np
286285
#ifndef DOXYGEN_RUNNING
287-
, typename boost::disable_if<IO::internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr
286+
, typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr
288287
#endif
289288
)
290289
{
@@ -346,7 +345,7 @@ bool write_GOCAD(std::ostream& os,
346345

347346
template <typename Graph>
348347
bool write_GOCAD(std::ostream& os, const char* name, const Graph& g,
349-
typename boost::disable_if<IO::internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
348+
typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
350349
{
351350
return write_GOCAD(os, name, g, parameters::all_default());
352351
}
@@ -391,7 +390,7 @@ bool write_GOCAD(std::ostream& os,
391390
const Graph& g,
392391
const CGAL_BGL_NP_CLASS& np
393392
#ifndef DOXYGEN_RUNNING
394-
, typename boost::disable_if<IO::internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr
393+
, typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr
395394
#endif
396395
)
397396
{
@@ -402,7 +401,7 @@ bool write_GOCAD(std::ostream& os,
402401

403402
template <typename Graph>
404403
bool write_GOCAD(std::ostream& os, const Graph& g,
405-
typename boost::disable_if<IO::internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
404+
typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
406405
{
407406
return write_GOCAD(os, g, parameters::all_default());
408407
}
@@ -447,7 +446,7 @@ bool write_GOCAD(const std::string& fname,
447446
const Graph& g,
448447
const CGAL_BGL_NP_CLASS& np
449448
#ifndef DOXYGEN_RUNNING
450-
, typename boost::disable_if<IO::internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr
449+
, typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr
451450
#endif
452451
)
453452
{
@@ -461,13 +460,13 @@ bool write_GOCAD(const std::string& fname,
461460

462461
template <typename Graph>
463462
bool write_GOCAD(const std::string& fname, const Graph& g,
464-
typename boost::disable_if<IO::internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
463+
typename boost::disable_if<internal::is_Point_set_or_Range_or_Iterator<Graph> >::type* = nullptr)
465464
{
466465
return write_GOCAD(fname, g, parameters::all_default());
467466
}
468467

469468
/// \endcond
470469

471-
} // namespace CGAL
470+
}} // namespace CGAL::IO
472471

473472
#endif // CGAL_BGL_IO_GOCAD_H

BGL/include/CGAL/boost/graph/IO/Generic_facegraph_builder.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class Generic_facegraph_builder
4444
typedef typename GetK<Graph, NamedParameters>::Kernel Kernel;
4545
typedef typename Kernel::Vector_3 Vector;
4646
typedef typename Kernel::Point_2 Texture;
47-
typedef CGAL::Color Color;
47+
typedef CGAL::IO::Color Color;
4848

4949
typedef typename CGAL::GetVertexPointMap<Graph, NamedParameters>::type VPM;
5050

0 commit comments

Comments
 (0)