R-Type
Public Member Functions | List of all members
GameEngine::IWindow< T, Vt, Et, D > Class Template Referenceabstract

Interface for the window. More...

#include <RenderInterfaces.hpp>

Public Member Functions

virtual ~IWindow ()=default
 Destructor. More...
 
virtual const T & getWindow () const =0
 Get the window. More...
 
virtual T & getWindow ()=0
 Get the window. More...
 
virtual void draw (const D &drawable)=0
 draw a drawable on the window More...
 
virtual void setView (const IView< Vt > &view)=0
 set a new view in the window More...
 
virtual void setFramerateLimit (const float rate)=0
 Set the maximum framerate of the window. More...
 
virtual bool isOpen () const =0
 check if the window is open More...
 
virtual bool pollEvent (IEvent< Et > &event)=0
 pop the event on top of the event queue, if any, and return it. More...
 
virtual void close ()=0
 close the window More...
 
virtual void display ()=0
 display everything that has been drawn More...
 
virtual void clear ()=0
 clear the window More...
 
virtual void create (int width, int height, const std::string &title)=0
 create a new window More...
 

Detailed Description

template<class T, class Vt, class Et, class D>
class GameEngine::IWindow< T, Vt, Et, D >

Interface for the window.

Template Parameters
Ttype of the window
Vttype of view
Ettype of event
Dtype of drawable

Constructor & Destructor Documentation

◆ ~IWindow()

template<class T , class Vt , class Et , class D >
virtual GameEngine::IWindow< T, Vt, Et, D >::~IWindow ( )
virtualdefault

Destructor.

Member Function Documentation

◆ clear()

template<class T , class Vt , class Et , class D >
virtual void GameEngine::IWindow< T, Vt, Et, D >::clear ( )
pure virtual

clear the window

Implemented in GameEngine::Window.

◆ close()

template<class T , class Vt , class Et , class D >
virtual void GameEngine::IWindow< T, Vt, Et, D >::close ( )
pure virtual

close the window

Implemented in GameEngine::Window.

◆ create()

template<class T , class Vt , class Et , class D >
virtual void GameEngine::IWindow< T, Vt, Et, D >::create ( int  width,
int  height,
const std::string &  title 
)
pure virtual

create a new window

Parameters
widthwidth of the window
heightheight of the window
titletitle of the window

Implemented in GameEngine::Window.

◆ display()

template<class T , class Vt , class Et , class D >
virtual void GameEngine::IWindow< T, Vt, Et, D >::display ( )
pure virtual

display everything that has been drawn

Implemented in GameEngine::Window.

◆ draw()

template<class T , class Vt , class Et , class D >
virtual void GameEngine::IWindow< T, Vt, Et, D >::draw ( const D &  drawable)
pure virtual

draw a drawable on the window

Parameters
drawableobject that can be draw

Implemented in GameEngine::Window.

◆ getWindow() [1/2]

template<class T , class Vt , class Et , class D >
virtual const T& GameEngine::IWindow< T, Vt, Et, D >::getWindow ( ) const
pure virtual

Get the window.

Returns
the window

Implemented in GameEngine::Window.

◆ getWindow() [2/2]

template<class T , class Vt , class Et , class D >
virtual T& GameEngine::IWindow< T, Vt, Et, D >::getWindow ( )
pure virtual

Get the window.

Returns
the window

Implemented in GameEngine::Window.

◆ isOpen()

template<class T , class Vt , class Et , class D >
virtual bool GameEngine::IWindow< T, Vt, Et, D >::isOpen ( ) const
pure virtual

check if the window is open

Returns
boolean indicating that the window is open

Implemented in GameEngine::Window.

◆ pollEvent()

template<class T , class Vt , class Et , class D >
virtual bool GameEngine::IWindow< T, Vt, Et, D >::pollEvent ( IEvent< Et > &  event)
pure virtual

pop the event on top of the event queue, if any, and return it.

Parameters
eventclass that take the event
Returns
boolean

Implemented in GameEngine::Window.

◆ setFramerateLimit()

template<class T , class Vt , class Et , class D >
virtual void GameEngine::IWindow< T, Vt, Et, D >::setFramerateLimit ( const float  rate)
pure virtual

Set the maximum framerate of the window.

Parameters
ratethe maximum framerate

Implemented in GameEngine::Window.

◆ setView()

template<class T , class Vt , class Et , class D >
virtual void GameEngine::IWindow< T, Vt, Et, D >::setView ( const IView< Vt > &  view)
pure virtual

set a new view in the window

Parameters
viewthe window will take

Implemented in GameEngine::Window.


The documentation for this class was generated from the following file: