Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SoDeviceContextSharedGroup Class Reference

VSG extension Shared context management class. More...

#include <Inventor/devices/SoDeviceContextSharedGroup.h>

+ Inheritance diagram for SoDeviceContextSharedGroup:

Public Types

typedef std::set< SoDeviceContext * > SoDeviceContextSet
 Type definition for SoDeviceContext set management.
 

Public Member Functions

 SoDeviceContextSharedGroup ()
 Creates a new SharedGroup.
 
 SoDeviceContextSharedGroup (int id)
 Creates a new SharedGroup with specific id.
 
void add (SoDeviceContext *ctx)
 Adds a device context to the group.
 
void remove (SoDeviceContext *ctx)
 Removes a device context from the group.
 
void setId (int id)
 Sets a specific id for this shared group.
 
int getId () const
 Gets the id of this shared group.
 
const SoDeviceContextSetgetContexts () const
 Gets the list of contexts managed by this shared group.
 
SoDeviceContextgetPrimaryContext () const
 Returns the first context found in the shared group.
 
bool contains (const SoDeviceContext *ctx) const
 Returns TRUE if the passed context is part of the shared group.
 
void ref (SoBaseContextCache *object=NULL)
 Increment reference count.
 
void unref (SoBaseContextCache *object=NULL)
 Decrement reference count.
 
bool contains (SoBaseContextCache *object) const
 Returns TRUE if the specified object is already in the list of notified objects.
 
virtual void dispose ()
 Force all attached objects to release the context, by calling their respective release function, and force deletion of the contained context.
 
- Public Member Functions inherited from SoRefCounter
void ref () const
 Adds a reference to an instance.
 
void unref () const
 Removes a reference from an instance.
 
void unrefNoDelete () const
 unrefNoDelete() should be called when it is desired to decrement the reference count, but not delete the instance if this brings the reference count to zero.
 
int getRefCount () const
 Returns current reference count.
 
void lock () const
 lock this instance.
 
void unlock () const
 unlock this instance.
 

Detailed Description

VSG extension Shared context management class.

This class provides functions to manage a shared group of device contexts.

Definition at line 52 of file SoDeviceContextSharedGroup.h.

Member Typedef Documentation

◆ SoDeviceContextSet

Type definition for SoDeviceContext set management.

Definition at line 56 of file SoDeviceContextSharedGroup.h.

Constructor & Destructor Documentation

◆ SoDeviceContextSharedGroup() [1/2]

SoDeviceContextSharedGroup::SoDeviceContextSharedGroup ( )

Creates a new SharedGroup.

◆ SoDeviceContextSharedGroup() [2/2]

SoDeviceContextSharedGroup::SoDeviceContextSharedGroup ( int  id)

Creates a new SharedGroup with specific id.

Member Function Documentation

◆ add()

void SoDeviceContextSharedGroup::add ( SoDeviceContext ctx)

Adds a device context to the group.

◆ contains() [1/2]

bool SoDeviceContextSharedGroup::contains ( const SoDeviceContext ctx) const

Returns TRUE if the passed context is part of the shared group.

◆ contains() [2/2]

bool SoDeviceContextSharedGroup::contains ( SoBaseContextCache *  object) const

Returns TRUE if the specified object is already in the list of notified objects.

To add or remove an object, from this list, the ref(object) and unref(object) methods can be used.

◆ dispose()

virtual void SoDeviceContextSharedGroup::dispose ( )
virtual

Force all attached objects to release the context, by calling their respective release function, and force deletion of the contained context.

◆ getContexts()

const SoDeviceContextSet & SoDeviceContextSharedGroup::getContexts ( ) const

Gets the list of contexts managed by this shared group.

◆ getId()

int SoDeviceContextSharedGroup::getId ( ) const

Gets the id of this shared group.

◆ getPrimaryContext()

SoDeviceContext * SoDeviceContextSharedGroup::getPrimaryContext ( ) const

Returns the first context found in the shared group.

◆ ref()

void SoDeviceContextSharedGroup::ref ( SoBaseContextCache *  object = NULL)

Increment reference count.

Object is the ContextObject that should be triggered when this context is deleted.

◆ remove()

void SoDeviceContextSharedGroup::remove ( SoDeviceContext ctx)

Removes a device context from the group.

◆ setId()

void SoDeviceContextSharedGroup::setId ( int  id)

Sets a specific id for this shared group.

◆ unref()

void SoDeviceContextSharedGroup::unref ( SoBaseContextCache *  object = NULL)

Decrement reference count.

Object is the ContextObject that was referenced originally.

If this call causes the reference count to go from 1 to 0 then the context is automatically deleted and all ContextObject that previously called ref(SoContextObject*) will be triggered for deletion (potentially asynchronously).


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