33 #ifndef _NSOUND_CIRCULAR_ITERATORS_H_
34 #define _NSOUND_CIRCULAR_ITERATORS_H_
84 if(
this == &rhs)
return *
this;
135 if(i < 0)
return *
this -= -i;
136 auto pos = std::distance(
data_->begin(),
itor_);
137 pos = (pos + i) %
data_->size();
144 if(i < 0)
return *
this += -i;
145 auto pos = std::distance(
data_->begin(),
itor_);
146 pos -= (i %
data_->size());
147 if(pos < 0) pos +=
data_->size();
164 std::stringstream ss;
167 <<
"Nsound::Buffer::circular_iterator(vector at 0x0"
174 ss << std::dec << pos <<
")";
181 FloatVector::const_iterator
end_;
232 if(
this == &rhs)
return *
this;
283 if(i < 0)
return *
this -= -i;
284 auto pos = std::distance(const_cast<const FloatVector *>(
data_)->begin(),
itor_);
285 pos = (pos + i) %
data_->size();
292 if(i < 0)
return *
this += -i;
293 auto pos = std::distance(const_cast<const FloatVector *>(
data_)->begin(),
itor_);
294 pos -= (i %
data_->size());
295 if(pos < 0) pos +=
data_->size();
312 FloatVector::const_iterator
end_;
const_circular_iterator & operator++()
FloatVector::const_iterator itor_
AudioStream operator-(const AudioStream &lhs, const AudioStream &rhs)
const_circular_iterator operator++(int)
const_circular_iterator & operator=(const const_circular_iterator &rhs)
FloatVector::const_iterator end_
AudioStream operator+(const AudioStream &lhs, const AudioStream &rhs)
const_circular_iterator & operator-=(int32 i)
circular_iterator(const circular_iterator ©)
std::vector< float64 > FloatVector
circular_iterator & operator--()
const_circular_iterator(const const_circular_iterator ©)
float64 __float__() const
A circulator iterator for class Buffer.
FloatVector::value_type & operator*()
circular_iterator operator++(int)
bool operator==(const const_circular_iterator &rhs) const
const_circular_iterator & operator+=(int32 i)
std::string __str__() const
bool operator==(const circular_iterator &rhs) const
FloatVector::const_iterator end_
FloatVector::iterator itor_
circular_iterator(FloatVector &v)
unsigned long long uint64
std::vector< uint32 > Uint32Vector
bool operator!=(const const_circular_iterator &rhs) const
const_circular_iterator & operator--()
const FloatVector::value_type & operator*()
circular_iterator & operator=(const circular_iterator &rhs)
float64 __float__() const
circular_iterator & operator++()
circular_iterator & operator-=(int32 i)
bool operator!=(const circular_iterator &rhs) const
const_circular_iterator(const FloatVector &v)
circular_iterator & operator+=(int32 i)