Skip to content

Commit

Permalink
STYLE: Declare VectorDataContainer inheritance from std::vector private
Browse files Browse the repository at this point in the history
Followed ITK commit InsightSoftwareConsortium/ITK@d56e1bc "ENH: wrap new fast marching classes", Gaëtan Lehmann, August 25, 2011.
  • Loading branch information
N-Dekker committed Sep 22, 2023
1 parent 53140c5 commit 03bf078
Showing 1 changed file with 46 additions and 1 deletion.
47 changes: 46 additions & 1 deletion Common/ImageSamplers/itkVectorDataContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ namespace itk
template <typename TElementIdentifier, typename TElement>
class ITK_TEMPLATE_EXPORT VectorDataContainer
: public DataObject
, public std::vector<TElement>
, private std::vector<TElement>
{
public:
/** Standard class typedefs. */
Expand Down Expand Up @@ -143,6 +143,51 @@ class ITK_TEMPLATE_EXPORT VectorDataContainer
return *this;
}

using STLContainerType::begin;
using STLContainerType::end;
using STLContainerType::rbegin;
using STLContainerType::rend;
using STLContainerType::cbegin;
using STLContainerType::cend;
using STLContainerType::crbegin;
using STLContainerType::crend;

using STLContainerType::size;
using STLContainerType::max_size;
using STLContainerType::resize;
using STLContainerType::capacity;
using STLContainerType::empty;
using STLContainerType::reserve;
using STLContainerType::shrink_to_fit;

using STLContainerType::operator[];
using STLContainerType::at;
using STLContainerType::front;
using STLContainerType::back;

using STLContainerType::assign;
using STLContainerType::push_back;
using STLContainerType::pop_back;
using STLContainerType::insert;
using STLContainerType::erase;
using STLContainerType::swap;
using STLContainerType::clear;

using STLContainerType::get_allocator;

using typename STLContainerType::reference;
using typename STLContainerType::const_reference;
using typename STLContainerType::iterator;
using typename STLContainerType::const_iterator;
// already declared before
// using STLContainerType::size_type;
using typename STLContainerType::difference_type;
using typename STLContainerType::value_type;
using typename STLContainerType::allocator_type;
using typename STLContainerType::pointer;
using typename STLContainerType::const_pointer;
using typename STLContainerType::reverse_iterator;
using typename STLContainerType::const_reverse_iterator;

using Iterator = typename VectorContainer<TElementIdentifier, TElement>::Iterator;
using ConstIterator = typename VectorContainer<TElementIdentifier, TElement>::ConstIterator;
Expand Down

0 comments on commit 03bf078

Please sign in to comment.