14 #ifndef __INCLUDED_SCOPIRA_BASEKIT_ISLICE_H__ 15 #define __INCLUDED_SCOPIRA_BASEKIT_ISLICE_H__ 17 #include <scopira/tool/array.h> 64 const T *
const * dm_ptr;
103 size_t size(
void)
const {
return parent_type::size(); }
105 bool empty(
void)
const {
return parent_type::empty(); }
107 void resize(
size_t len) { parent_type::resize(len); }
109 void clear(
void) { parent_type::clear(); }
122 void copy(
const L & rhs);
125 void set_ptr(
size_t idx, T * ref) { parent_type::set(idx, ref); }
130 const T &
operator[](
size_t idx)
const {
return *parent_type::get(idx); }
132 T &
get(
size_t idx) {
return *parent_type::get(idx); }
134 const T &
get(
size_t idx)
const {
return *parent_type::get(idx); }
136 void set(
size_t idx,
const T &val) { *parent_type::get(idx) = val; }
138 template <
class T>
template <
class L>
141 typename L::const_iterator ii;
143 resize( rhs.size() );
144 for (i=0, ii=rhs.begin(); ii != rhs.end(); ++i, ++ii)
bool operator!=(const islice_vec_iterator_g< T > &rhs) const
inequality operator
Definition: islice.h:48
void clear(void)
clear
Definition: islice.h:109
void copy(const L &rhs)
generic copy, uses size() and iterators
Definition: islice.h:139
const T & operator*(void) const
dereference accessor
Definition: islice.h:44
iterator begin(void)
begin-stl like iterator
Definition: islice.h:112
T data_type
the generic data type T
Definition: islice.h:90
void set_ptr(size_t idx, T *ref)
sets the address
Definition: islice.h:125
Definition: archiveflow.h:20
islice_vec_g(size_t len)
size initing ctor
Definition: islice.h:100
const_islice_vec_iterator_g< T > & operator++(void)
increment operator
Definition: islice.h:76
const T & operator[](size_t idx) const
access
Definition: islice.h:130
iterator end(void)
end-stl like iterator
Definition: islice.h:114
void resize(size_t len)
resizer
Definition: islice.h:107
const_iterator begin(void) const
begin-stl like iterator
Definition: islice.h:116
const_islice_vec_iterator_g(const T *const *ptr)
ctor
Definition: islice.h:67
T data_type
the generic data type T
Definition: islice.h:37
islice_vec_iterator_g(T *const *ptr)
ctor
Definition: islice.h:42
bool operator==(const islice_vec_iterator_g< T > &rhs) const
equality operator
Definition: islice.h:46
const_islice_vec_iterator_g< T > const_iterator
the const_interator type
Definition: islice.h:94
islice_vec_iterator_g< T > & operator++(void)
increment operator
Definition: islice.h:51
islice_vec_iterator_g< T > iterator
the interator type
Definition: islice.h:92
size_t size(void) const
size
Definition: islice.h:103
T data_type
the generic data type T
Definition: islice.h:62
const_iterator end(void) const
end-stl like iterator
Definition: islice.h:118
bool empty(void) const
empty?
Definition: islice.h:105
T & operator[](size_t idx)
access
Definition: islice.h:128