Middle Europe Productions Library  alpha 1.3.3
Public Member Functions | List of all members
MEP::BaseManager Class Reference

A MEP::Window manager. With a build in memory management. More...

#include <BaseManager.h>

Inheritance diagram for MEP::BaseManager:
MEPtools::GroupManager< BaseWindow, std::shared_ptr< BaseWindow > > MEP::Template::Application

Public Member Functions

 BaseManager ()=default
 
BaseWindowgetWindow (MEP::U_int32 ID, MEP::U_int32 group=-1)
 
std::map< MEP::U_int32, std::shared_ptr< BaseWindow > > & getWindowGroup (MEP::U_int32 group=-1)
 
void deleteWindow (MEP::U_int32 ID, MEP::U_int32 group=-1)
 
void deleteWindowGroup (MEP::U_int32 group=-1)
 
void addWindow (BaseWindow *window, MEP::U_int32 group=-1)
 
BaseWindowlatestWindow ()
 
template<typename Method >
void execute (Method method)
 
template<typename Method >
void execute (Method method, MEP::U_int32 group)
 

Detailed Description

A MEP::Window manager. With a build in memory management.

It manages all of the MEP::Window added to the MEP::Teamplate::Application

Constructor & Destructor Documentation

◆ BaseManager()

MEP::BaseManager::BaseManager ( )
default

Member Function Documentation

◆ addWindow()

void MEP::BaseManager::addWindow ( BaseWindow window,
MEP::U_int32  group = -1 
)
inline

Adds a new window to back of the m_windows render list.
Window is being renderd only if its Type != NullAction.
MEP::BaseWindow added with this command has lower priority.
It is added at the end of the list.

Parameters
[in]window: MEP::BaseWindow

◆ deleteWindow()

void MEP::BaseManager::deleteWindow ( MEP::U_int32  ID,
MEP::U_int32  group = -1 
)
inline

Deletes the window with a given id.

Parameters
[in]window: unsigned int ID

◆ deleteWindowGroup()

void MEP::BaseManager::deleteWindowGroup ( MEP::U_int32  group = -1)
inline

Deletes a group of windows.

Parameters
[in]window: unsigned int ID

◆ execute() [1/2]

template<typename Method >
void MEP::BaseManager::execute ( Method  method)
inline

◆ execute() [2/2]

template<typename Method >
void MEP::BaseManager::execute ( Method  method,
MEP::U_int32  group 
)
inline

◆ getWindow()

BaseWindow& MEP::BaseManager::getWindow ( MEP::U_int32  ID,
MEP::U_int32  group = -1 
)
inline

Outputs a reference to a MEP::Window with a given ID number. When you do not access the same window in a row O(logn + logm) n - number of groups, m - number of elements in group. Otherwise O(1)

Parameters
[in]window: unsigned int ID

◆ getWindowGroup()

std::map<MEP::U_int32, std::shared_ptr<BaseWindow> >& MEP::BaseManager::getWindowGroup ( MEP::U_int32  group = -1)
inline

Outputs a group of Windows. O(logn). Where n - a number of groups.

◆ latestWindow()

BaseWindow& MEP::BaseManager::latestWindow ( )
inline