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 ();
76 return RESULT_TYPE::GetEmptyIterator ();
80 if (
iLink == fData_.end ()) {
81 return RESULT_TYPE::GetEmptyIterator ();
95 auto r = Memory::MakeSharedPtr<Rep_> (*
this);
98 DISABLE_COMPILER_MSC_WARNING_START (4100)
108 fChangeCounts_.PerformedChange ();
112 DISABLE_COMPILER_MSC_WARNING_END (4100)
115 using DataStructureImplType_ = DataStructures::STLContainerWrapper<vector<T>>;
116 using IteratorRep_ = Private::IteratorImplHelper_<T, DataStructureImplType_>;
120 DataStructureImplType_ fData_;
133 AssertRepValidType_ ();
135 template <
typename T,
typename...
INDEXES>
139 AssertRepValidType_ ();
141 template <
typename T,
typename... INDEXES>
142 inline DenseDataHyperRectangle_Vector<T, INDEXES...>&
143 DenseDataHyperRectangle_Vector<T, INDEXES...>::operator= (
const DenseDataHyperRectangle_Vector<T, INDEXES...>& rhs)
145 AssertRepValidType_ ();
146 inherited::operator= (
static_cast<const inherited&
> (rhs));
147 AssertRepValidType_ ();
150 template <
typename T,
typename... INDEXES>
151 inline void DenseDataHyperRectangle_Vector<T, INDEXES...>::AssertRepValidType_ ()
const
154 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
shared_lock< const AssertExternallySynchronizedMutex > ReadContext
Instantiate AssertExternallySynchronizedMutex::ReadContext to designate an area of code where protect...
unique_lock< AssertExternallySynchronizedMutex > WriteContext
Instantiate AssertExternallySynchronizedMutex::WriteContext to designate an area of code where protec...
nonvirtual void Apply(const function< void(ArgByValueType< T > item)> &doToElement, Execution::SequencePolicy seq=Execution::SequencePolicy::eDEFAULT) const
Run the argument function (or lambda) on each element of the container.
nonvirtual Iterator< T > Find(THAT_FUNCTION &&that, Execution::SequencePolicy seq=Execution::SequencePolicy::eDEFAULT) const
Run the argument bool-returning function (or lambda) on each element 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.
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,...