GEJM  1.0.0.0
a 2D platformer made by students
Public Member Functions | List of all members
ViewModel Class Reference

#include <ViewModel.h>

Public Member Functions

 ViewModel (Game *const game, SDLWrapper *const sdlWrapper)
 
 ~ViewModel ()
 
void handleEvents ()
 
void drawLoop ()
 
ViewModeloperator= (ViewModel const &)=delete
 

Detailed Description

ViewModel is a class responsible for drawing game. It interprets game states and objects and draws them on screen using SDLWrapper.

Constructor & Destructor Documentation

ViewModel::ViewModel ( Game *const  game,
SDLWrapper *const  sdlWrapper 
)

Initializes variables.

Parameters
gamea constant pointer to a Game object
sdlWrappera constant pointer to an SDLWrapper

ViewModel implementation Initializes variables.

Parameters
gamea constant pointer to a Game object
sdlWrappera constant pointer to an SDLWrapper
ViewModel::~ViewModel ( )

Default destructor

Member Function Documentation

void ViewModel::drawLoop ( )

A draw loop. Interprets current game state and chooses what to draw.

Returns
void
void ViewModel::handleEvents ( )

Handling events.

Returns
void
ViewModel& ViewModel::operator= ( ViewModel const &  )
delete

Assigment operator is overloaded because it cannot be generated by compiler but because it shouldn't be used it's deleted.


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