Loading...
Searching...
No Matches
cf_switches.h File Reference

header to cf_switches.cc. More...

Go to the source code of this file.

## Variables

const int | CFSwitchesMax = 15
| const int CFSwitchesMax
EXTERN_INST_VAR CFSwitches | cf_glob_switches
| class CFSwitches

## Detailed Description

header to cf_switches.cc.

Definition in file cf_switches.h.

## Variable Documentation

## cf_glob_switches

EXTERN_INST_VAR CFSwitches cf_glob_switches

class CFSwitches

class CFSwitches - manages boolean switches.

An object of class CFSwitches' is simply an array of booleans with some comfortable access methods (On()', isOn()', etc.). Each object may contain CFSwitchesMax' switches. When a new object of type `CFSwitches' is created, all its switches are turned off.

Note: No range checking is done when accessing switches.

switches: the switches

**/ class CFSwitches { private: bool switches [CFSwitchesMax];

public: constructors, destructors CFSwitches (); ~CFSwitches () {}

selectors / switch 's' on void On ( int s ) { switches[s] = true; } / switch 's' off void Off ( int s ) { switches[s] = false; } / check if 's' is on bool isOn ( int s ) const { return switches[s]; } / check if 's' is off bool isOff ( int s ) const { return ! switches[s]; } }; /** CFSwitches cf_glob_switches;

cf_glob_switches - factory switches.

This is the only object of type CFSwitches in factory. It is used either directly in the low level algorithms or by the functions On(), Off(), isOn() defined in canonicalform.cc.

Definition at line 70 of file cf_switches.h.

## CFSwitchesMax

const int CFSwitchesMax = 15

const int CFSwitchesMax

const CFSwitchesMax - maximum number of switches.

Definition at line 22 of file cf_switches.h.