stmm-games-doc  0.32.0
Classes | Public Types | Public Member Functions | List of all members
stmg::TileSelector Class Reference

Classes

class  Operand
 
class  Operator
 
class  Skin
 
class  Trait
 

Public Types

enum  OPERAND_TYPE { OPERAND_TYPE_OPERATOR = 0, OPERAND_TYPE_TRAIT = 1, OPERAND_TYPE_SKIN = 2 }
 

Public Member Functions

 TileSelector (unique_ptr< Operand > refOperand) noexcept
 Constructor. More...
 
 TileSelector () noexcept=default
 Empty constructor. More...
 
bool select (const Tile &oTile) const noexcept
 Whether the tile is selected by this instance. More...
 
bool select (const Tile &oTile, int32_t nSkin) const noexcept
 Whether the tile and skin are selected by this instance. More...
 
void dump (int32_t nIndentSpaces) const noexcept
 

Member Enumeration Documentation

◆ OPERAND_TYPE

Enumerator
OPERAND_TYPE_OPERATOR 
OPERAND_TYPE_TRAIT 
OPERAND_TYPE_SKIN 

Constructor & Destructor Documentation

◆ TileSelector() [1/2]

stmg::TileSelector::TileSelector ( unique_ptr< Operand refOperand)
explicitnoexcept

Constructor.

Parameters
refOperandThe expression. Cannot be null.

◆ TileSelector() [2/2]

stmg::TileSelector::TileSelector ( )
defaultnoexcept

Empty constructor.

The select() functions will always return false.

Member Function Documentation

◆ dump()

void stmg::TileSelector::dump ( int32_t  nIndentSpaces) const
noexcept

◆ select() [1/2]

bool stmg::TileSelector::select ( const Tile oTile) const
noexcept

Whether the tile is selected by this instance.

Parameters
oTileThe tile.
Returns
Whether tile selected.

◆ select() [2/2]

bool stmg::TileSelector::select ( const Tile oTile,
int32_t  nSkin 
) const
noexcept

Whether the tile and skin are selected by this instance.

Parameters
oTileThe tile.
nSkinThe skin.
Returns
Whether tile selected.