diff --git a/Combinatorial_map/doc/Combinatorial_map/CGAL/Combinatorial_map_operations.h b/Combinatorial_map/doc/Combinatorial_map/CGAL/Combinatorial_map_operations.h
index e421fcc3403..4944c660254 100644
--- a/Combinatorial_map/doc/Combinatorial_map/CGAL/Combinatorial_map_operations.h
+++ b/Combinatorial_map/doc/Combinatorial_map/CGAL/Combinatorial_map_operations.h
@@ -11,9 +11,7 @@ Returns a handle on one dart belonging to the new 0-cell.
See example in \cgalFigureRef{figinsertvertex}.
If 1-attributes are non `void`,
-\ref CellAttribute::On_split "Attribute_type<1>::type::On_split"(a,a') is called,
-with a the original 1-attribute associated
-with dh and a' the new 1-attribute created during the operation.
+\ref CellAttribute::On_split "Attribute_type<1>::type::On_split"(a,a') is called, with a the original 1-attribute associated with dh and a' the new 1-attribute created during the operation. If set, the dynamic onsplit function of 1-attributes is also called on a and a'.
\sa `CGAL::insert_cell_0_in_cell_2`
\sa `CGAL::insert_cell_1_in_cell_2`
@@ -42,9 +40,7 @@ Returns a handle on one dart belonging to the new 0-cell.
See example in \cgalFigureRef{figtriangulate}.
If 2-attributes are non `void`,
-\ref CellAttribute::On_split "Attribute_type<2>::type::On_split"(a,a') is called,
-with a the original 2-attribute associated
-with `dh` and a' each new 2-attribute created during the operation.
+\ref CellAttribute::On_split "Attribute_type<2>::type::On_split"(a,a') is called, with a the original 2-attribute associated with `dh` and a' each new 2-attribute created during the operation. If set, the dynamic onsplit function of 2-attributes is also called on a and a'.
\sa `CGAL::insert_cell_0_in_cell_2`
@@ -72,10 +68,7 @@ Returns \f$ \beta_0\f$(`dh1`), a handle on one dart belonging to the new 1-cell.
See example in \cgalFigureRef{figinsertedge}.
-If 2-attributes are non `void`,
-\ref CellAttribute::On_split "Attribute_type<2>::type::On_split"(a,a') is called,
-with a the original 2-attribute associated
-with `dh` and a' the new 2-attribute created during the operation.
+If 2-attributes are non `void`, \ref CellAttribute::On_split "Attribute_type<2>::type::On_split"(a,a') is called, with a the original 2-attribute associated with `dh` and a' the new 2-attribute created during the operation. If set, the dynamic onsplit function of 2-attributes is also called on a and a'.
\sa `CGAL::is_insertable_cell_1_in_cell_2`
@@ -105,10 +98,7 @@ Returns a handle on one dart belonging to the new 2-cell.
See example in \cgalFigureRef{figinsertface}.
-If 3-attributes are non `void`,
-\ref CellAttribute::On_split "Attribute_type<3>::type::On_split"(a,a') is called,
-with a the original 3-attribute associated
-with `dh` and a' the new 3-attribute created during the operation.
+If 3-attributes are non `void`, \ref CellAttribute::On_split "Attribute_type<3>::type::On_split"(a,a') is called, with a the original 3-attribute associated with `dh` and a' the new 3-attribute created during the operation. If set, the dynamic onsplit function of 3-attributes is also called on a and a'.
\sa `CGAL::is_insertable_cell_2_in_cell_3`
@@ -236,17 +226,9 @@ Returns the number of darts removed from `cm`.
See examples in \cgalFigureRef{figinsertvertex}, \cgalFigureRef{figinsertedge} and \cgalFigureRef{figinsertface}.
-If `i`\f$ <\f$\ref CombinatorialMap::dimension "CMap::dimension", and i+1-attributes are
-non `void`, and if there are two distinct (i+1)-cells around dart
-`dh`, \ref CellAttribute::On_merge "Attribute_type::type::On_merge"(a1,a2) is
-called, with a1 the (i+1)-attribute associated to `dh`,
-and a2 the (i+1)-attribute associated to \f$ \beta_{i+1}\f$(dh).
+If `i`\f$ <\f$\ref CombinatorialMap::dimension "CMap::dimension", and i+1-attributes are non `void`, and if there are two distinct (i+1)-cells around dart `dh`, \ref CellAttribute::On_merge "Attribute_type::type::On_merge"(a1,a2) is called, with a1 the (i+1)-attribute associated to `dh`, and a2 the (i+1)-attribute associated to \f$ \beta_{i+1}\f$(dh). If set, the dynamic onmerge function of i+1-attributes is also called on a1 and a2.
-If a j-cell is disconnected in two j-cells during the
-operation, and if j-attributes are non void,
-\ref CellAttribute::On_split "Attribute_type::type::On_split"(a,a') is called
-with a the original j-attribute and a' the new
-j-attribute created due to the disconnection.
+If a j-cell is disconnected in two j-cells during the operation, and if j-attributes are non void, \ref CellAttribute::On_split "Attribute_type::type::On_split"(a,a') is called with a the original j-attribute and a' the new j-attribute created due to the disconnection. If set, the dynamic onsplit function of j-attributes is also called on a and a'.
\sa `CGAL::is_removable`
\sa `CGAL::insert_cell_0_in_cell_1`
diff --git a/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt b/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt
index 582a5f9176b..3c1fb4b45fc 100644
--- a/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt
+++ b/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt
@@ -726,6 +726,8 @@ before to start the operation (i.e.\ before modifying the combinatorial
map), and `OnSplit` is called when the operation is finished
(i.e.\ after all the modifications were made).
+In addition, there are dynamic onmerge and onsplit functions that can be associated to i-attributes, and modified, thanks to the \link CombinatorialMap::onmerge_function() `onmerge_function()`\endlink and \link CombinatorialMap::onsplit_function() `onsplit_function()`\endlink. When these functions are set, they are also called in addition to the previous mechanism when two attributes are merged or one attribute is split into two (see example in Section \ref sseccombimapdynamicattibute "Use of Dynamic Onmerge and Onsplit Functors").
+
What we said for the dart also holds for the cell attribute. The
combinatorial map can be used with any user defined model of the
`CellAttribute` concept.
@@ -956,7 +958,7 @@ These methods guarantee that given a valid combinatorial map and a
possible operation we obtain a valid combinatorial map as result of
the operation.
-\cgalAdvancedBegin
+\cgalAdvancedBegin
The \ref CombinatorialMap::link_beta "link_beta" and
\ref CombinatorialMap::unlink_beta "unlink_beta" methods only modify
the pointer of two darts: the obtained combinatorial maps may be not
@@ -1405,6 +1407,19 @@ contained in 2-attributes in an `int`). At the end, we obtain five
2-attributes with 7 as value, five 2-attributes with 13 as value, and
four 2-attributes having respectively 2, 2, 5 and 10 as values.
+\subsection sseccombimapdynamicattibute Use of Dynamic Onmerge and Onsplit Functors
+
+In the following example, we show an example of use of dynamic onmerge and onsplit functor. We define our 3D combinatorial map with 2-attributes. Then we create two hexahedra and create all the 2-attributes. We initialize the info of the faces of the first hexahedron to 7 and the info of the faces of the second hexahedron to 13.
+
+Step 3 defines the onsplit and onmerge dynamic functors. We can see here that with this mechanism, functors can store data member. This is the case in the example for Split_functor which stores a reference to the combinatorial map.
+
+The next operations will call these functors when 2-cells are split or merged. The sew<3> operation calls 1 onmerge as two faces are identified; the insert_cell_0_in_cell_2 operation calls 4 onsplit as one face is split in 4.
+
+Lastly we remove the dynamic onmerge functor (step 8). This is done by initializing the fonctor to a default boost::function. After this initialization, no dynamic merge functor is called when two faces are merged.
+
+\cgalExample{Combinatorial_map/map_3_dynamic_onmerge.cpp}
+
+
\section sec_definition Mathematical Definitions
The initial definition of combinatorial map in any dimension is given
diff --git a/Combinatorial_map/doc/Combinatorial_map/Concepts/CombinatorialMap.h b/Combinatorial_map/doc/Combinatorial_map/Concepts/CombinatorialMap.h
index 92d535099da..1ab4525467e 100644
--- a/Combinatorial_map/doc/Combinatorial_map/Concepts/CombinatorialMap.h
+++ b/Combinatorial_map/doc/Combinatorial_map/Concepts/CombinatorialMap.h
@@ -544,6 +544,7 @@ void swap(CombinatorialMap& cmap);
/// \name Operations
/// @{
+
/*!
i-sew darts `*dh1` and `*dh2`, by keeping the combinatorial map valid.
Links by \f$ \beta_i\f$
@@ -566,7 +567,7 @@ NULL and the other not, the non NULL attribute is associated to all
the darts of the resulting cell. When the two attributes are non
NULL, functor \ref CellAttribute::On_merge "Attribute_type::type::On_merge"
is called on
-the two attributes attr1 and attr2. Then, the attribute
+the two attributes attr1 and attr2. If set, the dynamic onmerge function of i-attributes is also called on attr1 and attr2. Then, the attribute
attr1 is associated to all darts of the resulting
j-cell. Finally, attribute attr2 is removed from the combinatorial map.
\pre \ref CombinatorialMap::is_sewable "is_sewable(dh1,dh2)".
@@ -593,7 +594,7 @@ this attribute is duplicated into attr2, and all the darts
belonging to c2 are associated with this new attribute. Finally,
the functor \ref CellAttribute::On_split "Attribute_type::type::On_split"
is called on the
-two attributes attr1 and attr2.
+two attributes attr1 and attr2. If set, the dynamic onsplit function of i-attributes is also called on attr1 and attr2.
\pre 0\f$ \leq\f$i\f$ \leq\f$\ref CombinatorialMap::dimension "dimension",
`*dh`\f$ \in\f$`darts()` and `*dh` is not i-free.
@@ -630,6 +631,49 @@ template void unlink_beta(Dart_handle dh);
/// @}
+/// \name Dynamic Onmerge/Onsplit functors
+/// @{
+
+/*!
+ Return the current dynamic onsplit function associated with i-attributes.
+ This is a boost:function returning void and having two references to \link CombinatorialMap::Attribute_type `Attribute_type::type`\endlink as parameters.
+ The onsplit function is returned by reference so that we can modify it.
+*/
+ template
+ boost::function::type&,
+ typename Attribute_type< i >::type&)>&
+ onsplit_function();
+
+/*!
+ Return the current dynamic onsplit function associated with i-attributes, when *this is const.
+ This is a boost:function returning void and having two references to \link CombinatorialMap::Attribute_type `Attribute_type::type`\endlink as parameters.
+*/
+ template
+ const boost::function::type&,
+ typename Attribute_type< i >::type&)>&
+ onsplit_function() const;
+
+/*!
+ Return the current dynamic onmerge function associated with i-attributes.
+ This is a boost:function returning void and having two references to \link CombinatorialMap::Attribute_type `Attribute_type::type`\endlink as parameters.
+ The onmerge function is returned by reference so that we can modify it.
+*/
+ template
+ boost::function::type&,
+ typename Attribute_type< i >::type&)>&
+ onmerge_function();
+
+/*!
+ Return the current dynamic onmerge function associated with i-attributes, when *this is const.
+ This is a boost:function returning void and having two references to \link CombinatorialMap::Attribute_type `Attribute_type::type`\endlink as parameters.
+*/
+ template
+ const boost::function::type&,
+ typename Attribute_type< i >::type&)>&
+ onmerge_function() const;
+
+/// @}
+
/// \name Boolean Marks
/// @{
diff --git a/Combinatorial_map/doc/Combinatorial_map/examples.txt b/Combinatorial_map/doc/Combinatorial_map/examples.txt
index 474577f8557..d7dfdae73c2 100644
--- a/Combinatorial_map/doc/Combinatorial_map/examples.txt
+++ b/Combinatorial_map/doc/Combinatorial_map/examples.txt
@@ -4,4 +4,5 @@
\example Combinatorial_map/map_3_operations.cpp
\example Combinatorial_map/map_4_simple_example.cpp
\example Combinatorial_map/map_3_with_colored_facets.cpp
+\example Combinatorial_map/map_3_dynamic_onmerge.cpp
*/
diff --git a/Combinatorial_map/examples/Combinatorial_map/map_3_dynamic_onmerge.cpp b/Combinatorial_map/examples/Combinatorial_map/map_3_dynamic_onmerge.cpp
new file mode 100644
index 00000000000..39c81efcc23
--- /dev/null
+++ b/Combinatorial_map/examples/Combinatorial_map/map_3_dynamic_onmerge.cpp
@@ -0,0 +1,135 @@
+#include
+#include
+#include
+#include
+#include
+#include
+
+// My item class: no functor is associated with Face_attribute.
+struct Myitem
+{
+ template
+ struct Dart_wrapper
+ {
+ typedef CGAL::Dart<3, CMap> Dart;
+ typedef CGAL::Cell_attribute Face_attribute;
+ typedef CGAL::cpp11::tuple Attributes;
+ };
+};
+
+// Definition of my combinatorial map.
+typedef CGAL::Combinatorial_map<3,Myitem> CMap_3;
+typedef CMap_3::Dart_handle Dart_handle;
+typedef CMap_3::Attribute_type<2>::type Face_attribute;
+
+// Functor called when two faces are merged.
+struct Merge_functor
+{
+ // operator() automatically called before a merge.
+ void operator()(Face_attribute& ca1, Face_attribute& ca2)
+ {
+ ca1.info()=ca1.info()+ca2.info();
+ std::cout<<"After on merge faces: info of face1="<()=boost::function();
+
+ // 9) Remove one edge: this merges two faces, however no dynamic
+ // functor is called (because it was removed).
+ CGAL::remove_cell(cm, resdart);
+
+ // 10) Display all the values of 2-attributes.
+ display_map_and_2attributes(cm);
+
+ return EXIT_SUCCESS;
+}
diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map.h b/Combinatorial_map/include/CGAL/Combinatorial_map.h
index 41ff65f3845..6b221f600c4 100644
--- a/Combinatorial_map/include/CGAL/Combinatorial_map.h
+++ b/Combinatorial_map/include/CGAL/Combinatorial_map.h
@@ -1265,7 +1265,7 @@ namespace CGAL {
{
CGAL_static_assertion_msg(Helper::template Dimension_index::value>=0,
"number_of_attributes but i-attributes are disabled");
- return CGAL::cpp11::get::value>
+ return CGAL::cpp11::get::value>
(mattribute_containers).size();
}
@@ -1316,14 +1316,30 @@ namespace CGAL {
"i-attributes are disabled");
return CGAL::cpp11::get::value>
- (m_onsplit_functors);
+ (m_onsplit_functors);
+ }
+
+ // Get the ith dynamic onsplit functor (by reference so that we can
+ // modify it directly).
+ template
+ const boost::function::type&,
+ typename Attribute_type::type&)>&
+ onsplit_functor() const
+ {
+ CGAL_static_assertion_msg
+ (Helper::template Dimension_index::value>=0,
+ "onsplit_functor but "
+ "i-attributes are disabled");
+
+ return CGAL::cpp11::get::value>
+ (m_onsplit_functors);
}
// Get the ith dynamic onmerge functor (by reference so that we can
// modify it directly).
template
boost::function::type&,
- typename Attribute_type::type&)>&
+ typename Attribute_type::type&)>&
onmerge_functor()
{
CGAL_static_assertion_msg
@@ -1332,9 +1348,23 @@ namespace CGAL {
"i-attributes are disabled");
return CGAL::cpp11::get::value>
- (m_onmerge_functors);
+ (m_onmerge_functors);
}
+ // Get the ith dynamic onmerge functor (by reference so that we can
+ // modify it directly).
+ template
+ const boost::function::type&,
+ typename Attribute_type::type&)>&
+ onmerge_functor() const
+ {
+ CGAL_static_assertion_msg
+ (Helper::template Dimension_index::value>=0,
+ "onsplit_functor but "
+ "i-attributes are disabled");
+ return CGAL::cpp11::get::value>
+ (m_onmerge_functors);
+ }
/** Double link a dart with beta 0 to a second dart.
* \em adart1 is 0-linked to \em adart2 and \em adart2 is 1-linked
diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_functors.h b/Combinatorial_map/include/CGAL/Combinatorial_map_functors.h
index ded6300aa5e..611ca3e7894 100644
--- a/Combinatorial_map/include/CGAL/Combinatorial_map_functors.h
+++ b/Combinatorial_map/include/CGAL/Combinatorial_map_functors.h
@@ -41,6 +41,9 @@
*
* Set_i_attribute_functor to set the i-attribute of a given
* i-cell.
+ *
+ * Test_is_valid_attribute_functor to test if an attribute is valid
+ * (used with Foreach_enabled_attributes)
*/
namespace CGAL
diff --git a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_copy_functors.h b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_copy_functors.h
index 97555704599..9a30f3f4938 100644
--- a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_copy_functors.h
+++ b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_copy_functors.h
@@ -142,7 +142,7 @@ struct Get_convert_attribute_functor
{
static typename Map2::template Attribute_handle::type
run( const Map1* cmap1, Map2* cmap2, typename Map1::Dart_const_handle dh1,
- typename Map2::Dart_handle dh2, const Converters& converters)
+ typename Map2::Dart_handle dh2, const Converters& /*converters*/)
{
return
CGAL::Default_converter_cmap_attributes()
diff --git a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_internal_functors.h b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_internal_functors.h
index 6f4e5b923f9..1bd03d8f345 100644
--- a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_internal_functors.h
+++ b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_internal_functors.h
@@ -77,64 +77,21 @@ namespace CGAL
// ****************************************************************************
namespace internal
{
-// Struct to test if the given class has a functor with a map as first
-// parameter.
-template
-struct FuctorWithMap
-{
- template struct TypeCheck;
-
- typedef char Yes;
- struct No{ char c[2]; };
-
- template struct Fct
- {
- // The function we want to test.
- typedef void (T::*fptr)(CMap*, Attribute&, Attribute&);
- };
-
- template
- static Yes
- HasFunctorWithMap(TypeCheck< typename Fct::fptr, &T::operator() >*);
- template static No HasFunctorWithMap(...);
-
-public:
- static bool const
- value=(sizeof(HasFunctorWithMap(0))==sizeof(Yes));
-};
// ****************************************************************************
// Functor which call Functor::operator() on the two given cell_attributes
-template::value>
+ template
struct Apply_cell_functor
{
- static void run(CMap*, Cell_attribute& acell1, Cell_attribute& acell2)
+ static void run(Cell_attribute& acell1, Cell_attribute& acell2)
{
- Functor() (acell1,acell2);
- }
-};
-template
-struct Apply_cell_functor
-{
- static void run(CMap* amap, Cell_attribute& acell1, Cell_attribute& acell2)
- {
- Functor() (amap, acell1, acell2);
+ Functor() (acell1, acell2);
}
};
//...except for Null_functor.
-template
-struct Apply_cell_functor
-{
- static void run(CMap*, Cell_attribute&, Cell_attribute&)
- {}
-};
-//...even with true.
template
-struct Apply_cell_functor
+struct Apply_cell_functor
{
- static void run(CMap*, Cell_attribute&, Cell_attribute&)
+ static void run(Cell_attribute&, Cell_attribute&)
{}
};
// ****************************************************************************
@@ -155,15 +112,15 @@ struct Call_split_functor
{
// Static version
CGAL::internal::Apply_cell_functor::
- run(amap, *(adart1->template attribute()),
+ run(*(adart1->template attribute()),
*(adart2->template attribute()));
// Dynamic version
if ( CGAL::cpp11::get::value>
(amap->m_onsplit_functors) )
CGAL::cpp11::get::value>
- (amap->m_onsplit_functors)
- (*(adart1->template attribute()),
- *(adart2->template attribute()));
+ (amap->m_onsplit_functors)
+ (*(adart1->template attribute()),
+ *(adart2->template attribute()));
}
static void
run(CMap* amap, typename CMap::template Attribute_handle::type a1,
@@ -171,12 +128,12 @@ struct Call_split_functor
{
// Static version
CGAL::internal::Apply_cell_functor::
- run(amap, *a1, *a2);
+ run(*a1, *a2);
// Dynamic version
if ( CGAL::cpp11::get::value>
(amap->m_onsplit_functors) )
CGAL::cpp11::get::value>
- (amap->m_onsplit_functors)(*a1, *a2);
+ (amap->m_onsplit_functors) (*a1, *a2);
}
};
// Specialization for disabled attributes.
@@ -205,15 +162,15 @@ struct Call_merge_functor
{
// Static version
CGAL::internal::Apply_cell_functor::
- run(amap, *(adart1->template attribute()),
- *(adart2->template attribute()));
+ run(*(adart1->template attribute()),
+ *(adart2->template attribute()));
// Dynamic version
if ( CGAL::cpp11::get::value>
(amap->m_onmerge_functors) )
CGAL::cpp11::get::value>
- (amap->m_onmerge_functors)
- (*(adart1->template attribute()),
- *(adart2->template attribute()));
+ (amap->m_onmerge_functors)
+ (*(adart1->template attribute()),
+ *(adart2->template attribute()));
}
static void
run(CMap* amap, typename CMap::template Attribute_handle::type a1,
@@ -221,12 +178,12 @@ struct Call_merge_functor
{
// Static version
CGAL::internal::Apply_cell_functor::
- run(amap, *a1, *a2);
+ run(*a1, *a2);
// Dynamic version
if ( CGAL::cpp11::get::value>
(amap->m_onmerge_functors) )
CGAL::cpp11::get::value>
- (amap->m_onmerge_functors)(*a1, *a2);
+ (amap->m_onmerge_functors) (*a1, *a2);
}
};
// Specialization for disabled attributes.
diff --git a/Combinatorial_map/test/Combinatorial_map/Combinatorial_map_copy_test.cpp b/Combinatorial_map/test/Combinatorial_map/Combinatorial_map_copy_test.cpp
index b50490b4c57..42fc12b877a 100644
--- a/Combinatorial_map/test/Combinatorial_map/Combinatorial_map_copy_test.cpp
+++ b/Combinatorial_map/test/Combinatorial_map/Combinatorial_map_copy_test.cpp
@@ -8,55 +8,6 @@
using namespace std;
-struct f1
-{
- template
- void operator() (Attr&, Attr&)
- {}
-};
-struct f2
-{
- template
- void operator() (const Attr&, Attr&)
- {}
-};
-struct f3
-{
- template
- void operator() (Attr&, const Attr&)
- {}
-};
-struct f4
-{
- template
- void operator() (const Attr&, const Attr&)
- {}
-};
-struct f5
-{
- template
- void operator() (const Attr&, const Attr&)
- {}
- template
- void operator() (Attr&, const Attr&)
- {}
-};
-struct f6
-{
- template
- void operator() (CMap*, Attr&, Attr&)
- {}
-};
-struct f7
-{
- template
- void operator() (Attr&, const Attr&)
- {}
- template
- void operator() (CMap*, Attr&, Attr&)
- {}
-};
-
struct Map_2_dart_items
{
/// Dart_wrapper defines the type of darts used.
@@ -65,8 +16,8 @@ struct Map_2_dart_items
{
typedef CGAL::Dart< 2, Refs > Dart;
- typedef CGAL::Cell_attribute< Refs, int, CGAL::Tag_true, f1, f2 > Int_attrib;
- typedef CGAL::Cell_attribute< Refs, double, CGAL::Tag_true, f3, f4 > Double_attrib;
+ typedef CGAL::Cell_attribute< Refs, int, CGAL::Tag_true > Int_attrib;
+ typedef CGAL::Cell_attribute< Refs, double, CGAL::Tag_true > Double_attrib;
typedef CGAL::cpp11::tuple Attributes;
};
@@ -80,8 +31,8 @@ struct Map_2_dart_max_items_3
{
typedef CGAL::Dart< 2, Refs > Dart;
- typedef CGAL::Cell_attribute< Refs, int, CGAL::Tag_true, f1, f2 > Int_attrib;
- typedef CGAL::Cell_attribute< Refs, double, CGAL::Tag_true, f3, f4 > Double_attrib;
+ typedef CGAL::Cell_attribute< Refs, int, CGAL::Tag_true > Int_attrib;
+ typedef CGAL::Cell_attribute< Refs, double, CGAL::Tag_true > Double_attrib;
typedef CGAL::cpp11::tuple Attributes;
@@ -96,8 +47,8 @@ struct Map_3_dart_items_3
{
typedef CGAL::Dart< 3, Refs > Dart;
- typedef CGAL::Cell_attribute< Refs, int, CGAL::Tag_true, f5, f6 > Int_attrib;
- typedef CGAL::Cell_attribute< Refs, double, CGAL::Tag_true, f7 > Double_attrib;
+ typedef CGAL::Cell_attribute< Refs, int, CGAL::Tag_true > Int_attrib;
+ typedef CGAL::Cell_attribute< Refs, double, CGAL::Tag_true > Double_attrib;
typedef CGAL::cpp11::tuple Attributes;
@@ -112,8 +63,8 @@ struct Map_3_dart_max_items_3
{
typedef CGAL::Dart< 3, Refs > Dart;
- typedef CGAL::Cell_attribute< Refs, int, CGAL::Tag_true, f5, f6 > Int_attrib;
- typedef CGAL::Cell_attribute< Refs, double, CGAL::Tag_true, f7 > Double_attrib;
+ typedef CGAL::Cell_attribute< Refs, int, CGAL::Tag_true > Int_attrib;
+ typedef CGAL::Cell_attribute< Refs, double, CGAL::Tag_true > Double_attrib;
typedef CGAL::cpp11::tuple Attributes;
diff --git a/Combinatorial_map/test/Combinatorial_map/Combinatorial_map_test.cpp b/Combinatorial_map/test/Combinatorial_map/Combinatorial_map_test.cpp
index 3aa9e8ee734..201be241a8f 100644
--- a/Combinatorial_map/test/Combinatorial_map/Combinatorial_map_test.cpp
+++ b/Combinatorial_map/test/Combinatorial_map/Combinatorial_map_test.cpp
@@ -4,55 +4,6 @@
#include "Combinatorial_map_2_test.h"
#include "Combinatorial_map_3_test.h"
-struct f1
-{
- template
- void operator() (Attr&, Attr&)
- {}
-};
-struct f2
-{
- template
- void operator() (const Attr&, Attr&)
- {}
-};
-struct f3
-{
- template
- void operator() (Attr&, const Attr&)
- {}
-};
-struct f4
-{
- template
- void operator() (const Attr&, const Attr&)
- {}
-};
-struct f5
-{
- template
- void operator() (const Attr&, const Attr&)
- {}
- template
- void operator() (Attr&, const Attr&)
- {}
-};
-struct f6
-{
- template
- void operator() (CMap*, Attr&, Attr&)
- {}
-};
-struct f7
-{
- template
- void operator() (Attr&, const Attr&)
- {}
- template
- void operator() (CMap*, Attr&, Attr&)
- {}
-};
-
struct Map_2_dart_items
{
/// Dart_wrapper defines the type of darts used.
@@ -61,8 +12,8 @@ struct Map_2_dart_items
{
typedef CGAL::Dart< 2, Refs > Dart;
- typedef CGAL::Cell_attribute< Refs, int, CGAL::Tag_true, f1, f2 > Int_attrib;
- typedef CGAL::Cell_attribute< Refs, double, CGAL::Tag_true, f3, f4 > Double_attrib;
+ typedef CGAL::Cell_attribute< Refs, int, CGAL::Tag_true > Int_attrib;
+ typedef CGAL::Cell_attribute< Refs, double, CGAL::Tag_true > Double_attrib;
typedef CGAL::cpp11::tuple Attributes;
};
@@ -76,8 +27,8 @@ struct Map_2_dart_max_items_3
{
typedef CGAL::Dart< 2, Refs > Dart;
- typedef CGAL::Cell_attribute< Refs, int, CGAL::Tag_true, f1, f2 > Int_attrib;
- typedef CGAL::Cell_attribute< Refs, double, CGAL::Tag_true, f3, f4 > Double_attrib;
+ typedef CGAL::Cell_attribute< Refs, int, CGAL::Tag_true > Int_attrib;
+ typedef CGAL::Cell_attribute< Refs, double, CGAL::Tag_true > Double_attrib;
typedef CGAL::cpp11::tuple Attributes;
@@ -92,8 +43,8 @@ struct Map_3_dart_items_3
{
typedef CGAL::Dart< 3, Refs > Dart;
- typedef CGAL::Cell_attribute< Refs, int, CGAL::Tag_true, f5, f6 > Int_attrib;
- typedef CGAL::Cell_attribute< Refs, double, CGAL::Tag_true, f7 > Double_attrib;
+ typedef CGAL::Cell_attribute< Refs, int, CGAL::Tag_true > Int_attrib;
+ typedef CGAL::Cell_attribute< Refs, double, CGAL::Tag_true > Double_attrib;
typedef CGAL::cpp11::tuple Attributes;
@@ -108,8 +59,8 @@ struct Map_3_dart_max_items_3
{
typedef CGAL::Dart< 3, Refs > Dart;
- typedef CGAL::Cell_attribute< Refs, int, CGAL::Tag_true, f5, f6 > Int_attrib;
- typedef CGAL::Cell_attribute< Refs, double, CGAL::Tag_true, f7 > Double_attrib;
+ typedef CGAL::Cell_attribute< Refs, int, CGAL::Tag_true > Int_attrib;
+ typedef CGAL::Cell_attribute< Refs, double, CGAL::Tag_true > Double_attrib;
typedef CGAL::cpp11::tuple Attributes;
diff --git a/Installation/changes.html b/Installation/changes.html
index 691c3803063..1a32c89c109 100755
--- a/Installation/changes.html
+++ b/Installation/changes.html
@@ -166,6 +166,7 @@ David A. Wheeler's 'SLOCCount', restricted to the include/CGAL/
Two bug fixes: do not use the 2 least significant bits for cell attribute without dart support; add share a mark in CMap_cell_iterator.
Add a constructor taking a given combinatorial map as argument, possibly with different dimension and/or different attributes. This allows to transform a combinatorial map.
Add operator= and swap method.
+ Add dynamic onmerge/onsplit functions that can be associated dynamically to i-attributes and which are automatically called when i-cells are split/merged.
2D Apollonius graphs
diff --git a/Linear_cell_complex/include/CGAL/Cell_attribute_with_point.h b/Linear_cell_complex/include/CGAL/Cell_attribute_with_point.h
index 5a32980ae72..f3bfca6d412 100644
--- a/Linear_cell_complex/include/CGAL/Cell_attribute_with_point.h
+++ b/Linear_cell_complex/include/CGAL/Cell_attribute_with_point.h
@@ -145,7 +145,7 @@ namespace CGAL {
{ return !operator==(other); }
template
- bool operator==(const Cellattr& other) const
+ bool operator==(const Cellattr&) const
{ return false; }
// protected:
diff --git a/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_copy_test.cpp b/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_copy_test.cpp
index 4f2bd5f405e..79ff7d91cc4 100644
--- a/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_copy_test.cpp
+++ b/Linear_cell_complex/test/Linear_cell_complex/Linear_cell_complex_copy_test.cpp
@@ -316,7 +316,7 @@ struct DisplayVertexAttrib
template
struct DisplayVertexAttrib