Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
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 103 of file linked-elements-test.cpp.

Public Member Functions

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

Private Member Functions

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

Private Attributes

uint maxNum_
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ NummyGenerator()

NummyGenerator ( uint  maxElms)
inline

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

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 109 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 115 of file linked-elements-test.cpp.

Member Data Documentation

◆ maxNum_

uint maxNum_
private

Definition at line 106 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: