mirror of https://github.com/CGAL/cgal
inline DartWrapper concept that did not exist in the original documentation
The page CombinatorialMapItems is now similar to the original one.
This commit is contained in:
parent
13a72756b8
commit
9c16cafb80
|
|
@ -639,19 +639,15 @@ for a handle to the <I>i</I>-attributes (and the const version
|
||||||
|
|
||||||
The `CombinatorialMapItems` concept defines dart and attribute types
|
The `CombinatorialMapItems` concept defines dart and attribute types
|
||||||
of a combinatorial map. It contains one inner class named
|
of a combinatorial map. It contains one inner class named
|
||||||
\link CombinatorialMapItems::DartWrapper `Dart_wrapper`\endlink,
|
\link CombinatorialMapItems::Dart_wrapper `Dart_wrapper`\endlink,
|
||||||
having one template parameter, `CMap`, a model of
|
having one template parameter, `CMap`, a model of
|
||||||
`CombinatorialMap` concept. The
|
`CombinatorialMap` concept. The
|
||||||
\link CombinatorialMapItems::DartWrapper `Dart_wrapper<CMap>`\endlink
|
\link CombinatorialMapItems::Dart_wrapper `Dart_wrapper<CMap>`\endlink
|
||||||
class provides two local types:
|
class provides two local types:
|
||||||
\link CombinatorialMapItems::DartWrapper::Dart `Dart`\endlink
|
`%Dart` which must be a model of the `::Dart` concept, and
|
||||||
which must be a model of the `::Dart` concept, and
|
`%Attributes` which defines the attributes and their types.
|
||||||
\link CombinatorialMapItems::DartWrapper::Attributes `Attributes`\endlink
|
|
||||||
which defines the attributes and their types.
|
|
||||||
|
|
||||||
The
|
The `%Attributes` tuple must contain at most <I>d</I>+1 types (one for
|
||||||
\link CombinatorialMapItems::DartWrapper::Attributes `Attributes`\endlink
|
|
||||||
tuple must contain at most <I>d</I>+1 types (one for
|
|
||||||
each possible cell dimension of the combinatorial map). Each type of
|
each possible cell dimension of the combinatorial map). Each type of
|
||||||
the tuple must be either a model of the `CellAttribute` concept or
|
the tuple must be either a model of the `CellAttribute` concept or
|
||||||
`void`. The first type corresponds to 0-attributes, the second to
|
`void`. The first type corresponds to 0-attributes, the second to
|
||||||
|
|
|
||||||
|
|
@ -9,37 +9,6 @@ attributes. For that, it defines an inner class template named
|
||||||
of the `CombinatorialMap` concept. This inner class must define
|
of the `CombinatorialMap` concept. This inner class must define
|
||||||
two types: `Dart` and `Attributes`.
|
two types: `Dart` and `Attributes`.
|
||||||
|
|
||||||
### Example ###
|
|
||||||
|
|
||||||
The following examples show two possible models of the
|
|
||||||
`CombinatorialMapItems` concept: the first one for a 4D
|
|
||||||
combinatorial map without enabled attributes, the second one for a 3D
|
|
||||||
combinatorial map with edge attributes enabled, and associated with a
|
|
||||||
`CGAL::Cell_attribute` containing an `int`.
|
|
||||||
|
|
||||||
\code{.cpp}
|
|
||||||
struct Exemple_Item_4
|
|
||||||
{
|
|
||||||
template < class CMap >
|
|
||||||
struct Dart_wrapper
|
|
||||||
{
|
|
||||||
typedef CGAL::Dart<4, CMap> Dart;
|
|
||||||
typedef CGAL::cpp11::tuple<> Attributes;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Exemple_Item_3
|
|
||||||
{
|
|
||||||
template < class CMap >
|
|
||||||
struct Dart_wrapper
|
|
||||||
{
|
|
||||||
typedef CGAL::Dart<3, CMap> Dart;
|
|
||||||
typedef CGAL::Cell_attribute<CMap, int> Edge_attrib;
|
|
||||||
typedef CGAL::cpp11::tuple<void,Edge_attrib> Attributes;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
\endcode
|
|
||||||
|
|
||||||
\cgalHasModel `CGAL::Combinatorial_map_min_items<d>`
|
\cgalHasModel `CGAL::Combinatorial_map_min_items<d>`
|
||||||
|
|
||||||
\sa `CombinatorialMap`
|
\sa `CombinatorialMap`
|
||||||
|
|
@ -49,17 +18,10 @@ class CombinatorialMapItems {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\cgalConcept
|
The class `%Dart_wrapper<CMap>` must provide:
|
||||||
*/
|
|
||||||
template<typename CMap>
|
|
||||||
struct DartWrapper {
|
|
||||||
/*!
|
|
||||||
The type of dart, a model of the `Dart` concept.
|
|
||||||
*/
|
|
||||||
typedef Hidden_type Dart;
|
|
||||||
|
|
||||||
/*!
|
- `%Dart_wrapper<CMap>::%Dart`, the type of dart, a model of the `Dart` concept.
|
||||||
The tuple of attributes, containing at most
|
- `%Dart_wrapper<CMap>::%Attributes` The tuple of attributes, containing at most
|
||||||
<I>dimension+1</I> types (one for each possible cell of the combinatorial
|
<I>dimension+1</I> types (one for each possible cell of the combinatorial
|
||||||
map). Each type of the tuple must be either a model of the
|
map). Each type of the tuple must be either a model of the
|
||||||
`CellAttribute` concept or `void`.
|
`CellAttribute` concept or `void`.
|
||||||
|
|
@ -71,8 +33,43 @@ public:
|
||||||
with <I>k</I><<I>dimension+1</I>,
|
with <I>k</I><<I>dimension+1</I>,
|
||||||
\f$ \forall\f$<I>i</I>: <I>k</I>\f$ \leq\f$<I>i</I>\f$ \leq\f$<I>dimension</I>,
|
\f$ \forall\f$<I>i</I>: <I>k</I>\f$ \leq\f$<I>i</I>\f$ \leq\f$<I>dimension</I>,
|
||||||
<I>i</I>-attributes are disabled.
|
<I>i</I>-attributes are disabled.
|
||||||
*/
|
|
||||||
typedef Hidden_type Attributes;
|
\note It can be implemented using a nested template class.
|
||||||
|
|
||||||
|
\cgalHeading{Example}
|
||||||
|
|
||||||
|
The following examples show two possible models of the
|
||||||
|
`CombinatorialMapItems` concept: the first one for a 4D
|
||||||
|
combinatorial map without enabled attributes, the second one for a 3D
|
||||||
|
combinatorial map with edge attributes enabled, and associated with a
|
||||||
|
`CGAL::Cell_attribute` containing an `int`.
|
||||||
|
|
||||||
|
\code{.cpp}
|
||||||
|
struct Exemple_Item_4
|
||||||
|
{
|
||||||
|
template < class CMap >
|
||||||
|
struct Dart_wrapper
|
||||||
|
{
|
||||||
|
typedef CGAL::Dart<4, CMap> Dart;
|
||||||
|
typedef CGAL::cpp11::tuple<> Attributes;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
struct Exemple_Item_3
|
||||||
|
{
|
||||||
|
template < class CMap >
|
||||||
|
struct Dart_wrapper
|
||||||
|
{
|
||||||
|
typedef CGAL::Dart<3, CMap> Dart;
|
||||||
|
typedef CGAL::Cell_attribute<CMap, int> Edge_attrib;
|
||||||
|
typedef CGAL::cpp11::tuple<void,Edge_attrib> Attributes;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
*/
|
||||||
|
template <typename CMap>
|
||||||
|
using Dart_wrapper = Hidden_type;
|
||||||
|
|
||||||
}; /* end #CombinatorialMapItems */
|
}; /* end #CombinatorialMapItems */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue