|
stmm-games-doc
0.32.0
|
Integer set that can be empty and can contain the empty value as long as it is representable as an integer. More...

Public Member Functions | |
| bool | hasEmptyValue () const noexcept override |
| Whether the trait set contains the empty value. More... | |
| int32_t | getTotValues () const noexcept override |
| Get the total number of values in this tile trait indexed set. More... | |
| bool | setTileTraitValueByIndex (Tile &oTile, int32_t nIdx) const noexcept override final |
| Sets the trait of a tile to the value identified by an index. More... | |
| int32_t | getIndexOfTileTraitValue (const Tile &oTile) const noexcept override final |
| Gets the index of the value of the tile's trait in the set. More... | |
| void | dump (int32_t nIndentSpaces, bool bHeader) const noexcept override |
| Dumps the trait set. More... | |
Public Member Functions inherited from stmg::TraitSet | |
| virtual | ~TraitSet () noexcept=default |
Protected Member Functions | |
| IntTraitSet () noexcept | |
| Constructs empty trait set. More... | |
| IntTraitSet (int32_t nValue) noexcept | |
| Constructs trait set with one value. More... | |
| IntTraitSet (int32_t nFromValue, int32_t nToValue) noexcept | |
| Constructs trait set with ordered value range. More... | |
| IntTraitSet (int32_t nFromValue, int32_t nToValue, int32_t nStep) noexcept | |
| Constructs trait set with ordered stepped value range. More... | |
| IntTraitSet (const std::vector< int32_t > &aValues) noexcept | |
| Constructs trait set with array of values. More... | |
| IntTraitSet (const IntSet &oIntSet) noexcept | |
| Constructs trait set from an integer set. More... | |
| IntTraitSet (IntSet &&oIntSet) noexcept | |
| Constructs trait set from an integer set. More... | |
| IntTraitSet (const IntTraitSet &oSource) noexcept=default | |
| IntTraitSet (IntTraitSet &&oSource) noexcept=default | |
| IntTraitSet & | operator= (const IntTraitSet &oSource) noexcept=default |
| IntTraitSet & | operator= (IntTraitSet &&oSource) noexcept=default |
| bool | hasValue (int32_t nValue) const noexcept |
| virtual std::pair< bool, int32_t > | getTraitValue (const Tile &oTile) const noexcept=0 |
| Either the value of the tile's trait or empty. More... | |
| virtual void | setTileTraitValue (Tile &oTile, int32_t nValue) const noexcept=0 |
| Sets the tile's trait value. More... | |
| virtual void | resetTileTraitValue (Tile &oTile) const noexcept=0 |
| Sets the tile's trait to empty. More... | |
Integer set that can be empty and can contain the empty value as long as it is representable as an integer.
|
inlineprotectednoexcept |
Constructs empty trait set.
|
inlineexplicitprotectednoexcept |
Constructs trait set with one value.
| nValue | The value. |
|
inlineprotectednoexcept |
Constructs trait set with ordered value range.
Value at index 0 is nFromValue, the last is nToValue. Parameter nFromValue can be > nToValue.
| nFromValue | The start value. |
| nToValue | The end value. |
|
inlineprotectednoexcept |
Constructs trait set with ordered stepped value range.
Value at index 0 is nFromValue, value at index 1 is nFromValue + nStep provided it isn't past nToValue, etc.
| nFromValue | The start value. |
| nToValue | The end value. |
| nStep | The step between generated values. Can be < 0. |
|
inlineexplicitprotectednoexcept |
Constructs trait set with array of values.
| aValues | The values. |
|
inlineexplicitprotectednoexcept |
Constructs trait set from an integer set.
| oIntSet | The set. |
|
inlineexplicitprotectednoexcept |
Constructs trait set from an integer set.
| oIntSet | The set. |
|
protecteddefaultnoexcept |
|
protecteddefaultnoexcept |
|
overridevirtualnoexcept |
Dumps the trait set.
This only works if NDEBUG macro is not defined.
Implements stmg::TraitSet.
Reimplemented in stmg::ColorChannelTraitSet< 0 >, stmg::ColorChannelTraitSet< 1 >, stmg::ColorChannelTraitSet< 2 >, stmg::NotEmptyIntTraitSet, and stmg::ThetaTraitSet.
|
inlinefinaloverridevirtualnoexcept |
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. |
Implements stmg::TraitSet.
|
inlineoverridevirtualnoexcept |
Get the total number of values in this tile trait indexed set.
The empty value, if present, is also counted.
Implements stmg::TraitSet.
Reimplemented in stmg::NotEmptyIntTraitSet, and stmg::ThetaTraitSet.
|
protectedpure virtualnoexcept |
Either the value of the tile's trait or empty.
| oTile | The tile |
Implemented in stmg::ColorPalTraitSet, stmg::ColorIndexTraitSet, stmg::AlphaTraitSet, stmg::FontTraitSet, stmg::GammaTraitSet, stmg::ThetaTraitSet, stmg::CharUcs4TraitSet, stmg::ColorChannelTraitSet< nChannel >, stmg::ColorChannelTraitSet< 0 >, stmg::ColorChannelTraitSet< 1 >, stmg::ColorChannelTraitSet< 2 >, and stmg::CharIndexTraitSet.
|
inlineoverridevirtualnoexcept |
Whether the trait set contains the empty value.
Default implementation returns false. If a subclass of this class can contain the empty value override the function.
Implements stmg::TraitSet.
Reimplemented in stmg::NotEmptyIntTraitSet, and stmg::ThetaTraitSet.
|
inlineprotectednoexcept |
|
protecteddefaultnoexcept |
|
protecteddefaultnoexcept |
|
protectedpure virtualnoexcept |
Sets the tile's trait to empty.
| oTile | The tile to modify. |
Implemented in stmg::NotEmptyIntTraitSet, stmg::AlphaTraitSet, stmg::FontTraitSet, stmg::GammaTraitSet, and stmg::ThetaTraitSet.
|
protectedpure virtualnoexcept |
Sets the tile's trait value.
| oTile | The tile to modify. |
| nValue | The new value. |
Implemented in stmg::ColorPalTraitSet, stmg::ColorIndexTraitSet, stmg::ColorChannelTraitSet< nChannel >, stmg::ColorChannelTraitSet< 0 >, stmg::ColorChannelTraitSet< 1 >, stmg::ColorChannelTraitSet< 2 >, stmg::AlphaTraitSet, stmg::FontTraitSet, stmg::GammaTraitSet, stmg::ThetaTraitSet, stmg::CharUcs4TraitSet, and stmg::CharIndexTraitSet.
|
inlinefinaloverridevirtualnoexcept |
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. |
Implements stmg::TraitSet.
1.8.13