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

Public Member Functions

int32_t gameEndedCount () const noexcept
 
int32_t gamePauseCount () const noexcept
 
int32_t gameAbortCount () const noexcept
 
int32_t gameAbortAskCount () const noexcept
 
int32_t gameQuitCount () const noexcept
 
int32_t gameQuitAskCount () const noexcept
 
int32_t gameRestartCount () const noexcept
 
int32_t gameRestartAskCount () const noexcept
 
void gameEnded () noexcept override
 Tells the owner the game has ended. More...
 
void gameInterrupt (GameProxy::INTERRUPT_TYPE eInterruptType) noexcept override
 Tells owner to possibly interrupt the current game. More...
 
- Public Member Functions inherited from stmg::GameOwner
virtual ~GameOwner () noexcept=default
 

Public Attributes

int32_t m_nGameEndedCount
 
int32_t m_nGamePauseCount
 
int32_t m_nGameAbortCount
 
int32_t m_nGameAbortAskCount
 
int32_t m_nGameQuitCount
 
int32_t m_nGameQuitAskCount
 
int32_t m_nGameRestartCount
 
int32_t m_nGameRestartAskCount
 

Protected Member Functions

virtual void setup ()
 
virtual void teardown ()
 
void resetGameOwner () noexcept
 

Member Function Documentation

◆ gameAbortAskCount()

int32_t stmg::testing::GameOwnerFixture::gameAbortAskCount ( ) const
inlinenoexcept

◆ gameAbortCount()

int32_t stmg::testing::GameOwnerFixture::gameAbortCount ( ) const
inlinenoexcept

◆ gameEnded()

void stmg::testing::GameOwnerFixture::gameEnded ( )
inlineoverridevirtualnoexcept

Tells the owner the game has ended.

This function expects the owner to add the scores of the team(s) to the highscores if available.

Implements stmg::GameOwner.

◆ gameEndedCount()

int32_t stmg::testing::GameOwnerFixture::gameEndedCount ( ) const
inlinenoexcept

◆ gameInterrupt()

void stmg::testing::GameOwnerFixture::gameInterrupt ( GameProxy::INTERRUPT_TYPE  eInterruptType)
inlineoverridevirtualnoexcept

Tells owner to possibly interrupt the current game.

For INTERRUPT_PAUSE the owner will in turn stop calling Game::handleTimer() and Game::handleInput() for as long as the game remains paused.

The owner should also momentarily pause the game for all interrupt that ask the "Are you sure" question.

Parameters
eInterruptTypeThe interrupt type.

Implements stmg::GameOwner.

◆ gamePauseCount()

int32_t stmg::testing::GameOwnerFixture::gamePauseCount ( ) const
inlinenoexcept

◆ gameQuitAskCount()

int32_t stmg::testing::GameOwnerFixture::gameQuitAskCount ( ) const
inlinenoexcept

◆ gameQuitCount()

int32_t stmg::testing::GameOwnerFixture::gameQuitCount ( ) const
inlinenoexcept

◆ gameRestartAskCount()

int32_t stmg::testing::GameOwnerFixture::gameRestartAskCount ( ) const
inlinenoexcept

◆ gameRestartCount()

int32_t stmg::testing::GameOwnerFixture::gameRestartCount ( ) const
inlinenoexcept

◆ resetGameOwner()

void stmg::testing::GameOwnerFixture::resetGameOwner ( )
inlineprotectednoexcept

◆ setup()

virtual void stmg::testing::GameOwnerFixture::setup ( )
inlineprotectedvirtual

Reimplemented in stmg::testing::GameFixture.

◆ teardown()

virtual void stmg::testing::GameOwnerFixture::teardown ( )
inlineprotectedvirtual

Reimplemented in stmg::testing::GameFixture.

Member Data Documentation

◆ m_nGameAbortAskCount

int32_t stmg::testing::GameOwnerFixture::m_nGameAbortAskCount

◆ m_nGameAbortCount

int32_t stmg::testing::GameOwnerFixture::m_nGameAbortCount

◆ m_nGameEndedCount

int32_t stmg::testing::GameOwnerFixture::m_nGameEndedCount

◆ m_nGamePauseCount

int32_t stmg::testing::GameOwnerFixture::m_nGamePauseCount

◆ m_nGameQuitAskCount

int32_t stmg::testing::GameOwnerFixture::m_nGameQuitAskCount

◆ m_nGameQuitCount

int32_t stmg::testing::GameOwnerFixture::m_nGameQuitCount

◆ m_nGameRestartAskCount

int32_t stmg::testing::GameOwnerFixture::m_nGameRestartAskCount

◆ m_nGameRestartCount

int32_t stmg::testing::GameOwnerFixture::m_nGameRestartCount