A template to return a sequence of objects of a specified type.
More...
#include <counter.h>
|
T * | get (void) |
| Return next typed member of the sequence.
|
|
| operator T& () |
| Return next typed member of the sequence by casted reference.
|
|
T & | operator* () |
| Return next typed member of the sequence by pointer reference.
|
|
T & | operator[] (unsigned offset) |
| Return a specific typed member from the sequence list.
|
|
| sequence (T *array, unsigned size) |
| Create a template auto-sequence from a list of typed pointers.
|
|
void | operator= (unsigned inc_offset) |
| Used to directly assign sequence position in template.
|
|
|
T * | get (unsigned idx) |
|
void * | get (unsigned idx) |
|
void * | get (void) |
|
| SeqCounter (void *start, size_t size, unsigned count) |
|
| counter () |
| Initialize integer counter of unknown size.
|
|
| counter (unsigned limit) |
| Initialize integer counter for a range of values.
|
|
unsigned | get (void) |
| Get the next counter value.
|
|
| operator unsigned () |
| Reference next counter value by casting to integer.
|
|
unsigned | operator* () |
| Reference next counter value through pointer operation.
|
|
void | operator= (unsigned value) |
| Assign the value of the counter.
|
|
unsigned | range (void) |
| Get the range of values before recycling.
|
|
template<class T>
class ucommon::sequence< T >
A template to return a sequence of objects of a specified type.
This is used to return a different member in a sequence of objects of a specified type during each reference to the sequencer.
- Author
- David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org
Definition at line 163 of file counter.h.
◆ sequence()
Create a template auto-sequence from a list of typed pointers.
- Parameters
-
array | of typed values to sequence on reference. |
size | of list of typed values. |
Definition at line 176 of file counter.h.
◆ get() [1/2]
◆ get() [2/2]
Return next typed member of the sequence.
- Returns
- next typed member of sequence.
Definition at line 183 of file counter.h.
◆ operator T&()
Return next typed member of the sequence by casted reference.
- Returns
- next typed member of sequence.
Definition at line 199 of file counter.h.
◆ operator*()
Return next typed member of the sequence by pointer reference.
- Returns
- next typed member of sequence.
Definition at line 191 of file counter.h.
◆ operator[]()
Return a specific typed member from the sequence list.
- Parameters
-
offset | of member to return. |
- Returns
- typed value at the specified offset.
Definition at line 208 of file counter.h.
The documentation for this class was generated from the following file:
- /builddir/build/BUILD/ucommon-7.0.0-build/ucommon-7.0.0/inc/ucommon/counter.h