Commit Graph

48 Commits

Author SHA1 Message Date
Laurent Rineau ed4901c484 simplify the code for MSVC 2019
See the ICE at https://cgal.geometryfactory.com/CGAL/testsuite/CGAL-6.1-Ic-160/Constrained_triangulation_3/TestReport_Christo_MSVC-2019-Community-Release.gz
2025-05-22 18:55:16 +02:00
Laurent Rineau 1ac837d236 fix warnings about uninitialized default-constructed values 2025-05-12 18:51:01 +02:00
Sven Oesau 9ca2a4e631 replace * and -> use of std::optional by .value() 2024-05-14 14:44:09 +02:00
Sven Oesau a873482da8 switching Surface_mesh::property_map to std::optional 2024-05-13 16:03:14 +02:00
Sébastien Loriot 12c80ac512 Merge remote-tracking branch 'cgal/master' into HEAD 2024-03-25 10:21:41 +01:00
Sébastien Loriot e7c26349f2 move header in a package to GPL 2024-01-04 13:36:34 +01:00
Sébastien Loriot a54e024a32 start adding dynamic property maps with default
WIP: need updates in all models of face graph
2023-09-13 17:59:52 +02:00
Sébastien Loriot a04035879d boost::is_const -> std::is_const 2023-04-23 22:37:07 +02:00
Sébastien Loriot fc034c6a5d boost::unit -> std::uint 2023-04-23 18:40:39 +02:00
Mael Rouxel-Labbé 590ddf8015 Various fixes for pmaps:
- Use `value_type` when the returned type is not a reference
- Enforce `reference = value_type` if the returned type is not
  a reference (to avoid `typename PM::reference r = get(m, k)`,
  which will take a ref to a temporary if the `reference`
  typedef is an actualy reference)
- Do not use `put_get_helper` if the property map is not a `lvalue`
  **mutable** property map: the `put()` is `map[k] = v`, which
  is broken if `operator[]` does not return a reference
- The concept `boost::lvalue_property_map_tag` requires `operator[](key)`,
  not a reference in `get(map, key)`. You can have a readable property map
  returning a reference through its `get(map, key)`, but if there is
  no `operator[]`, it's just a `boost::readable_property_map_tag`
- Some const correctness to avoid copying maps with state
  or heavy keys in `get(map, key)` / `put(map, key, value)`
- Base the category of a wrapping pmap on what it offers instead
  of just forwarding the base property map's category
- Tried to do something like mutable lvalue pmap:
  * `value_type& operator[](key&)`
  * `ref get(map, const key&)`
  * `put(map, const key&, const value_type&)`
  and non-mutable lvalue pmap:
  * `const value_type& operator[](const key&)`
  * `ref get(map, const key&)`
  but not everything fits properly...
2021-10-08 15:38:47 +02:00
Mael Rouxel-Labbé df560987a6 Whitespace & cleaning changes 2021-10-08 12:13:43 +02:00
Sébastien Loriot 0779373835 extra run of the script to remove tabs and trailing whitespaces
right after the  merge of 4.14 release branch

+ manual fix on one line in:
    * Arrangement_on_surface_2/include/CGAL/IO/Arr_text_formatter.h
    * .travis/generate_travis.sh
2020-03-26 14:16:06 +01:00
Sébastien Loriot 52164b1fba First pass on removing license notice in header for LGPL files 2019-10-19 15:40:30 +02:00
Sébastien Loriot 7356421d80 introduce Commercial license SPDX tag 2019-10-19 12:15:19 +02:00
Sébastien Loriot 9bd9c68b83 update LGPL[23]+ and GPL[23]+ SPDX tags
ack -l --no-svg "SPDX-License-Identifier: GPL-3.0\+" | xargs sed -i "s/SPDX-License-Identifier: GPL-3.0+/SPDX-License-Identifier: GPL-3.0-or-later/"
ack -l --no-svg "SPDX-License-Identifier: LGPL-3.0\+" | xargs sed -i "s/SPDX-License-Identifier: LGPL-3.0+/SPDX-License-Identifier: LGPL-3.0-or-later/"
ack -l --no-svg "SPDX-License-Identifier: GPL-2.0\+" | xargs sed -i "s/SPDX-License-Identifier: GPL-2.0+/SPDX-License-Identifier: GPL-2.0-or-later/"
ack -l --no-svg "SPDX-License-Identifier: LGPL-2.0\+" | xargs sed -i "s/SPDX-License-Identifier: LGPL-2.0+/SPDX-License-Identifier: LGPL-2.0-or-later/"
2019-10-18 21:57:54 +02:00
Sébastien Loriot 56de16c9c0 workaround (a compiler bug?) 2018-12-07 10:44:25 +01:00
Sébastien Loriot 915c3e7fec use a vector for dynamic properties of const Surface_mesh
also done for OpenMesh types
2018-10-25 17:05:21 +02:00
Sébastien Loriot 72acbee3f5 fix warnings 2018-10-24 11:12:55 +02:00
Sébastien Loriot 82ef11845f fix constness issues 2018-07-18 14:31:14 +02:00
Sébastien Loriot a31753df4a handle const graph for face dynamic tag 2018-07-18 09:12:05 +02:00
Sébastien Loriot 73e3e86980 make the test compiles.
@afabri This shows what I meant in https://github.com/CGAL/cgal/issues/3138
Here the fix is only minimal, but it should be done consistently for all
simplex type of Surface_mesh, and also probably for OpenMesh types
2018-07-06 09:13:02 +02:00
Laurent Rineau c504ea3e9f Fixes
- cleanup
- be careful not to add things to the documentation
2018-03-22 17:23:28 +01:00
Andreas Fabri 8c41669fb7 move properties from Mesh_3 to BGL, Polyhedron_3 and Surface_mesh 2018-03-22 16:37:37 +01:00
Maxime Gimeno c3215b9331 Move graph_has_property from namespace boost to namespace CGAL and provide some doc for it. 2018-01-22 12:43:29 +01:00
Sébastien Loriot 456222aa81 add comment 2017-12-19 14:51:12 +01:00
Sébastien Loriot a9a85b37e6 fix compilation issues and warnings 2017-12-19 14:43:30 +01:00
Andreas Fabri ee8c0fad5d Changes after @sloriot's review 2017-12-14 10:49:02 +00:00
Laurent Rineau 7df26c594b
Merge branch 'master' into BGL-generic_property_map-GF 2017-12-14 09:46:01 +01:00
Andreas Fabri 91539a1ae1
Merge branch 'master' into BGL-fix_doc-GF 2017-12-01 12:04:15 +01:00
Andreas Fabri 2806377564 Fix Issue #2629 2017-11-30 18:17:26 +00:00
Andreas Fabri 1f8849dfea Make dynamic property API similar to the non dynamic case 2017-11-29 08:28:16 +00:00
Jane Tournois 2feb79a16b Add example for dynamic_property_map 2017-11-27 16:35:30 +00:00
Sébastien Loriot ff26773f7b remove include directive for checking GPL compliance in LGPL headers 2017-11-12 10:21:35 +01:00
Sébastien Loriot 0698f79aff add SPDX identifier for files under the LGPL-3+ license 2017-11-12 10:17:50 +01:00
Andreas Fabri 70b13af39c Do not pollute the boost namespace 2017-07-12 12:11:34 +02:00
Andreas Fabri 886bd840cf Make the dynamic property map an implementation detail 2017-07-11 20:32:23 +02:00
Andreas Fabri c35a018135 Move add and remove of property maps in namespace internal (realizing that it is wrong to claim that it works for any FaceGraph 2017-07-11 20:31:34 +02:00
Andreas Fabri be45f81fc8 Add support for halfedges 2017-07-11 20:31:27 +02:00
Andreas Fabri 5e5a3d9e97 Add generic property map for Polyhedron_3 2017-07-11 20:31:27 +02:00
Andreas Fabri 4ff981de70 Add generic vertex/edge/face propertymap for Surface_mesh and OpenMesh 2017-07-11 20:31:27 +02:00
Maxime Gimeno 1330777a31 Make property maps for PMP and Surface_mesh generic
Conflicts:
	Polyhedron/demo/Polyhedron/Plugins/PMP/Detect_sharp_edges_plugin.cpp
	Polyhedron/demo/Polyhedron/Scene_surface_mesh_item.h
2017-05-29 13:22:37 +02:00
Maxime Gimeno 880b6e21a2 Fixes and Clean-up.
- Move the new properties in a file in PMP and remove them from the namespace boost.
- Move the surface mesh properties from properties_Surface_mesh.h to Scene_surface_mesh_item.h
2017-05-29 13:20:39 +02:00
Maxime Gimeno 278c5b6154 Fix missing typename and template 2017-05-29 13:20:39 +02:00
Andreas Fabri b5212bd83b Make surface mesh simplification plugin work for Surface_mesh 2017-05-29 13:20:38 +02:00
Laurent Rineau 7b2a150e84 Fix <CGAL/Surface_mesh/Properties.h> and its uses
The PR #1791 introduced `CGAL::Point_set_3`, and factorized the
`Property_map` implementation of `Surface_mesh` into a new class
template `CGAL::Properties::Property_map<Key, T>`.

The backward compatibility was supposed to be ensured by the fact that
`Surface_mesh<Point>::Property_map<Key,T>` had
`Properties::Property_map<Key, T>` as base class. But that compatibility
was only partial, and there could be ambiguities in the calls to `get`
and `put` with those property maps.

This commit/PR renamed `Properties::Property_map` to
`Properties::Property_map_base`, and added a third parameter, used as
the `Derived` class in the CRTP used by `boost::put_get_helper`. That
way, the `get` and `put` functions are defined directory on the real
class `Surface_mesh::Property_map<Key, T>` and not on its base class.

The same has been modified in `CGAL::Point_set_3`.

That makes the use of `Property_base_base` and `Property_container` a
little trickier, but that removes several ugly non-portable hacks, like
the `reinterpret_cast` that were used to convert a pointer to base class
of the pmap to the pointer the real pmap. Now that is a lot cleaner.

I have verified that the documentation is not modified. Actually, the
PR #1791 did modify the documentation of `Surface_mesh` (see the member
method `add_property_map` for example), and this PR fixes the situation:
the documentation of `Surface_mesh` is put back to the version in
CGAL-4.9.
2017-02-08 14:33:18 +01:00
Sébastien Loriot 50510c05ea add include directive for license of all GPL header files
done using:
ack-grep "^GPL" */package_info/*/license.txt -l | awk -F "/" '{print $1}' > /tmp/gpl_packages
for i in `cat /tmp/gpl_packages | \
          grep -v Operations_on_polyhedra | \
          grep -v Algebraic_kernel_for_circles | \
          grep -v Algebraic_kernel_for_spheres | \
          grep -v Polyhedron_IO`;
do
  echo $i
  python Scripts/developer_scripts/add_license_in_pkg_header.py $i
done
python Scripts/developer_scripts/add_license_in_pkg_header.py Operations_on_polyhedra Polygon_mesh_processing
python Scripts/developer_scripts/add_license_in_pkg_header.py Algebraic_kernel_for_circles Circular_kernel_2
python Scripts/developer_scripts/add_license_in_pkg_header.py Algebraic_kernel_for_spheres Circular_kernel_3
python Scripts/developer_scripts/add_license_in_pkg_header.py Polyhedron_IO Polyhedron
2017-01-19 15:20:25 +01:00
Simon Giraudot a5bb805d31 Propagate namespace change in BGL 2016-10-21 10:28:38 +02:00
Andreas Fabri 40e9c6f735 Move specializations of graph_traits the packages that are concerned 2016-09-30 15:22:29 +02:00