an array class that accesses elements indirectly via an index array.
It does not store the objects itself, but only indices to objects. This conveniently allows e.g. sorting the array without changing the order of objects (but only the order of their indices).
Definition at line 23 of file IndirectObject.h.
Public Member Functions | |
CIndirectObject () | |
CIndirectObject (int32_t idx) | |
CIndirectObject< T, P > & | operator= (const CIndirectObject< T, P > &x) |
T | operator| (const CIndirectObject< T, P > &x) const |
const T | operator& (const CIndirectObject< T, P > &x) const |
T | operator<< (int shift) |
T | operator>> (int shift) |
T | operator^ (const CIndirectObject< T, P > &x) const |
T | operator+ (const CIndirectObject< T, P > &x) const |
T | operator- (const CIndirectObject< T, P > &x) const |
T | operator/ (const CIndirectObject< T, P > &x) const |
T | operator* (const CIndirectObject< T, P > &x) const |
CIndirectObject< T, P > & | operator+= (const CIndirectObject< T, P > &x) |
CIndirectObject< T, P > & | operator-= (const CIndirectObject< T, P > &x) |
CIndirectObject< T, P > & | operator*= (const CIndirectObject< T, P > &x) |
CIndirectObject< T, P > & | operator/= (const CIndirectObject< T, P > &x) |
bool | operator== (const CIndirectObject< T, P > &x) const |
bool | operator>= (const CIndirectObject< T, P > &x) const |
bool | operator<= (const CIndirectObject< T, P > &x) const |
bool | operator> (const CIndirectObject< T, P > &x) const |
bool | operator< (const CIndirectObject< T, P > &x) const |
bool | operator!= (const CIndirectObject< T, P > &x) const |
CIndirectObject< T, P > & | operator|= (const CIndirectObject< T, P > &x) |
CIndirectObject< T, P > & | operator&= (const CIndirectObject< T, P > &x) |
CIndirectObject< T, P > & | operator^= (const CIndirectObject< T, P > &x) |
CIndirectObject< T, P > & | operator<<= (int shift) |
CIndirectObject< T, P > & | operator>>= (int shift) |
T | operator~ () |
operator T () const | |
CIndirectObject< T, P > & | operator-- () |
CIndirectObject< T, P > & | operator++ () |
Static Public Member Functions | |
static void | set_array (P a) |
static P | get_array () |
static void | init_slice (CIndirectObject< T, P > *a, int32_t len, int32_t start=0, int32_t stop=-1) |
Protected Attributes | |
int32_t | index |
Static Protected Attributes | |
static P | array |
CIndirectObject | ( | ) |
default constructor (initializes index with -1)
Definition at line 29 of file IndirectObject.h.
CIndirectObject | ( | int32_t | idx | ) |
static P get_array | ( | void | ) | [static] |
static void init_slice | ( | CIndirectObject< T, P > * | a, | |
int32_t | len, | |||
int32_t | start = 0 , |
|||
int32_t | stop = -1 | |||
) | [static] |
operator T | ( | ) | const |
return array element
Definition at line 327 of file IndirectObject.h.
bool operator!= | ( | const CIndirectObject< T, P > & | x | ) | const |
overload ! operator; test if current object is not equal to x
x | x |
Definition at line 255 of file IndirectObject.h.
const T operator& | ( | const CIndirectObject< T, P > & | x | ) | const |
overload & operator and return x & y
x | x |
Definition at line 94 of file IndirectObject.h.
CIndirectObject<T,P>& operator&= | ( | const CIndirectObject< T, P > & | x | ) |
overload &= operator
perform bitwise and with current element and x
x | x |
Definition at line 278 of file IndirectObject.h.
T operator* | ( | const CIndirectObject< T, P > & | x | ) | const |
overload * operator and return x * y
x | x |
Definition at line 161 of file IndirectObject.h.
CIndirectObject<T,P>& operator*= | ( | const CIndirectObject< T, P > & | x | ) |
overload *= operator; multiple x to with current element
x | x |
Definition at line 190 of file IndirectObject.h.
T operator+ | ( | const CIndirectObject< T, P > & | x | ) | const |
overload + operator and return x + y
x | x |
Definition at line 134 of file IndirectObject.h.
CIndirectObject<T,P>& operator++ | ( | ) |
increment element by one
Definition at line 337 of file IndirectObject.h.
CIndirectObject<T,P>& operator+= | ( | const CIndirectObject< T, P > & | x | ) |
overload += operator; add x to current element
x | x |
Definition at line 170 of file IndirectObject.h.
T operator- | ( | const CIndirectObject< T, P > & | x | ) | const |
overload - operator and return x - y
x | x |
Definition at line 143 of file IndirectObject.h.
CIndirectObject<T,P>& operator-- | ( | ) |
decrement element by one
Definition at line 330 of file IndirectObject.h.
CIndirectObject<T,P>& operator-= | ( | const CIndirectObject< T, P > & | x | ) |
overload -= operator; substract x from current element
x | x |
Definition at line 180 of file IndirectObject.h.
T operator/ | ( | const CIndirectObject< T, P > & | x | ) | const |
overload / operator and return x / y
x | x |
Definition at line 152 of file IndirectObject.h.
CIndirectObject<T,P>& operator/= | ( | const CIndirectObject< T, P > & | x | ) |
overload /= operator; divide current object by x
x | x |
Definition at line 200 of file IndirectObject.h.
bool operator< | ( | const CIndirectObject< T, P > & | x | ) | const |
overload < operator; test if current object is smaller than x
x | x |
Definition at line 246 of file IndirectObject.h.
T operator<< | ( | int | shift | ) |
overload << operator
perform bit shift to the left
shift | shift by this amount |
Definition at line 105 of file IndirectObject.h.
CIndirectObject<T,P>& operator<<= | ( | int | shift | ) |
overload <<= operator
perform bit shift to the left
shift | shift by this amount |
Definition at line 302 of file IndirectObject.h.
bool operator<= | ( | const CIndirectObject< T, P > & | x | ) | const |
overload <= operator; test if current object lower equal x
x | x |
Definition at line 228 of file IndirectObject.h.
CIndirectObject<T,P>& operator= | ( | const CIndirectObject< T, P > & | x | ) |
overload = operator
x | assign elements from x |
Definition at line 75 of file IndirectObject.h.
bool operator== | ( | const CIndirectObject< T, P > & | x | ) | const |
overload == operator; test if current object equals x
x | x |
Definition at line 210 of file IndirectObject.h.
bool operator> | ( | const CIndirectObject< T, P > & | x | ) | const |
overload > operator; test if current object is bigger than x
x | x |
Definition at line 237 of file IndirectObject.h.
bool operator>= | ( | const CIndirectObject< T, P > & | x | ) | const |
overload >= operator; test if current object greater equal x
x | x |
Definition at line 219 of file IndirectObject.h.
T operator>> | ( | int | shift | ) |
overload >> operator
perform bit shift to the right
shift | shift by this amount |
Definition at line 116 of file IndirectObject.h.
CIndirectObject<T,P>& operator>>= | ( | int | shift | ) |
overload >>= operator
perform bit shift to the right
shift | shift by this amount |
Definition at line 314 of file IndirectObject.h.
T operator^ | ( | const CIndirectObject< T, P > & | x | ) | const |
overload ^ operator and return x ^ y
x | x |
Definition at line 125 of file IndirectObject.h.
CIndirectObject<T,P>& operator^= | ( | const CIndirectObject< T, P > & | x | ) |
overload ^= operator
perform bitwise xor with current element and x
x | x |
Definition at line 290 of file IndirectObject.h.
T operator| | ( | const CIndirectObject< T, P > & | x | ) | const |
overload | operator and return x | y
x | x |
Definition at line 85 of file IndirectObject.h.
CIndirectObject<T,P>& operator|= | ( | const CIndirectObject< T, P > & | x | ) |
overload |= operator
perform bitwise or with current element and x
x | x |
Definition at line 266 of file IndirectObject.h.
T operator~ | ( | ) |
negate element
Definition at line 321 of file IndirectObject.h.
static void set_array | ( | P | a | ) | [static] |
P array [static, protected] |
array
Definition at line 345 of file IndirectObject.h.
int32_t index [protected] |
index into array
Definition at line 348 of file IndirectObject.h.