/usr/include/CGAL/boost/graph/properties.h is in libcgal-dev 4.11-2build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | // Copyright (c) 2007 GeometryFactory (France). All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 3 of the License,
// or (at your option) any later version.
//
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// $URL$
// $Id$
//
//
// Author(s) : Andreas Fabri, Fernando Cacciola
#ifndef CGAL_BOOST_GRAPH_BGL_PROPERTIES_H
#define CGAL_BOOST_GRAPH_BGL_PROPERTIES_H
#include <CGAL/property_map.h>
#include <boost/graph/properties.hpp>
#include <boost/graph/graph_traits.hpp>
#include <boost/foreach.hpp>
#include <CGAL/Dynamic_property_map.h>
#include <CGAL/basic.h>
#include <string>
/// Boost Namespace
namespace boost {
/// \ingroup PkgBGLProperties
/// @{
/// A property tag which refers to the geometric embedding property
/// of a vertex of a \ref HalfedgeGraph.
enum vertex_point_t { vertex_point };
enum vertex_external_index_t { vertex_external_index } ;
/// A property tag which refers to the property
/// of a halfedge of being a border halfedge.
enum edge_external_index_t { edge_external_index } ;
/// A property tag which identifies the *index* property of
/// a halfedge of a \ref HalfedgeGraph.
enum halfedge_index_t { halfedge_index };
enum halfedge_external_index_t { halfedge_external_index } ;
/// A property tag which identifies the *index* property of
/// a face of a \ref FaceGraph.
enum face_index_t { face_index };
enum face_external_index_t { face_external_index } ;
template<typename Graph, typename PropertyTag>
struct graph_has_property : CGAL::Tag_false {};
struct cgal_no_property
{
typedef bool type;
typedef const bool const_type;
};
/// @}
// Introduce those two tags so we can use BOOST_INSTALL_PROPERTY
// macro. This is dangerous because we now rely on implementation
// details.
struct halfedge_property_tag { };
struct face_property_tag { };
BOOST_INSTALL_PROPERTY(vertex, point);
BOOST_INSTALL_PROPERTY(vertex, external_index);
BOOST_INSTALL_PROPERTY(halfedge, external_index);
BOOST_INSTALL_PROPERTY(edge, external_index);
BOOST_INSTALL_PROPERTY(face, index);
BOOST_INSTALL_PROPERTY(face, external_index);
} // boost
namespace CGAL {
using boost::vertex_point_t;
using boost::vertex_point;
using boost::vertex_external_index_t;
using boost::vertex_external_index;
using boost::halfedge_index_t;
using boost::halfedge_index;
using boost::halfedge_external_index_t;
using boost::halfedge_external_index;
using boost::edge_external_index_t;
using boost::edge_external_index;
using boost::face_index_t;
using boost::face_index;
using boost::face_external_index_t;
using boost::face_external_index;
} // CGAL
namespace CGAL{
namespace helpers {
// matches read-write property maps
template <class PolygonMesh, class FaceIndexMap, class Tag>
void init_face_indices(PolygonMesh& pm,
FaceIndexMap& fid,
boost::read_write_property_map_tag,
Tag)
{
typename boost::property_traits<FaceIndexMap>::value_type i = 0;
BOOST_FOREACH(typename boost::graph_traits<PolygonMesh>::face_descriptor fd,
faces(pm))
{
put(fid, fd, i);
++i;
}
}
template <class PolygonMesh, class VertexIndexMap, class Tag>
void init_vertex_indices(PolygonMesh& pm,
VertexIndexMap& vid,
boost::read_write_property_map_tag,
Tag)
{
typename boost::property_traits<VertexIndexMap>::value_type i = 0;
BOOST_FOREACH(typename boost::graph_traits<PolygonMesh>::vertex_descriptor vd,
vertices(pm))
{
put(vid, vd, i);
++i;
}
}
template <class PolygonMesh, class HalfedgeIndexMap, class Tag>
void init_halfedge_indices(PolygonMesh& pm,
HalfedgeIndexMap& hid,
boost::read_write_property_map_tag,
Tag)
{
typename boost::property_traits<HalfedgeIndexMap>::value_type i = 0;
BOOST_FOREACH(typename boost::graph_traits<PolygonMesh>::halfedge_descriptor hd,
halfedges(pm))
{
put(hid, hd, i);
++i;
}
}
// matches mutable Lvalue property maps
template <class PolygonMesh, class FaceIndexMap>
void init_face_indices(PolygonMesh& pm,
FaceIndexMap& fid,
boost::lvalue_property_map_tag,
boost::false_type)
{
init_face_indices(pm, fid,
boost::read_write_property_map_tag(), boost::false_type());
}
template <class PolygonMesh, class VertexIndexMap>
void init_vertex_indices(PolygonMesh& pm,
VertexIndexMap& vid,
boost::lvalue_property_map_tag,
boost::false_type)
{
init_vertex_indices(pm, vid,
boost::read_write_property_map_tag(), boost::false_type());
}
template <class PolygonMesh, class HalfedgeIndexMap>
void init_halfedge_indices(PolygonMesh& pm,
HalfedgeIndexMap& hid,
boost::lvalue_property_map_tag,
boost::false_type)
{
init_halfedge_indices(pm, hid,
boost::read_write_property_map_tag(), boost::false_type());
}
// matches all other types of property map
template <class PolygonMesh, class FaceIndexMap, class MapTag, class Tag>
void init_face_indices(PolygonMesh&, FaceIndexMap, MapTag, Tag)
{}
template <class PolygonMesh, class VertexIndexMap, class MapTag, class Tag>
void init_vertex_indices(PolygonMesh&, VertexIndexMap, MapTag, Tag)
{}
template <class PolygonMesh, class HalfedgeIndexMap, class MapTag, class Tag>
void init_halfedge_indices(PolygonMesh&, HalfedgeIndexMap, MapTag, Tag)
{}
template <class PolygonMesh, class FaceIndexMap>
void init_face_indices(PolygonMesh& pm, FaceIndexMap fid)
{
init_face_indices(pm, fid,
typename boost::property_traits<FaceIndexMap>::category(),
typename boost::is_const<
typename boost::remove_reference<
typename boost::property_traits<FaceIndexMap>::reference
>::type >::type() );
}
template <class PolygonMesh, class VertexIndexMap>
void init_vertex_indices(PolygonMesh& pm, VertexIndexMap vid)
{
init_vertex_indices(pm, vid,
typename boost::property_traits<VertexIndexMap>::category(),
typename boost::is_const<
typename boost::remove_reference<
typename boost::property_traits<VertexIndexMap>::reference
>::type >::type() );
}
template <class PolygonMesh, class HalfedgeIndexMap>
void init_halfedge_indices(PolygonMesh& pm, HalfedgeIndexMap hid)
{
init_halfedge_indices(pm, hid,
typename boost::property_traits<HalfedgeIndexMap>::category(),
typename boost::is_const<
typename boost::remove_reference<
typename boost::property_traits<HalfedgeIndexMap>::reference
>::type >::type() );
}
} //namespace helpers
} // namespace CGAL
#endif // CGAL_BOOST_GRAPH_BGL_PROPERTIES_H
|