Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
MouseManager Class Reference

#include <MouseManager.h>

Public Member Functions

 MouseManager ()
 
virtual ~MouseManager ()
 
void Initialize ()
 
void Shutdown ()
 
void HandleEvent (const SDL_Event *ev)
 
void BeginFrame ()
 

Static Public Member Functions

static MouseManagerGetInstance ()
 
static MouseManagerGet ()
 

Private Member Functions

void PostButtonEvent (const SDL_MouseButtonEvent &be)
 
void PostMotionEvent (const SDL_MouseMotionEvent &me)
 

Private Attributes

std::string name
 
std::mutex m_mutex
 

Detailed Description

Definition at line 8 of file MouseManager.h.

Constructor & Destructor Documentation

◆ MouseManager()

MouseManager::MouseManager ( )
inline

Definition at line 11 of file MouseManager.h.

References Initialize().

+ Here is the call graph for this function:

◆ ~MouseManager()

virtual MouseManager::~MouseManager ( )
inlinevirtual

Definition at line 15 of file MouseManager.h.

References Shutdown().

+ Here is the call graph for this function:

Member Function Documentation

◆ BeginFrame()

void MouseManager::BeginFrame ( )

Definition at line 23 of file MouseManager.cpp.

Referenced by SDL_AppEvent(), and SDL_AppIterate().

+ Here is the caller graph for this function:

◆ Get()

static MouseManager & MouseManager::Get ( )
inlinestatic

Definition at line 21 of file MouseManager.h.

References GetInstance().

Referenced by InputsManager::HandleEvent(), SDL_AppEvent(), SDL_AppIterate(), and InputsManager::Shutdown().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetInstance()

MouseManager & MouseManager::GetInstance ( )
static

Definition at line 6 of file MouseManager.cpp.

References GetComponentTypeID_Static().

Referenced by Get().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HandleEvent()

void MouseManager::HandleEvent ( const SDL_Event ev)

Definition at line 29 of file MouseManager.cpp.

References GetComponentTypeID_Static(), PostButtonEvent(), and PostMotionEvent().

Referenced by InputsManager::HandleEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Initialize()

void MouseManager::Initialize ( )

Definition at line 12 of file MouseManager.cpp.

References name, and SYSTEM_LOG.

Referenced by MouseManager().

+ Here is the caller graph for this function:

◆ PostButtonEvent()

void MouseManager::PostButtonEvent ( const SDL_MouseButtonEvent be)
private

Definition at line 46 of file MouseManager.cpp.

References Message::Create(), EventQueue::Get(), GetComponentTypeID_Static(), Input, Olympe_EventType_Mouse_ButtonDown, Olympe_EventType_Mouse_ButtonUp, EventQueue::Push(), and Message::state.

Referenced by HandleEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PostMotionEvent()

void MouseManager::PostMotionEvent ( const SDL_MouseMotionEvent me)
private

Definition at line 61 of file MouseManager.cpp.

References Message::Create(), EventQueue::Get(), GetComponentTypeID_Static(), Input, Olympe_EventType_Mouse_Motion, and EventQueue::Push().

Referenced by HandleEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Shutdown()

void MouseManager::Shutdown ( )

Definition at line 18 of file MouseManager.cpp.

References SYSTEM_LOG.

Referenced by InputsManager::Shutdown(), and ~MouseManager().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_mutex

std::mutex MouseManager::m_mutex
private

Definition at line 31 of file MouseManager.h.

◆ name

std::string MouseManager::name
private

Definition at line 30 of file MouseManager.h.

Referenced by Initialize().


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