28 #ifndef RTTR_VARIANT_SEQUENTIAL_VIEW_H_
29 #define RTTR_VARIANT_SEQUENTIAL_VIEW_H_
31 #include "rttr/detail/base/core_prerequisites.h"
32 #include "rttr/detail/misc/misc_type_traits.h"
34 #include "rttr/detail/variant_sequential_view/variant_sequential_view_private.h"
95 class RTTR_API variant_sequential_view
105 variant_sequential_view();
110 variant_sequential_view(
const variant_sequential_view& other);
117 ~variant_sequential_view() RTTR_NOEXCEPT;
124 variant_sequential_view& operator=(const variant_sequential_view& other) RTTR_NOEXCEPT;
132 bool is_valid() const RTTR_NOEXCEPT;
141 explicit operator
bool() const RTTR_NOEXCEPT;
146 void swap(variant_sequential_view& other) RTTR_NOEXCEPT;
156 type get_type() const RTTR_NOEXCEPT;
165 type get_value_type() const RTTR_NOEXCEPT;
172 bool is_empty() const RTTR_NOEXCEPT;
183 bool is_dynamic() const RTTR_NOEXCEPT;
196 std::
size_t get_rank() const RTTR_NOEXCEPT;
209 type get_rank_type(std::
size_t index) const RTTR_NOEXCEPT;
216 std::
size_t get_size() const RTTR_NOEXCEPT;
225 bool set_size(std::
size_t size) const RTTR_NOEXCEPT;
232 const_iterator insert(const const_iterator& pos, argument
value);
239 const_iterator erase(const const_iterator& pos);
254 bool set_value(std::
size_t index, argument arg);
266 variant get_value(std::
size_t index) const;
275 const_iterator begin() const;
284 const_iterator end() const;
310 class RTTR_API const_iterator
313 using self_type = const_iterator;
314 using value_type = variant;
324 const_iterator(
const const_iterator& other);
329 const_iterator& operator=(const_iterator other);
340 const variant operator*()
const;
348 const variant get_data()
const;
357 const_iterator &operator++();
363 const_iterator operator++(
int);
372 const_iterator &operator--();
378 const_iterator operator--(
int);
383 const_iterator &operator+=(
int i);
388 const_iterator &operator-=(
int i);
398 const_iterator operator-(
int i)
const;
406 bool operator==(
const const_iterator& other)
const;
414 bool operator!=(
const const_iterator& other)
const;
417 const_iterator(
const detail::variant_sequential_view_private* view) RTTR_NOEXCEPT;
418 void swap(const_iterator& other);
420 friend class variant_sequential_view;
422 const detail::variant_sequential_view_private* m_view;
423 detail::iterator_data m_itr;
426 friend class variant;
427 friend class argument;
429 detail::variant_sequential_view_private m_view;
434 #endif // RTTR_VARIANT_SEQUENTIAL_VIEW_H_