pyGAP / game / inc / platform / application.h

#ifndef _PLATFORM_APPLICATION_
#define _PLATFORM_APPLICATION_


namespace common {
class Log;
}


namespace platform {
class Platform;
class GameLoop;
class Renderer;
class Clock;
class CommandManager;
class InputDevice;


class Application
{
public:
    Application(Platform* platform, GameLoop* game_loop);
    virtual ~Application();

    void run();

    Renderer* get_renderer() { return renderer_; }
    Clock* get_clock() { return clock_; }

protected:
    void request_exit();
    Platform* get_platform();
    GameLoop* get_game_loop();

    int num_input_devices_;
    InputDevice** input_devices_; //TODO: move in Platform or GameLoop?
    CommandManager* commands_; //TODO: move in GameLoop?

    Renderer* renderer_;
    Clock* clock_;

#if defined(DEBUG)
    static common::Log*    log_;
#endif

private:
    Application(const Application&);
    Application& operator=(const Application&);

    virtual int init() { return 0; }
    virtual void update();
    virtual void display() {}
    virtual void finish() {}

    Platform* platform_;
    GameLoop* game_loop_;

    bool exit_requested_;
};


} // namespace platform


#endif // _PLATFORM_APPLICATION_
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.