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:
Sébastien Loriot 2013-01-24 12:37:47 +01:00
parent 13a72756b8
commit 9c16cafb80
2 changed files with 45 additions and 52 deletions

View File

@ -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
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
`CombinatorialMap` concept. The
\link CombinatorialMapItems::DartWrapper `Dart_wrapper<CMap>`\endlink
\link CombinatorialMapItems::Dart_wrapper `Dart_wrapper<CMap>`\endlink
class provides two local types:
\link CombinatorialMapItems::DartWrapper::Dart `Dart`\endlink
which must be a model of the `::Dart` concept, and
\link CombinatorialMapItems::DartWrapper::Attributes `Attributes`\endlink
which defines the attributes and their types.
`%Dart` which must be a model of the `::Dart` concept, and
`%Attributes` which defines the attributes and their types.
The
\link CombinatorialMapItems::DartWrapper::Attributes `Attributes`\endlink
tuple must contain at most <I>d</I>+1 types (one for
The `%Attributes` tuple must contain at most <I>d</I>+1 types (one for
each possible cell dimension of the combinatorial map). Each type of
the tuple must be either a model of the `CellAttribute` concept or
`void`. The first type corresponds to 0-attributes, the second to

View File

@ -9,37 +9,6 @@ attributes. For that, it defines an inner class template named
of the `CombinatorialMap` concept. This inner class must define
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>`
\sa `CombinatorialMap`
@ -49,17 +18,10 @@ class CombinatorialMapItems {
public:
/*!
\cgalConcept
*/
template<typename CMap>
struct DartWrapper {
/*!
The type of dart, a model of the `Dart` concept.
*/
typedef Hidden_type Dart;
The class `%Dart_wrapper<CMap>` must provide:
/*!
The tuple of attributes, containing at most
- `%Dart_wrapper<CMap>::%Dart`, the type of dart, a model of the `Dart` concept.
- `%Dart_wrapper<CMap>::%Attributes` The tuple of attributes, containing at most
<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
`CellAttribute` concept or `void`.
@ -71,8 +33,43 @@ public:
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>,
<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 */