stmm-games-doc  0.32.0
Public Member Functions | Protected Member Functions | List of all members
stmg::ThetaTraitSet Class Referencefinal
Inheritance diagram for stmg::ThetaTraitSet:
Inheritance graph
[legend]

Public Member Functions

 ThetaTraitSet () noexcept
 Constructs set containing the empty value. More...
 
 ThetaTraitSet (int32_t nValue) noexcept
 
 ThetaTraitSet (int32_t nFromValue, int32_t nToValue) noexcept
 
 ThetaTraitSet (int32_t nFromValue, int32_t nToValue, int32_t nStep) noexcept
 
 ThetaTraitSet (const std::vector< int32_t > &aValues) noexcept
 
 ThetaTraitSet (const IntSet &oIntSet, bool bWithEmptyValue) noexcept
 
 ThetaTraitSet (IntSet &&oIntSet, bool bWithEmptyValue) noexcept
 
 ThetaTraitSet (const ThetaTraitSet &oSource) noexcept=default
 
 ThetaTraitSet (ThetaTraitSet &&oSource) noexcept=default
 
ThetaTraitSetoperator= (const ThetaTraitSet &oSource) noexcept=default
 
ThetaTraitSetoperator= (ThetaTraitSet &&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

std::pair< bool, int32_t > getTraitValue (const Tile &oTile) const noexcept override
 Either the value of the tile's trait or empty. More...
 
void setTileTraitValue (Tile &oTile, int32_t nValue) const noexcept override
 Sets the tile's trait value. More...
 
void resetTileTraitValue (Tile &oTile) const noexcept override
 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
 

Constructor & Destructor Documentation

◆ ThetaTraitSet() [1/9]

stmg::ThetaTraitSet::ThetaTraitSet ( )
noexcept

Constructs set containing the empty value.

If you want to construct the empty set use ThetaTraitSet({}) instead.

◆ ThetaTraitSet() [2/9]

stmg::ThetaTraitSet::ThetaTraitSet ( int32_t  nValue)
explicitnoexcept

◆ ThetaTraitSet() [3/9]

stmg::ThetaTraitSet::ThetaTraitSet ( int32_t  nFromValue,
int32_t  nToValue 
)
noexcept

◆ ThetaTraitSet() [4/9]

stmg::ThetaTraitSet::ThetaTraitSet ( int32_t  nFromValue,
int32_t  nToValue,
int32_t  nStep 
)
noexcept

◆ ThetaTraitSet() [5/9]

stmg::ThetaTraitSet::ThetaTraitSet ( const std::vector< int32_t > &  aValues)
explicitnoexcept

◆ ThetaTraitSet() [6/9]

stmg::ThetaTraitSet::ThetaTraitSet ( const IntSet oIntSet,
bool  bWithEmptyValue 
)
noexcept

◆ ThetaTraitSet() [7/9]

stmg::ThetaTraitSet::ThetaTraitSet ( IntSet &&  oIntSet,
bool  bWithEmptyValue 
)
noexcept

◆ ThetaTraitSet() [8/9]

stmg::ThetaTraitSet::ThetaTraitSet ( const ThetaTraitSet oSource)
defaultnoexcept

◆ ThetaTraitSet() [9/9]

stmg::ThetaTraitSet::ThetaTraitSet ( ThetaTraitSet &&  oSource)
defaultnoexcept

Member Function Documentation

◆ dump()

void stmg::ThetaTraitSet::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.

◆ getTotValues()

int32_t stmg::ThetaTraitSet::getTotValues ( ) const
finaloverridevirtualnoexcept

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.

◆ getTraitValue()

std::pair<bool, int32_t> stmg::ThetaTraitSet::getTraitValue ( const Tile oTile) const
overrideprotectedvirtualnoexcept

Either the value of the tile's trait or empty.

Parameters
oTileThe tile
Returns
The pair of bool telling whether value empty and the value if not empty.

Implements stmg::IntTraitSet.

◆ hasEmptyValue()

bool stmg::ThetaTraitSet::hasEmptyValue ( ) const
finaloverridevirtualnoexcept

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]

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

◆ operator=() [2/2]

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

◆ resetTileTraitValue()

void stmg::ThetaTraitSet::resetTileTraitValue ( Tile oTile) const
overrideprotectedvirtualnoexcept

Sets the tile's trait to empty.

Parameters
oTileThe tile to modify.

Implements stmg::IntTraitSet.

◆ setTileTraitValue()

void stmg::ThetaTraitSet::setTileTraitValue ( Tile oTile,
int32_t  nValue 
) const
overrideprotectedvirtualnoexcept

Sets the tile's trait value.

Parameters
oTileThe tile to modify.
nValueThe new value.

Implements stmg::IntTraitSet.