mirror of https://github.com/CGAL/cgal
Rename storare class (used internally); update copy constructor calls.
This commit is contained in:
parent
1d963f4ce7
commit
b43ba70a5f
|
|
@ -75,7 +75,7 @@ namespace CGAL {
|
||||||
friend class Generalized_map_storage_1;
|
friend class Generalized_map_storage_1;
|
||||||
|
|
||||||
template<unsigned int, unsigned int, class, class, class>
|
template<unsigned int, unsigned int, class, class, class>
|
||||||
friend class Linear_cell_complex_storage_1;
|
friend class CMap_linear_cell_complex_storage_1;
|
||||||
|
|
||||||
template<unsigned int, unsigned int, class, class, class>
|
template<unsigned int, unsigned int, class, class, class>
|
||||||
friend class GMap_linear_cell_complex_storage_1;
|
friend class GMap_linear_cell_complex_storage_1;
|
||||||
|
|
@ -178,7 +178,7 @@ namespace CGAL {
|
||||||
friend class Generalized_map_storage_1;
|
friend class Generalized_map_storage_1;
|
||||||
|
|
||||||
template<unsigned int, unsigned int, class, class, class>
|
template<unsigned int, unsigned int, class, class, class>
|
||||||
friend class Linear_cell_complex_storage_1;
|
friend class CMap_linear_cell_complex_storage_1;
|
||||||
|
|
||||||
template<unsigned int, unsigned int, class, class, class>
|
template<unsigned int, unsigned int, class, class, class>
|
||||||
friend class GMap_linear_cell_complex_storage_1;
|
friend class GMap_linear_cell_complex_storage_1;
|
||||||
|
|
@ -287,7 +287,7 @@ namespace CGAL {
|
||||||
friend class Generalized_map_storage_1;
|
friend class Generalized_map_storage_1;
|
||||||
|
|
||||||
template<unsigned int, unsigned int, class, class, class>
|
template<unsigned int, unsigned int, class, class, class>
|
||||||
friend class Linear_cell_complex_storage_1;
|
friend class CMap_linear_cell_complex_storage_1;
|
||||||
|
|
||||||
template<unsigned int, unsigned int, class, class, class>
|
template<unsigned int, unsigned int, class, class, class>
|
||||||
friend class GMap_linear_cell_complex_storage_1;
|
friend class GMap_linear_cell_complex_storage_1;
|
||||||
|
|
@ -325,7 +325,7 @@ namespace CGAL {
|
||||||
friend class Generalized_map_storage_1;
|
friend class Generalized_map_storage_1;
|
||||||
|
|
||||||
template<unsigned int, unsigned int, class, class, class>
|
template<unsigned int, unsigned int, class, class, class>
|
||||||
friend class Linear_cell_complex_storage_1;
|
friend class CMap_linear_cell_complex_storage_1;
|
||||||
|
|
||||||
template<unsigned int, unsigned int, class, class, class>
|
template<unsigned int, unsigned int, class, class, class>
|
||||||
friend class GMap_linear_cell_complex_storage_1;
|
friend class GMap_linear_cell_complex_storage_1;
|
||||||
|
|
|
||||||
|
|
@ -20,12 +20,15 @@
|
||||||
#ifndef CGAL_COMBINATORIAL_MAP_H
|
#ifndef CGAL_COMBINATORIAL_MAP_H
|
||||||
#define CGAL_COMBINATORIAL_MAP_H 1
|
#define CGAL_COMBINATORIAL_MAP_H 1
|
||||||
|
|
||||||
#include <CGAL/Compact_container.h>
|
|
||||||
#include <CGAL/internal/Combinatorial_map_utility.h>
|
#include <CGAL/internal/Combinatorial_map_utility.h>
|
||||||
#include <CGAL/internal/Combinatorial_map_group_functors.h>
|
#include <CGAL/internal/Combinatorial_map_group_functors.h>
|
||||||
#include <CGAL/internal/Combinatorial_map_copy_functors.h>
|
#include <CGAL/internal/Combinatorial_map_copy_functors.h>
|
||||||
#include <CGAL/internal/Combinatorial_map_sewable.h>
|
#include <CGAL/internal/Combinatorial_map_sewable.h>
|
||||||
|
|
||||||
|
#include <CGAL/Combinatorial_map_storages.h>
|
||||||
#include <CGAL/Combinatorial_map_functors.h>
|
#include <CGAL/Combinatorial_map_functors.h>
|
||||||
|
#include <CGAL/Combinatorial_map_basic_operations.h>
|
||||||
|
#include <CGAL/Combinatorial_map_operations.h>
|
||||||
|
|
||||||
#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE)
|
#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE)
|
||||||
#include <CGAL/Combinatorial_map_min_items.h>
|
#include <CGAL/Combinatorial_map_min_items.h>
|
||||||
|
|
@ -35,16 +38,12 @@
|
||||||
|
|
||||||
#include <CGAL/Dart_const_iterators.h>
|
#include <CGAL/Dart_const_iterators.h>
|
||||||
#include <CGAL/Cell_const_iterators.h>
|
#include <CGAL/Cell_const_iterators.h>
|
||||||
#include <CGAL/Combinatorial_map_basic_operations.h>
|
|
||||||
#include <CGAL/Combinatorial_map_storages.h>
|
|
||||||
#include <CGAL/Combinatorial_map_operations.h>
|
|
||||||
#include <CGAL/Unique_hash_map.h>
|
#include <CGAL/Unique_hash_map.h>
|
||||||
#include <bitset>
|
#include <bitset>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
|
|
||||||
#include <boost/type_traits/is_same.hpp>
|
#include <boost/type_traits/is_same.hpp>
|
||||||
|
|
||||||
#include <CGAL/config.h>
|
#include <CGAL/config.h>
|
||||||
|
|
||||||
#if defined( __INTEL_COMPILER )
|
#if defined( __INTEL_COMPILER )
|
||||||
|
|
@ -326,19 +325,19 @@ namespace CGAL {
|
||||||
{ copy/*<CMap2,Converters>*/(amap, converters); }
|
{ copy/*<CMap2,Converters>*/(amap, converters); }
|
||||||
|
|
||||||
// "Copy constructor" from a map having different type.
|
// "Copy constructor" from a map having different type.
|
||||||
template <typename CMap2, typename Converters, typename Dartinfoconverter>
|
template <typename CMap2, typename Converters, typename DartInfoConverter>
|
||||||
Combinatorial_map_base(const CMap2& amap, Converters& converters,
|
Combinatorial_map_base(const CMap2& amap, Converters& converters,
|
||||||
const Dartinfoconverter& dartinfoconverter)
|
const DartInfoConverter& dartinfoconverter)
|
||||||
{ copy/*<CMap2,Converters, Pointconverter>*/(amap, converters,
|
{ copy/*<CMap2,Converters, PointConverter>*/(amap, converters,
|
||||||
dartinfoconverter); }
|
dartinfoconverter); }
|
||||||
|
|
||||||
// "Copy constructor" from a map having different type.
|
// "Copy constructor" from a map having different type.
|
||||||
template <typename CMap2, typename Converters, typename Dartinfoconverter,
|
template <typename CMap2, typename Converters, typename DartInfoConverter,
|
||||||
typename Pointconverter>
|
typename PointConverter>
|
||||||
Combinatorial_map_base(const CMap2& amap, Converters& converters,
|
Combinatorial_map_base(const CMap2& amap, Converters& converters,
|
||||||
const Dartinfoconverter& dartinfoconverter,
|
const DartInfoConverter& dartinfoconverter,
|
||||||
const Pointconverter& pointconverter)
|
const PointConverter& pointconverter)
|
||||||
{ copy/*<CMap2,Converters, Pointconverter>*/(amap, converters,
|
{ copy/*<CMap2,Converters, PointConverter>*/(amap, converters,
|
||||||
dartinfoconverter,
|
dartinfoconverter,
|
||||||
pointconverter); }
|
pointconverter); }
|
||||||
|
|
||||||
|
|
@ -1347,8 +1346,8 @@ namespace CGAL {
|
||||||
++nb;
|
++nb;
|
||||||
for ( Ite it2(*this, it1, amark); it2.cont(); ++it2 )
|
for ( Ite it2(*this, it1, amark); it2.cont(); ++it2 )
|
||||||
{
|
{
|
||||||
aos << &(**it2) << " - " << std::flush;
|
aos << darts().index(it2) << " - " << std::flush;
|
||||||
mark(*it2, amark);
|
mark(it2, amark);
|
||||||
}
|
}
|
||||||
aos << std::endl;
|
aos << std::endl;
|
||||||
}
|
}
|
||||||
|
|
@ -3530,6 +3529,8 @@ namespace CGAL {
|
||||||
it!=darts().end(); ++it)
|
it!=darts().end(); ++it)
|
||||||
{
|
{
|
||||||
dual[it] = amap.create_dart();
|
dual[it] = amap.create_dart();
|
||||||
|
internal::Copy_dart_info_functor::run(amap, static_cast<Refs&>(*this),
|
||||||
|
it, dual[it]);
|
||||||
if ( it==adart && res==amap.null_handle ) res = dual[it];
|
if ( it==adart && res==amap.null_handle ) res = dual[it];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4861,23 +4862,31 @@ namespace CGAL {
|
||||||
Combinatorial_map() : Base()
|
Combinatorial_map() : Base()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Combinatorial_map(const Self & amap) : Base()
|
Combinatorial_map(const Self & amap) : Base(amap)
|
||||||
{ Base::template copy<Self>(amap); }
|
{}
|
||||||
|
|
||||||
template < class CMap >
|
template < class CMap >
|
||||||
Combinatorial_map(const CMap & amap) : Base()
|
Combinatorial_map(const CMap & amap) : Base(amap)
|
||||||
{ Base::template copy<CMap>(amap); }
|
{}
|
||||||
|
|
||||||
template < class CMap, typename Converters >
|
template < class CMap, typename Converters >
|
||||||
Combinatorial_map(const CMap & amap, const Converters& converters) : Base()
|
Combinatorial_map(const CMap & amap, const Converters& converters) :
|
||||||
{ Base::template copy<CMap, Converters>
|
Base(amap, converters)
|
||||||
(amap, converters); }
|
{}
|
||||||
|
|
||||||
template < class CMap, typename Converters, typename Pointconverter >
|
template < class CMap, typename Converters, typename DartInfoConverter >
|
||||||
Combinatorial_map(const CMap & amap, const Converters& converters,
|
Combinatorial_map(const CMap & amap, const Converters& converters,
|
||||||
const Pointconverter& pointconverter) : Base()
|
const DartInfoConverter& dartinfoconverter) :
|
||||||
{ Base::template copy<CMap, Converters, Pointconverter>
|
Base(amap, converters, dartinfoconverter)
|
||||||
(amap, converters, pointconverter); }
|
{}
|
||||||
|
|
||||||
|
template < class CMap, typename Converters, typename DartInfoConverter,
|
||||||
|
typename PointConverter >
|
||||||
|
Combinatorial_map(const CMap & amap, const Converters& converters,
|
||||||
|
const DartInfoConverter& dartinfoconverter,
|
||||||
|
const PointConverter& pointconverter) :
|
||||||
|
Base(amap, converters, dartinfoconverter, pointconverter)
|
||||||
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@
|
||||||
#define CGAL_COMBINATORIAL_MAP_STORAGES_H 1
|
#define CGAL_COMBINATORIAL_MAP_STORAGES_H 1
|
||||||
|
|
||||||
#include <CGAL/Handle_hash_function.h>
|
#include <CGAL/Handle_hash_function.h>
|
||||||
|
|
||||||
#include <CGAL/Compact_container.h>
|
#include <CGAL/Compact_container.h>
|
||||||
#include <CGAL/Dart.h>
|
#include <CGAL/Dart.h>
|
||||||
#include <bitset>
|
#include <bitset>
|
||||||
|
|
@ -43,19 +42,10 @@ namespace CGAL {
|
||||||
/** @file Combinatorial_map_storages.h
|
/** @file Combinatorial_map_storages.h
|
||||||
* Definition of storages for dD Combinatorial map.
|
* Definition of storages for dD Combinatorial map.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct Index_hash_function {
|
|
||||||
typedef std::size_t result_type;
|
|
||||||
template <class H>
|
|
||||||
std::size_t operator() (const H& h) const {
|
|
||||||
return h;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// Storage of darts with compact container, beta with handles
|
// Storage of darts with compact container, beta with handles
|
||||||
template<unsigned int d_, class Items_, class Alloc_ >
|
template<unsigned int d_, class Items_, class Alloc_ >
|
||||||
class Combinatorial_map_storage_1
|
class Combinatorial_map_storage_1
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef Combinatorial_map_storage_1<d_, Items_, Alloc_> Self;
|
typedef Combinatorial_map_storage_1<d_, Items_, Alloc_> Self;
|
||||||
typedef CGAL::Tag_false Use_index;
|
typedef CGAL::Tag_false Use_index;
|
||||||
|
|
@ -312,7 +302,7 @@ namespace CGAL {
|
||||||
ah->set_dart(adart);
|
ah->set_dart(adart);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(CGAL_CMAP_DART_DEPRECATED)
|
#if !defined(CGAL_CMAP_DART_DEPRECATED) || defined(CGAL_NO_DEPRECATED_CODE)
|
||||||
// Get the information associated with a given dart
|
// Get the information associated with a given dart
|
||||||
Dart_info& info(Dart_handle adart)
|
Dart_info& info(Dart_handle adart)
|
||||||
{ return adart->info(); }
|
{ return adart->info(); }
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ namespace CGAL {
|
||||||
friend class Generalized_map_storage_1;
|
friend class Generalized_map_storage_1;
|
||||||
|
|
||||||
template<unsigned int, unsigned int, class, class, class>
|
template<unsigned int, unsigned int, class, class, class>
|
||||||
friend class Linear_cell_complex_storage_1;
|
friend class CMap_linear_cell_complex_storage_1;
|
||||||
|
|
||||||
template<unsigned int, unsigned int, class, class, class>
|
template<unsigned int, unsigned int, class, class, class>
|
||||||
friend class GMap_linear_cell_complex_storage_1;
|
friend class GMap_linear_cell_complex_storage_1;
|
||||||
|
|
@ -183,7 +183,7 @@ namespace CGAL {
|
||||||
friend class Combinatorial_map_storage_1;
|
friend class Combinatorial_map_storage_1;
|
||||||
|
|
||||||
template<unsigned int, unsigned int, class, class, class>
|
template<unsigned int, unsigned int, class, class, class>
|
||||||
friend class Linear_cell_complex_storage_1;
|
friend class CMap_linear_cell_complex_storage_1;
|
||||||
|
|
||||||
template <class, class, class, class>
|
template <class, class, class, class>
|
||||||
friend class Compact_container;
|
friend class Compact_container;
|
||||||
|
|
@ -282,7 +282,7 @@ namespace CGAL {
|
||||||
friend class Generalized_map_storage_1;
|
friend class Generalized_map_storage_1;
|
||||||
|
|
||||||
template<unsigned int, unsigned int, class, class, class>
|
template<unsigned int, unsigned int, class, class, class>
|
||||||
friend class Linear_cell_complex_storage_1;
|
friend class CMap_linear_cell_complex_storage_1;
|
||||||
|
|
||||||
template<unsigned int, unsigned int, class, class, class>
|
template<unsigned int, unsigned int, class, class, class>
|
||||||
friend class GMap_linear_cell_complex_storage_1;
|
friend class GMap_linear_cell_complex_storage_1;
|
||||||
|
|
|
||||||
|
|
@ -78,8 +78,10 @@ bool test2D()
|
||||||
map.make_edge();
|
map.make_edge();
|
||||||
|
|
||||||
dh = map.make_combinatorial_tetrahedron();
|
dh = map.make_combinatorial_tetrahedron();
|
||||||
cout << "Nombre de brins : " << map.number_of_darts() << endl;
|
cout << "Nb of darts: " << map.number_of_darts() << endl;
|
||||||
map.display_darts(std::cout, true);
|
map.display_darts(std::cout, true);
|
||||||
|
std::cout<<"Faces:"<<std::endl;
|
||||||
|
map.template display_cells<2>(std::cout);
|
||||||
|
|
||||||
cout << "Parcours de CC : ";
|
cout << "Parcours de CC : ";
|
||||||
for ( typename Map::template Dart_of_orbit_range<1,2>::iterator it ( map, dh );
|
for ( typename Map::template Dart_of_orbit_range<1,2>::iterator it ( map, dh );
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue