SoBaseContextObject Class Reference

VSG extension Context dependent object management class. More...

#include <Inventor/devices/SoBaseContextObject.h>

List of all members.

Public Member Functions

 SoBaseContextObject (SoDeviceContextSharedGroup *sharedContextGroup)
void ref ()
void unref ()
SoDeviceContextSharedGroupgetContextSharedGroup () const
int getRefCount () const
virtual void release ()

Friends

class SoDeviceContextSharedGroup

Detailed Description

VSG extension Context dependent object management class.

A helper base class used to store context dependent objects.


Constructor & Destructor Documentation

SoBaseContextObject::SoBaseContextObject ( SoDeviceContextSharedGroup sharedContextGroup  ) 

Constructor.

Parameters:
sharedContextGroup context shared group from which it depends.

Member Function Documentation

SoDeviceContextSharedGroup* SoBaseContextObject::getContextSharedGroup (  )  const [inline]

Returns the OpenGL context in which the OpenGL objects were created.

int SoBaseContextObject::getRefCount (  )  const [inline]

Returns the reference count of this instance (initially zero).

void SoBaseContextObject::ref (  ) 

Increment reference count.


Reference count is initially zero.

virtual void SoBaseContextObject::release (  )  [inline, virtual]

This function is called by the attached context when it has been requested to delete the context through the SoDeviceContext::dispose() method.

As some object might be still attached, it triggers all attached object release() method to ask them to detach (and then get it refcount to zero).

void SoBaseContextObject::unref (  ) 

Decrement reference count.


If this call changes the reference count to zero, the object will be destroyed (just like node classes).

Context dependent objects can only be destroyed if the context that owns them is active. The state parameter is used to determine the correct context for this object. You can pass a NULL state to unref(), but deletion of the object will be delayed until an action is applied in the correct context.


Friends And Related Function Documentation

friend class SoDeviceContextSharedGroup [friend]

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

Open Inventor Toolkit reference manual, generated on 12 Sep 2022
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/