5#include "Stroika/Foundation/Containers//Private/IteratorImplHelper.h"
16 template <
typename T,
typename... INDEXES>
17 class DenseDataHyperRectangle_Vector<T, INDEXES...>::Rep_ :
public DenseDataHyperRectangle<T, INDEXES...>::_IRep,
18 public Memory::UseBlockAllocationIfAppropriate<Rep_> {
20 using inherited =
typename DenseDataHyperRectangle<T,
INDEXES...>::_IRep;
28 Rep_ (
const Rep_&
from) =
default;
31 nonvirtual Rep_& operator= (
const Rep_&) =
delete;
38 return Memory::MakeSharedPtr<Rep_> (*
this);
48 return RESULT_TYPE::GetEmptyIterator ();
50 virtual size_t size ()
const override
53 return fData_.size ();
55 virtual bool empty ()
const override
58 return fData_.empty ();
77 return RESULT_TYPE::GetEmptyIterator ();
81 if (
iLink == fData_.end ()) {
82 return RESULT_TYPE::GetEmptyIterator ();
96 auto r = Memory::MakeSharedPtr<Rep_> (*
this);
99 DISABLE_COMPILER_MSC_WARNING_START (4100)
109 fChangeCounts_.PerformedChange ();
113 DISABLE_COMPILER_MSC_WARNING_END (4100)
116 using DataStructureImplType_ = DataStructures::STLContainerWrapper<vector<T>>;
117 using IteratorRep_ = Private::IteratorImplHelper_<T, DataStructureImplType_>;
121 DataStructureImplType_ fData_;
134 AssertRepValidType_ ();
136 template <
typename T,
typename...
INDEXES>
140 AssertRepValidType_ ();
142 template <
typename T,
typename... INDEXES>
143 inline DenseDataHyperRectangle_Vector<T, INDEXES...>&
144 DenseDataHyperRectangle_Vector<T, INDEXES...>::operator= (
const DenseDataHyperRectangle_Vector<T, INDEXES...>& rhs)
146 AssertRepValidType_ ();
147 inherited::operator= (
static_cast<const inherited&
> (rhs));
148 AssertRepValidType_ ();
151 template <
typename T,
typename... INDEXES>
152 inline void DenseDataHyperRectangle_Vector<T, INDEXES...>::AssertRepValidType_ ()
const
155 typename inherited::template _SafeReadRepAccessor<Rep_> tmp{
this};
#define AssertNotImplemented()
#define qStroika_Foundation_Debug_AssertionsChecked
The qStroika_Foundation_Debug_AssertionsChecked flag determines if assertions are checked and validat...
#define qStroika_ATTRIBUTE_NO_UNIQUE_ADDRESS_VCFORCE
[[msvc::no_unique_address]] isn't always broken in MSVC. Annotate with this on things where its not b...
nonvirtual void SetAt(INDEXES... indexes, Common::ArgByValueType< T > v)
DataHyperRectangle(const DataHyperRectangle< T, INDEXES... > &src) noexcept
unique_lock< AssertExternallySynchronizedChecker > WriteContext
Instantiate AssertExternallySynchronizedChecker::WriteContext to designate an area of code where prot...
shared_lock< const AssertExternallySynchronizedChecker > ReadContext
Instantiate AssertExternallySynchronizedChecker::ReadContext to designate an area of code where prote...
nonvirtual Iterator< T > Find(THAT_FUNCTION &&that) const
Run the argument bool-returning function (or lambda) on the elements of the container,...
nonvirtual CONTAINER_OF_T As(CONTAINER_OF_T_CONSTRUCTOR_ARGS... args) const
nonvirtual size_t size() const
Returns the number of items contained.
nonvirtual void Apply(const function< void(ArgByValueType< T > item)> &doToElement) const
Run the argument function (or lambda) on each element of the container.
Iterable(const Iterable &) noexcept=default
Iterable are safely copyable (by value). Since Iterable uses COW, this just copies the underlying poi...
nonvirtual bool empty() const
Returns true iff size() == 0.
nonvirtual Iterator< T > MakeIterator() const
Create an iterator object which can be used to traverse the 'Iterable'.
SequencePolicy
equivalent which of 4 types being used std::execution::sequenced_policy, parallel_policy,...