|
stmm-games-doc
0.32.0
|
Ordered set of a tile's trait values. More...

Public Member Functions | |
| virtual | ~TraitSet () noexcept=default |
| virtual int32_t | getTotValues () const noexcept=0 |
| Get the total number of values in this tile trait indexed set. More... | |
| virtual bool | hasEmptyValue () const noexcept=0 |
| Whether the set contains the empty value. More... | |
| virtual bool | setTileTraitValueByIndex (Tile &oTile, int32_t nIdx) const noexcept=0 |
| Sets the trait of a tile to the value identified by an index. More... | |
| virtual int32_t | getIndexOfTileTraitValue (const Tile &oTile) const noexcept=0 |
| Gets the index of the value of the tile's trait in the set. More... | |
| virtual void | dump (int32_t nIndentSpaces, bool bHeader) const noexcept=0 |
| Dumps the trait set. More... | |
Ordered set of a tile's trait values.
A trait value is of type int32_t, but it can also be 'empty'. The values are ordered and have an index. The index of the empty value, if present, is always -1.
|
virtualdefaultnoexcept |
|
pure virtualnoexcept |
Dumps the trait set.
This only works if NDEBUG macro is not defined.
Implemented in stmg::ColorTraitSet, stmg::ColorPalTraitSet, stmg::ColorIndexTraitSet, stmg::ColorRgbTraitSet, stmg::IntTraitSet, stmg::ColorChannelTraitSet< nChannel >, stmg::ColorChannelTraitSet< 0 >, stmg::ColorChannelTraitSet< 1 >, stmg::ColorChannelTraitSet< 2 >, stmg::NotEmptyIntTraitSet, stmg::CharTraitSet, stmg::AlphaTraitSet, stmg::CharUcs4TraitSet, stmg::FontTraitSet, stmg::GammaTraitSet, stmg::ThetaTraitSet, and stmg::CharIndexTraitSet.
|
pure virtualnoexcept |
Gets the index of the value of the tile's trait in the set.
If the tile's trait is empty and the set contains the empty value index -1 is returned.
| oTile | The tile the trait's value of which the index of is needed. |
Implemented in stmg::ColorTraitSet, stmg::ColorRgbTraitSet, stmg::CharTraitSet, and stmg::IntTraitSet.
|
pure virtualnoexcept |
Get the total number of values in this tile trait indexed set.
The empty value, if present, is also counted.
Implemented in stmg::ColorTraitSet, stmg::ColorRgbTraitSet, stmg::NotEmptyIntTraitSet, stmg::CharTraitSet, stmg::AlphaTraitSet, stmg::FontTraitSet, stmg::GammaTraitSet, stmg::ThetaTraitSet, and stmg::IntTraitSet.
|
pure virtualnoexcept |
Whether the set contains the empty value.
Implemented in stmg::ColorTraitSet, stmg::ColorRgbTraitSet, stmg::NotEmptyIntTraitSet, stmg::CharTraitSet, stmg::AlphaTraitSet, stmg::FontTraitSet, stmg::GammaTraitSet, stmg::ThetaTraitSet, and stmg::IntTraitSet.
|
pure virtualnoexcept |
Sets the trait of a tile to the value identified by an index.
If the set contains the empty value the valid indexes are >=-1 and < (getTotValues()-1).
If the set doesn't contain the empty value the valid indexes are >=0 and < getTotValues().
If the -1 index is passed for a set without empty value, the tile is left untouched and false is returned, otherwise true is returned.
| oTile | The tile to modify. |
| nIdx | The index of the value in the set. |
Implemented in stmg::ColorTraitSet, stmg::ColorRgbTraitSet, stmg::CharTraitSet, and stmg::IntTraitSet.
1.8.13