GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
GLC_ContextManager Class Reference

GLC_ContextManager : Manager a set of GLC_Context. More...

#include <glc_contextmanager.h>

Public Member Functions

virtual ~GLC_ContextManager ()
 
Set Functions
void addContext (GLC_Context *pContext)
 Add the given context.
 
void remove (GLC_Context *pContext)
 Remove the given context.
 
void setCurrent (GLC_Context *pContext)
 Set the current the given context.
 

Private Member Functions

 GLC_ContextManager ()
 

Private Attributes

GLC_Contextm_pCurrentContext
 The current context.
 
QSet< GLC_Context * > m_SetOfContext
 The Set of context to manage.
 

Static Private Attributes

static GLC_ContextManagerm_pContextManager = NULL
 The unique instance of the context manager.
 

Get Functions

GLC_ContextcurrentContext () const
 Return the current context.
 
bool currentContextExists () const
 Return true if there is a current context.
 
bool hasContext () const
 Return true if this manager has context.
 
static GLC_ContextManagerinstance ()
 Return the unique instance of context manager.
 

Detailed Description

GLC_ContextManager : Manager a set of GLC_Context.

Definition at line 38 of file glc_contextmanager.h.

Constructor & Destructor Documentation

GLC_ContextManager::GLC_ContextManager ( )
private

Definition at line 31 of file glc_contextmanager.cpp.

Referenced by instance().

GLC_ContextManager::~GLC_ContextManager ( )
virtual

Definition at line 39 of file glc_contextmanager.cpp.

Member Function Documentation

void GLC_ContextManager::addContext ( GLC_Context pContext)

Add the given context.

Definition at line 65 of file glc_contextmanager.cpp.

References m_SetOfContext.

Referenced by GLC_Context::GLC_Context().

GLC_Context * GLC_ContextManager::currentContext ( ) const

Return the current context.

Definition at line 57 of file glc_contextmanager.cpp.

References m_pCurrentContext.

bool GLC_ContextManager::currentContextExists ( ) const
inline

Return true if there is a current context.

Definition at line 58 of file glc_contextmanager.h.

bool GLC_ContextManager::hasContext ( ) const
inline

Return true if this manager has context.

Definition at line 62 of file glc_contextmanager.h.

GLC_ContextManager * GLC_ContextManager::instance ( )
static

Return the unique instance of context manager.

Definition at line 47 of file glc_contextmanager.cpp.

References GLC_ContextManager(), and m_pContextManager.

Referenced by GLC_Context::doneCurrent(), GLC_Context::GLC_Context(), GLC_Context::makeCurrent(), and GLC_Context::~GLC_Context().

void GLC_ContextManager::remove ( GLC_Context pContext)

Remove the given context.

Definition at line 71 of file glc_contextmanager.cpp.

References m_pCurrentContext, and m_SetOfContext.

Referenced by GLC_Context::~GLC_Context().

void GLC_ContextManager::setCurrent ( GLC_Context pContext)

Set the current the given context.

Definition at line 81 of file glc_contextmanager.cpp.

References m_pCurrentContext, and m_SetOfContext.

Referenced by GLC_Context::doneCurrent(), and GLC_Context::makeCurrent().

Member Data Documentation

GLC_ContextManager * GLC_ContextManager::m_pContextManager = NULL
staticprivate

The unique instance of the context manager.

Definition at line 95 of file glc_contextmanager.h.

Referenced by instance().

GLC_Context* GLC_ContextManager::m_pCurrentContext
private

The current context.

Definition at line 98 of file glc_contextmanager.h.

Referenced by currentContext(), remove(), and setCurrent().

QSet<GLC_Context*> GLC_ContextManager::m_SetOfContext
private

The Set of context to manage.

Definition at line 101 of file glc_contextmanager.h.

Referenced by addContext(), remove(), and setCurrent().


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

©2005-2013 Laurent Ribon