My Project
Loading...
Searching...
No Matches
IntGenerator Class Reference

generate integers starting from 0 More...

#include <cf_generator.h>

Public Member Functions

 IntGenerator ()
 
 ~IntGenerator ()
 
bool hasItems () const
 
void reset ()
 
CanonicalForm item () const
 
void next ()
 
void operator++ ()
 
void operator++ (int)
 
CFGeneratorclone () const
 
 IntGenerator ()
 
 ~IntGenerator ()
 
bool hasItems () const
 
void reset ()
 
CanonicalForm item () const
 
void next ()
 
void operator++ ()
 
void operator++ (int)
 
CFGeneratorclone () const
 
 IntGenerator ()
 
 ~IntGenerator ()
 
bool hasItems () const
 
void reset ()
 
CanonicalForm item () const
 
void next ()
 
void operator++ ()
 
void operator++ (int)
 
CFGeneratorclone () const
 
- Public Member Functions inherited from CFGenerator
 CFGenerator ()
 
virtual ~CFGenerator ()
 
 CFGenerator ()
 
virtual ~CFGenerator ()
 
 CFGenerator ()
 
virtual ~CFGenerator ()
 

Private Attributes

int current
 

Detailed Description

generate integers starting from 0

Definition at line 36 of file cf_generator.h.

Constructor & Destructor Documentation

◆ IntGenerator() [1/3]

IntGenerator::IntGenerator ( )
inline

Definition at line 41 of file cf_generator.h.

41: current(0) {}

◆ ~IntGenerator() [1/3]

IntGenerator::~IntGenerator ( )
inline

Definition at line 42 of file cf_generator.h.

42{}

◆ IntGenerator() [2/3]

IntGenerator::IntGenerator ( )
inline

Definition at line 706 of file factory.h.

706: current(0) {}

◆ ~IntGenerator() [2/3]

IntGenerator::~IntGenerator ( )
inline

Definition at line 707 of file factory.h.

707{}

◆ IntGenerator() [3/3]

IntGenerator::IntGenerator ( )
inline

Definition at line 706 of file factory.h.

706: current(0) {}

◆ ~IntGenerator() [3/3]

IntGenerator::~IntGenerator ( )
inline

Definition at line 707 of file factory.h.

707{}

Member Function Documentation

◆ clone() [1/3]

CFGenerator * IntGenerator::clone ( ) const
virtual

Reimplemented from CFGenerator.

Definition at line 30 of file cf_generator.cc.

31{
32 return new IntGenerator();
33}

◆ clone() [2/3]

CFGenerator * IntGenerator::clone ( ) const
virtual

Reimplemented from CFGenerator.

◆ clone() [3/3]

CFGenerator * IntGenerator::clone ( ) const
virtual

Reimplemented from CFGenerator.

◆ hasItems() [1/3]

bool IntGenerator::hasItems ( ) const
virtual

Reimplemented from CFGenerator.

Definition at line 15 of file cf_generator.cc.

16{
17 return 1;
18}

◆ hasItems() [2/3]

bool IntGenerator::hasItems ( ) const
virtual

Reimplemented from CFGenerator.

◆ hasItems() [3/3]

bool IntGenerator::hasItems ( ) const
virtual

Reimplemented from CFGenerator.

◆ item() [1/3]

CanonicalForm IntGenerator::item ( ) const
virtual

Reimplemented from CFGenerator.

Definition at line 20 of file cf_generator.cc.

21{
22 return mapinto (CanonicalForm (current));
23}
CanonicalForm mapinto(const CanonicalForm &f)
Definition factory.h:496

◆ item() [2/3]

CanonicalForm IntGenerator::item ( ) const
virtual

Reimplemented from CFGenerator.

◆ item() [3/3]

CanonicalForm IntGenerator::item ( ) const
virtual

Reimplemented from CFGenerator.

◆ next() [1/3]

void IntGenerator::next ( )
virtual

Reimplemented from CFGenerator.

Definition at line 25 of file cf_generator.cc.

26{
27 current++;
28}

◆ next() [2/3]

void IntGenerator::next ( )
virtual

Reimplemented from CFGenerator.

◆ next() [3/3]

void IntGenerator::next ( )
virtual

Reimplemented from CFGenerator.

◆ operator++() [1/6]

void IntGenerator::operator++ ( )
inline

Definition at line 47 of file cf_generator.h.

47{ next(); }

◆ operator++() [2/6]

void IntGenerator::operator++ ( )
inline

Definition at line 712 of file factory.h.

712{ next(); }

◆ operator++() [3/6]

void IntGenerator::operator++ ( )
inline

Definition at line 712 of file factory.h.

712{ next(); }

◆ operator++() [4/6]

void IntGenerator::operator++ ( int )
inline

Definition at line 48 of file cf_generator.h.

48{ next(); }

◆ operator++() [5/6]

void IntGenerator::operator++ ( int )
inline

Definition at line 713 of file factory.h.

713{ next(); }

◆ operator++() [6/6]

void IntGenerator::operator++ ( int )
inline

Definition at line 713 of file factory.h.

713{ next(); }

◆ reset() [1/3]

void IntGenerator::reset ( )
inlinevirtual

Reimplemented from CFGenerator.

Definition at line 44 of file cf_generator.h.

44{ current = 0; }

◆ reset() [2/3]

void IntGenerator::reset ( )
inlinevirtual

Reimplemented from CFGenerator.

Definition at line 709 of file factory.h.

709{ current = 0; }

◆ reset() [3/3]

void IntGenerator::reset ( )
inlinevirtual

Reimplemented from CFGenerator.

Definition at line 709 of file factory.h.

709{ current = 0; }

Field Documentation

◆ current

int IntGenerator::current
private

Definition at line 39 of file cf_generator.h.


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