Antiprism 0.23
|
A colour map that maps index numbers to shuffled packs of numbers. More...
#include <col_map.h>
Public Member Functions | |
virtual bool | init (const char *name, char *errmsg=0) |
Initialise from a string. | |
color_map * | clone () const |
Get a copy of the map. | |
virtual int | effective_size () const |
The effective size of the map. | |
virtual col_val | get_col (int idx) const |
Get the colour value for an index number. | |
void | shuffle () |
shuffle the mapping |
A colour map that maps index numbers to shuffled packs of numbers.
color_map* color_map_deal::clone | ( | ) | const [inline, virtual] |
Get a copy of the map.
delete
, 0 indicates that the clone failed. Reimplemented from color_map.
virtual int color_map_deal::effective_size | ( | ) | const [inline, virtual] |
The effective size of the map.
The effective size of a map is one greater than the highest index number in the map. It is the size of the smallest map (sequential, starting at 0) that will include all the entries of the map.
Reimplemented from color_map.
col_val color_map_deal::get_col | ( | int | idx | ) | const [virtual] |
Get the colour value for an index number.
idx | the index. |
Reimplemented from color_map.
bool color_map_deal::init | ( | const char * | name, |
char * | errmsg = 0 |
||
) | [virtual] |
Initialise from a string.
name | the map name. |
errmsg | an array at least MSG_SZ chars long to return any error message. |
Reimplemented from color_map.