My Project
Toggle main menu visibility
Loading...
Searching...
No Matches
factory
fac_iterfor.h
Go to the documentation of this file.
1
/* emacs edit mode for this file is -*- C++ -*- */
2
3
#ifndef INCL_FAC_ITERFOR_H
4
#define INCL_FAC_ITERFOR_H
5
6
// #include "config.h"
7
8
#ifndef NOSTREAMIO
9
#ifdef HAVE_IOSTREAM
10
#include <iostream>
11
#define OSTREAM std::ostream
12
#elif defined(HAVE_IOSTREAM_H)
13
#include <iostream.h>
14
#define OSTREAM ostream
15
#endif
16
#endif
/* NOSTREAMIO */
17
18
class
IteratedFor
19
{
20
private
:
21
int
MAX
;
22
int
FROM
;
23
int
TO
;
24
int
N
;
25
bool
last
;
26
int
*
index
;
27
int
*
imax
;
28
void
fill
(
int
from
,
int
n
);
29
public
:
30
IteratedFor
(
int
from
,
int
to
,
int
max
);
31
IteratedFor
(
const
IteratedFor
& );
32
~IteratedFor
();
33
IteratedFor
&
operator=
(
const
IteratedFor
& );
34
int
from
()
const
{
return
FROM
; }
35
int
to
()
const
{
return
TO
; }
36
int
n
()
const
{
return
N
; };
37
int
max
()
const
{
return
MAX
; }
38
void
nextiteration
();
39
void
operator++
() {
nextiteration
(); }
40
void
operator++
(
int
) {
nextiteration
(); }
41
bool
iterations_left
()
const
{
return
!
last
; }
42
int
operator[]
(
int
)
const
;
43
};
44
45
#ifndef NOSTREAMIO
46
OSTREAM
&
operator<<
(
OSTREAM
&,
const
IteratedFor
& );
47
#endif
/* NOSTREAMIO */
48
49
#endif
/* ! INCL_FAC_ITERFOR_H */
OSTREAM
#define OSTREAM
Definition
canonicalform.h:16
IteratedFor
Definition
fac_iterfor.h:19
IteratedFor::operator[]
int operator[](int) const
IteratedFor::imax
int * imax
Definition
fac_iterfor.h:27
IteratedFor::FROM
int FROM
Definition
fac_iterfor.h:22
IteratedFor::TO
int TO
Definition
fac_iterfor.h:23
IteratedFor::IteratedFor
IteratedFor(int from, int to, int max)
IteratedFor::nextiteration
void nextiteration()
IteratedFor::max
int max() const
Definition
fac_iterfor.h:37
IteratedFor::~IteratedFor
~IteratedFor()
IteratedFor::from
int from() const
Definition
fac_iterfor.h:34
IteratedFor::iterations_left
bool iterations_left() const
Definition
fac_iterfor.h:41
IteratedFor::to
int to() const
Definition
fac_iterfor.h:35
IteratedFor::MAX
int MAX
Definition
fac_iterfor.h:21
IteratedFor::last
bool last
Definition
fac_iterfor.h:25
IteratedFor::operator++
void operator++()
Definition
fac_iterfor.h:39
IteratedFor::N
int N
Definition
fac_iterfor.h:24
IteratedFor::fill
void fill(int from, int n)
IteratedFor::IteratedFor
IteratedFor(const IteratedFor &)
IteratedFor::operator=
IteratedFor & operator=(const IteratedFor &)
IteratedFor::n
int n() const
Definition
fac_iterfor.h:36
IteratedFor::index
int * index
Definition
fac_iterfor.h:26
operator<<
OSTREAM & operator<<(OSTREAM &, const IteratedFor &)
Generated on
for My Project by
doxygen 1.17.0
for
Singular