15#ifndef dealii_hp_collection_h
16#define dealii_hp_collection_h
38 "You are trying to compare iterators into different "
39 "hp::Collection objects.");
55 const std::size_t
index)
138 return *(*data)[
index];
177 "You can't decrement an iterator that is already at the beginning of the range."));
198 return static_cast<std::ptrdiff_t
>(
index) -
199 static_cast<ptrdiff_t
>(other.
index);
206 const std::vector<std::shared_ptr<const T>> *
data;
223 template <
typename T>
287 std::vector<std::shared_ptr<const T>>
entries;
295 template <
typename T>
304 template <
typename T>
308 entries.push_back(new_entry);
313 template <
typename T>
317 return entries.size();
322 template <
typename T>
326 return this->size() == 0;
331 template <
typename T>
336 return *entries[index];
341 template <
typename T>
350 template <
typename T>
370 typename std::vector<std::shared_ptr<const T>>::iterator>
std::ptrdiff_t operator-(const CollectionIterator< T > &other) const
bool operator<=(const CollectionIterator< T > &other) const
CollectionIterator< T > operator+(const std::size_t &offset) const
const T & operator*() const
CollectionIterator< T > & operator++()
CollectionIterator< T > & operator+=(const std::size_t offset)
bool operator<(const CollectionIterator< T > &other) const
CollectionIterator(const std::vector< std::shared_ptr< const T > > &data, const std::size_t index)
CollectionIterator(const CollectionIterator< T > &other)=default
CollectionIterator< T > & operator=(const CollectionIterator< T > &other)=default
bool operator==(const CollectionIterator< T > &other) const
bool operator!=(const CollectionIterator< T > &other) const
CollectionIterator< T > & operator--()
bool operator>(const CollectionIterator< T > &other) const
bool operator>=(const CollectionIterator< T > &other) const
const std::vector< std::shared_ptr< const T > > * data
void push_back(const std::shared_ptr< const T > &new_entry)
std::vector< std::shared_ptr< const T > > entries
CollectionIterator< T > begin() const
unsigned int size() const
std::size_t memory_consumption() const
CollectionIterator< T > end() const
const T & operator[](const unsigned int index) const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcDifferentCollection()
#define Assert(cond, exc)
#define AssertIndexRange(index, range)
#define DeclExceptionMsg(Exception, defaulttext)
static ::ExceptionBase & ExcMessage(std::string arg1)
std::enable_if_t< std::is_fundamental_v< T >, std::size_t > memory_consumption(const T &t)