Qt 4.8
Public Functions | Protected Variables | List of all members
QGLContextResourceBase Class Referenceabstract

#include <qgl_p.h>

Inheritance diagram for QGLContextResourceBase:
QGLContextResource< T >

Public Functions

virtual void freeResource (void *value)=0
 
void insert (const QGLContext *context, void *value)
 
void * value (const QGLContext *context)
 
virtual ~QGLContextResourceBase ()
 

Protected Variables

QList< const QGLContext * > m_contexts
 

Detailed Description

Definition at line 793 of file qgl_p.h.

Constructors and Destructors

◆ ~QGLContextResourceBase()

virtual QGLContextResourceBase::~QGLContextResourceBase ( )
inlinevirtual

Definition at line 796 of file qgl_p.h.

796  {
797  for (int i = 0; i < m_contexts.size(); ++i)
798  m_contexts.at(i)->d_ptr->m_resources.remove(this);
799  }
QScopedPointer< QGLContextPrivate > d_ptr
Definition: qgl.h:430
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
QHash< QGLContextResourceBase *, void * > m_resources
Definition: qgl_p.h:459
QList< const QGLContext * > m_contexts
Definition: qgl_p.h:811
int size() const
Returns the number of items in the list.
Definition: qlist.h:137

Functions

◆ freeResource()

virtual void QGLContextResourceBase::freeResource ( void *  value)
pure virtual

Implemented in QGLContextResource< T >.

◆ insert()

void QGLContextResourceBase::insert ( const QGLContext context,
void *  value 
)
inline

Definition at line 801 of file qgl_p.h.

801  {
802  context->d_ptr->m_resources.insert(this, value);
803  }
QScopedPointer< QGLContextPrivate > d_ptr
Definition: qgl.h:430
QHash< QGLContextResourceBase *, void * > m_resources
Definition: qgl_p.h:459
void * value(const QGLContext *context)
Definition: qgl_p.h:805

◆ value()

void* QGLContextResourceBase::value ( const QGLContext context)
inline

Definition at line 805 of file qgl_p.h.

Referenced by QGLContextResource< T >::value(), and QGLContextResource< T >::~QGLContextResource().

805  {
806  return context->d_ptr->m_resources.value(this, 0);
807  }
QScopedPointer< QGLContextPrivate > d_ptr
Definition: qgl.h:430
QHash< QGLContextResourceBase *, void * > m_resources
Definition: qgl_p.h:459

Properties

◆ m_contexts

QList<const QGLContext *> QGLContextResourceBase::m_contexts
protected

Definition at line 811 of file qgl_p.h.


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