Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::CA::Binary_DOT_Palette< State > Struct Template Reference

Default binary DOT fill-colour palette. More...

#include <ca-dot.H>

Collaboration diagram for Aleph::CA::Binary_DOT_Palette< State >:
[legend]

Public Member Functions

std::string operator() (const State &value) const
 Map a cell state to a GraphViz colour.
 

Public Attributes

State dead {}
 state considered dead
 
std::string dead_colour = "white"
 fill colour for dead cells
 
std::string alive_colour = "black"
 fill colour for live cells
 

Detailed Description

template<typename State>
struct Aleph::CA::Binary_DOT_Palette< State >

Default binary DOT fill-colour palette.

Template Parameters
Statecell state type.

Definition at line 74 of file ca-dot.H.

Member Function Documentation

◆ operator()()

template<typename State >
std::string Aleph::CA::Binary_DOT_Palette< State >::operator() ( const State &  value) const
inline

Map a cell state to a GraphViz colour.

Parameters
[in]valuecell value.
Returns
DOT colour string.

Definition at line 84 of file ca-dot.H.

References Aleph::CA::Binary_DOT_Palette< State >::alive_colour, Aleph::CA::Binary_DOT_Palette< State >::dead, Aleph::CA::Binary_DOT_Palette< State >::dead_colour, and value.

Member Data Documentation

◆ alive_colour

template<typename State >
std::string Aleph::CA::Binary_DOT_Palette< State >::alive_colour = "black"

fill colour for live cells

Definition at line 78 of file ca-dot.H.

Referenced by Aleph::CA::Binary_DOT_Palette< State >::operator()().

◆ dead

template<typename State >
State Aleph::CA::Binary_DOT_Palette< State >::dead {}

state considered dead

Definition at line 76 of file ca-dot.H.

Referenced by Aleph::CA::Binary_DOT_Palette< State >::operator()().

◆ dead_colour

template<typename State >
std::string Aleph::CA::Binary_DOT_Palette< State >::dead_colour = "white"

fill colour for dead cells

Definition at line 77 of file ca-dot.H.

Referenced by Aleph::CA::Binary_DOT_Palette< State >::operator()().


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