stmm-games-doc  0.32.0
Public Member Functions | Protected Member Functions | List of all members
stmg::NotEmptyIntTraitSet Class Reference

Integer set that cannot be empty and cannot contain the empty value. More...

Inheritance diagram for stmg::NotEmptyIntTraitSet:
Inheritance graph
[legend]

Public Member Functions

 NotEmptyIntTraitSet () noexcept=delete
 
 NotEmptyIntTraitSet (int32_t nValue) noexcept
 
 NotEmptyIntTraitSet (int32_t nFromValue, int32_t nToValue) noexcept
 
 NotEmptyIntTraitSet (int32_t nFromValue, int32_t nToValue, int32_t nStep) noexcept
 
 NotEmptyIntTraitSet (const std::vector< int32_t > &aValues) noexcept
 
 NotEmptyIntTraitSet (const IntSet &oIntSet) noexcept
 
 NotEmptyIntTraitSet (IntSet &&oIntSet) noexcept
 
 NotEmptyIntTraitSet (const NotEmptyIntTraitSet &oSource) noexcept=default
 
 NotEmptyIntTraitSet (NotEmptyIntTraitSet &&oSource) noexcept=default
 
NotEmptyIntTraitSetoperator= (const NotEmptyIntTraitSet &oSource) noexcept=default
 
NotEmptyIntTraitSetoperator= (NotEmptyIntTraitSet &&oSource) noexcept=default
 
bool hasEmptyValue () const noexcept override final
 Whether the trait set contains the empty value. More...
 
int32_t getTotValues () const noexcept override final
 Get the total number of values in this tile trait indexed set. More...
 
void dump (int32_t nIndentSpaces, bool bHeader) const noexcept override
 Dumps the trait set. More...
 
- Public Member Functions inherited from stmg::IntTraitSet
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...
 
- Public Member Functions inherited from stmg::TraitSet
virtual ~TraitSet () noexcept=default
 

Protected Member Functions

void resetTileTraitValue (Tile &) const noexcept override final
 Sets the tile's trait to empty. More...
 
- Protected Member Functions inherited from stmg::IntTraitSet
 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
 
IntTraitSetoperator= (const IntTraitSet &oSource) noexcept=default
 
IntTraitSetoperator= (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...
 

Detailed Description

Integer set that cannot be empty and cannot contain the empty value.

Constructor & Destructor Documentation

◆ NotEmptyIntTraitSet() [1/9]

stmg::NotEmptyIntTraitSet::NotEmptyIntTraitSet ( )
deletenoexcept

◆ NotEmptyIntTraitSet() [2/9]

stmg::NotEmptyIntTraitSet::NotEmptyIntTraitSet ( int32_t  nValue)
inlineexplicitnoexcept

◆ NotEmptyIntTraitSet() [3/9]

stmg::NotEmptyIntTraitSet::NotEmptyIntTraitSet ( int32_t  nFromValue,
int32_t  nToValue 
)
inlinenoexcept

◆ NotEmptyIntTraitSet() [4/9]

stmg::NotEmptyIntTraitSet::NotEmptyIntTraitSet ( int32_t  nFromValue,
int32_t  nToValue,
int32_t  nStep 
)
inlinenoexcept

◆ NotEmptyIntTraitSet() [5/9]

stmg::NotEmptyIntTraitSet::NotEmptyIntTraitSet ( const std::vector< int32_t > &  aValues)
inlineexplicitnoexcept

◆ NotEmptyIntTraitSet() [6/9]

stmg::NotEmptyIntTraitSet::NotEmptyIntTraitSet ( const IntSet oIntSet)
inlineexplicitnoexcept

◆ NotEmptyIntTraitSet() [7/9]

stmg::NotEmptyIntTraitSet::NotEmptyIntTraitSet ( IntSet &&  oIntSet)
inlineexplicitnoexcept

◆ NotEmptyIntTraitSet() [8/9]

stmg::NotEmptyIntTraitSet::NotEmptyIntTraitSet ( const NotEmptyIntTraitSet oSource)
defaultnoexcept

◆ NotEmptyIntTraitSet() [9/9]

stmg::NotEmptyIntTraitSet::NotEmptyIntTraitSet ( NotEmptyIntTraitSet &&  oSource)
defaultnoexcept

Member Function Documentation

◆ dump()

void stmg::NotEmptyIntTraitSet::dump ( int32_t  nIndentSpaces,
bool  bHeader 
) const
overridevirtualnoexcept

Dumps the trait set.

This only works if NDEBUG macro is not defined.

Reimplemented from stmg::IntTraitSet.

Reimplemented in stmg::ColorChannelTraitSet< 0 >, stmg::ColorChannelTraitSet< 1 >, and stmg::ColorChannelTraitSet< 2 >.

◆ getTotValues()

int32_t stmg::NotEmptyIntTraitSet::getTotValues ( ) const
inlinefinaloverridevirtualnoexcept

Get the total number of values in this tile trait indexed set.

The empty value, if present, is also counted.

Returns
The number of values. Is >= 0.

Reimplemented from stmg::IntTraitSet.

◆ hasEmptyValue()

bool stmg::NotEmptyIntTraitSet::hasEmptyValue ( ) const
inlinefinaloverridevirtualnoexcept

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.

Returns
Whether the set contains the empty value.

Reimplemented from stmg::IntTraitSet.

◆ operator=() [1/2]

NotEmptyIntTraitSet& stmg::NotEmptyIntTraitSet::operator= ( const NotEmptyIntTraitSet oSource)
defaultnoexcept

◆ operator=() [2/2]

NotEmptyIntTraitSet& stmg::NotEmptyIntTraitSet::operator= ( NotEmptyIntTraitSet &&  oSource)
defaultnoexcept

◆ resetTileTraitValue()

void stmg::NotEmptyIntTraitSet::resetTileTraitValue ( Tile oTile) const
inlinefinaloverrideprotectedvirtualnoexcept

Sets the tile's trait to empty.

Parameters
oTileThe tile to modify.

Implements stmg::IntTraitSet.