7 public range < TYPE * >
12 using BASE_RANGE = range < TYPE * >;
21 inline TYPE & operator[](::collection::index i) {
return this->m_begin[i]; }
22 inline const TYPE & operator [](::collection::index i)
const {
return this->m_begin[i]; }
25 row(TYPE * pbegin, TYPE * pend):BASE_RANGE(pbegin, pend) {}
32 virtual public ::base_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >
37 using BASE_ARRAY = ::base_array < TYPE, ARG_TYPE, TYPED, MEMORY, t_etypeContainer >;
38 using row = ::row < TYPE, ARG_TYPE >;
56 ::collection::count set_size(::collection::count w, ::collection::count h)
61 return BASE_ARRAY::set_size(w * h);
65 ::collection::count set_size(::i32_size size)
68 return this->set_size(size.cx, size.cy);
73 ::i32_size size()
const
76 return { m_iWidth, BASE_ARRAY::size() / m_iWidth };
81 row operator [](::collection::index iRowIndex)
84 auto prowdata = this->begin() + m_iWidth * iRowIndex;
86 return { prowdata, prowdata + m_iWidth };
91 const row operator [](::collection::index iRowIndex)
const
94 auto prowdata = this->begin() + m_iWidth * iRowIndex;
96 return { prowdata, prowdata + m_iWidth };
101 TYPE & element_at(::collection::index x, ::collection::index y)
104 return this->m_begin + m_iWidth * y + x;
109 const TYPE & element_at(::collection::index x, ::collection::index y)
const
112 return this->m_begin + m_iWidth * y + x;
117 void set_at(::collection::index x, ::collection::index y, ARG_TYPE t)
120 element_at(x, y) = t;