26 #ifndef _UCOMMON_COUNTER_H_
27 #define _UCOMMON_COUNTER_H_
29 #ifndef _UCOMMON_CONFIG_H_
45 unsigned value, cycle;
83 inline operator unsigned()
90 void operator=(
unsigned value);
111 void *
get(
unsigned idx);
137 inline bool operator*()
140 inline void operator=(
bool v)
143 inline operator bool()
158 inline T *
get(
unsigned idx)
159 {
return static_cast<T *
>(SeqCounter::get(idx));};
175 {
return static_cast<T *
>(SeqCounter::get());};
197 {
return *
get(offset);};
sequence(T *array, unsigned size)
Create a template auto-sequence from a list of typed pointers.
Automatic integer counting class.
toggle toggle_t
A convenience typecast for auto-toggled bools.
void start(JoinableThread *thread, int priority=0)
Convenience function to start a joinable thread.
T & operator[](unsigned offset)
Return a specific typed member from the sequence list.
Various miscellaneous platform specific headers and defines.
void operator=(unsigned value)
Assign the value of the counter.
unsigned operator*()
Reference next counter value through pointer operation.
A template to return a sequence of objects of a specified type.
void operator=(unsigned inc_offset)
Used to directly assign sequence position in template.
unsigned range(void)
Get the range of values before recycling.
counter counter_t
A convenience typecast for integer counters.
Automatically toggle a bool on each reference.
Automatically return a sequence of untyped objects.
T & operator*()
Return next typed member of the sequence by pointer reference.
T &() limit(T &value, T &low, T &high)
Convenience macro to range restrict values.