<commit_before>/******************************************************************************

    State pure abstract class

  Copyright (c) 2013 <NAME>

  Portions Copyright (c) 2013 <NAME>
  All rights reserved.

******************************************************************************/
#ifndef NOMLIB_ISTATE_HEADERS
#define NOMLIB_ISTATE_HEADERS

#include "config.hpp"
#include "sys/Logger.hpp"
#include "sys/SDL_Input.hpp"

namespace nom {

class IState: public SDL_Input // "has a" relationship
{
  public:
    virtual ~IState ( void )
    {
NOMLIB_LOG_INFO;
    }

    virtual void onInit ( void ) = 0;
    virtual void onExit ( void ) = 0;

    /// Optional interface
    virtual void Pause ( void ) {}
    /// Optional interface
    virtual void Resume ( void ) {}

    virtual void Update ( float ) = 0;
    virtual void Draw ( void* ) = 0;
};


} // namespace nom

#endif // NOMLIB_ISTATE_HEADERS defined
<commit_msg>Make onInit, onExit optional interfacing<commit_after>/******************************************************************************

    State pure abstract class

  Copyright (c) 2013 <NAME>

  Portions Copyright (c) 2013 <NAME>
  All rights reserved.

******************************************************************************/
#ifndef NOMLIB_ISTATE_HEADERS
#define NOMLIB_ISTATE_HEADERS

#include "config.hpp"
#include "sys/Logger.hpp"
#include "sys/SDL_Input.hpp"

namespace nom {

class IState: public SDL_Input // "has a" relationship
{
  public:
    virtual ~IState ( void )
    {
NOMLIB_LOG_INFO;
    }

    /// Required interface
    virtual void Update ( float ) = 0;

    /// Required interface
    virtual void Draw ( void* ) = 0;

    /// Optional interface
    virtual void onInit ( void ) {}

    /// Optional interface
    virtual void onExit ( void ) {}

    /// Optional interface
    virtual void Pause ( void ) {}

    /// Optional interface
    virtual void Resume ( void ) {}
};


} // namespace nom

#endif // NOMLIB_ISTATE_HEADERS defined

{'fraction_non_alphanumeric': 0.24500998003992017, 'fraction_numerical': 0.010978043912175649, 'mean_word_length': 3.515765765765766, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2837102', 'n_tokens_mistral': 593, 'n_tokens_neox': 536, 'n_words': 166}