mirror of https://github.com/CGAL/cgal
Reset Properties to initial state in Surface_mesh
This commit is contained in:
parent
a1c8ec9c3f
commit
1c0043f21f
|
|
@ -33,8 +33,6 @@ namespace CGAL {
|
|||
///
|
||||
/// @{
|
||||
|
||||
namespace Properties {
|
||||
|
||||
/// @cond CGAL_DOCUMENT_INTERNALS
|
||||
class Base_property_array
|
||||
{
|
||||
|
|
@ -63,9 +61,6 @@ public:
|
|||
/// Let two elements swap their storage place.
|
||||
virtual void swap(size_t i0, size_t i1) = 0;
|
||||
|
||||
/// Erase range
|
||||
virtual void erase(size_t first, size_t beyond) = 0;
|
||||
|
||||
/// Return a deep copy of self.
|
||||
virtual Base_property_array* clone () const = 0;
|
||||
|
||||
|
|
@ -139,11 +134,6 @@ public: // virtual interface of Base_property_array
|
|||
data_[i1]=d;
|
||||
}
|
||||
|
||||
virtual void erase(size_t first, size_t beyond)
|
||||
{
|
||||
data_.erase (data_.begin() + first, data_.begin() + beyond);
|
||||
}
|
||||
|
||||
virtual Base_property_array* clone() const
|
||||
{
|
||||
Property_array<T>* p = new Property_array<T>(this->name_, this->value_);
|
||||
|
|
@ -153,11 +143,6 @@ public: // virtual interface of Base_property_array
|
|||
|
||||
virtual const std::type_info& type() { return typeid(T); }
|
||||
|
||||
typename vector_type::iterator begin () { return data_.begin (); }
|
||||
typename vector_type::iterator end () { return data_.end (); }
|
||||
typename vector_type::const_iterator begin () const { return data_.begin (); }
|
||||
typename vector_type::const_iterator end () const { return data_.end (); }
|
||||
|
||||
|
||||
public:
|
||||
|
||||
|
|
@ -360,13 +345,6 @@ public:
|
|||
}
|
||||
|
||||
|
||||
// erase elements from each vector
|
||||
void erase (size_t first, size_t beyond)
|
||||
{
|
||||
for (unsigned int i=0; i<parrays_.size(); ++i)
|
||||
parrays_[i]->erase(first, beyond);
|
||||
size_ -= (beyond-first);
|
||||
}
|
||||
// reserve memory for n entries in all arrays
|
||||
void reserve(size_t n) const
|
||||
{
|
||||
|
|
@ -404,6 +382,7 @@ public:
|
|||
parrays_[i]->swap(i0, i1);
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
std::vector<Base_property_array*> parrays_;
|
||||
size_t size_;
|
||||
|
|
@ -436,7 +415,6 @@ public:
|
|||
typedef I key_type;
|
||||
typedef T value_type;
|
||||
typedef boost::lvalue_property_map_tag category;
|
||||
typedef Property_array<T> Array;
|
||||
|
||||
#ifndef DOXYGEN_RUNNING
|
||||
|
||||
|
|
@ -512,6 +490,7 @@ public:
|
|||
}
|
||||
|
||||
//@}
|
||||
private:
|
||||
|
||||
Property_array<T>& array()
|
||||
{
|
||||
|
|
@ -524,13 +503,10 @@ public:
|
|||
CGAL_assertion(parray_ != NULL);
|
||||
return *parray_;
|
||||
}
|
||||
private:
|
||||
|
||||
Property_array<T>* parray_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // DOXYGEN_RUNNING
|
||||
|
||||
///@}
|
||||
|
|
|
|||
Loading…
Reference in New Issue