Lumiera  0.pre.03
»edit your freedom«
NummyGenerator Class Reference

Description

Helper to produce a pre-determined series of objects to populate a LinkedElements list.

Note
just happily heap allocating new instances and handing them out. The LinkedElements list will take ownership of them and care for clean de-allocation.

Definition at line 112 of file linked-elements-test.cpp.

Public Member Functions

 NummyGenerator (uint maxElms)
 
- Public Member Functions inherited from IterSource< Nummy >
virtual operator string () const
 is ABC More...
 

Private Member Functions

virtual Pos firstResult ()
 iteration start: prepare the first element. More...
 
virtual void nextResult (Pos &num)
 iteration step: switch on to the next element. More...
 

Private Attributes

uint maxNum_
 

Additional Inherited Members

- Public Types inherited from IterSource< Nummy >
using pointer = Nummy *
 
using reference = Nummy &
 
using value_type = Nummy
 
- Static Public Member Functions inherited from IterSource< Nummy >
static iterator build (IterSource &sourceImpl)
 build an iterator frontend for the given source, More...
 
static iterator build (IterSource *sourceImplObject)
 build an iterator frontend, thereby managing the given heap allocated source object instance. More...
 
- Static Public Attributes inherited from IterSource< Nummy >
static iterator EMPTY_SOURCE
 storage for the empty data-source constant
 
- Protected Types inherited from IterSource< Nummy >
typedef shared_ptr< IterSourceDataHandle
 
typedef Nummy * Pos
 
- Protected Member Functions inherited from IterSource< Nummy >
virtual void disconnect ()
 disconnect the data source / iteration frontend. More...
 

Member Function Documentation

◆ firstResult()

virtual Pos firstResult ( )
inlineprivatevirtual

iteration start: prepare the first element.

may return NULL in case of empty data source

Implements IterSource< Nummy >.

Definition at line 118 of file linked-elements-test.cpp.

◆ nextResult()

virtual void nextResult ( Pos &  pos)
inlineprivatevirtual

iteration step: switch on to the next element.

The pos pointer should be set to NULL to report iteration end

Implements IterSource< Nummy >.

Definition at line 124 of file linked-elements-test.cpp.

+ Inheritance diagram for NummyGenerator:
+ Collaboration diagram for NummyGenerator:

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