UCommon
Public Member Functions | Protected Member Functions
ucommon::SeqCounter Class Reference

Automatically return a sequence of untyped objects. More...

#include <counter.h>

Inheritance diagram for ucommon::SeqCounter:
Inheritance graph
[legend]
Collaboration diagram for ucommon::SeqCounter:
Collaboration graph
[legend]

Public Member Functions

void operator= (unsigned inc_offset)
 Used to directly assign sequence position in template. More...
 

Protected Member Functions

void * get (void)
 
void * get (unsigned idx)
 
 SeqCounter (void *start, size_t size, unsigned count)
 
- Protected Member Functions inherited from ucommon::counter
 counter ()
 Initialize integer counter of unknown size.
 
 counter (unsigned limit)
 Initialize integer counter for a range of values. More...
 
unsigned get (void)
 Get the next counter value. More...
 
unsigned operator * ()
 Reference next counter value through pointer operation. More...
 
 operator unsigned ()
 Reference next counter value by casting to integer. More...
 
void operator= (unsigned value)
 Assign the value of the counter. More...
 
unsigned range (void)
 Get the range of values before recycling. More...
 

Detailed Description

Automatically return a sequence of untyped objects.

This is an automatic counter based class which returns the next pointer in an array of pointers and restarts the list when reaching the end. This is used to support the sequence template.

Author
David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org

Definition at line 104 of file counter.h.

Member Function Documentation

◆ operator=()

void ucommon::SeqCounter::operator= ( unsigned  inc_offset)
inline

Used to directly assign sequence position in template.

Parameters
inc_offsetin sequence to reset sequencing to.

Definition at line 122 of file counter.h.

Here is the call graph for this function:

The documentation for this class was generated from the following file: