Class SoDeviceContextSharedGroup
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.devices.SoDeviceContextSharedGroup
-
- All Implemented Interfaces:
SafeDisposable
public class SoDeviceContextSharedGroup extends Inventor implements SafeDisposable
Shared context management class. This class provides functions to manage a shared group of device contexts.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoDeviceContextSharedGroup()
Creates a new SharedGroup.SoDeviceContextSharedGroup(int id)
Creates a new SharedGroup with specific id.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(SoDeviceContext ctx)
Adds a device context to the group.boolean
contains(SoBaseContextCache object)
Returns true if the specified object is already in the list of notified objects.boolean
contains(SoDeviceContext ctx)
Returns true if the passed context is part of the shared group.boolean
dispose()
Explicitly call this method to force object to dispose its unmanaged resources.int
getId()
Gets the id of this shared group.SoDeviceContext
getPrimaryContext()
Returns the first context found in the shared group.boolean
isDisposable()
Returns a boolean flag which indicates if it is safe to callSafeDisposable.dispose()
on the object.void
remove(SoDeviceContext ctx)
Removes a device context from the group.void
setId(int id)
Sets a specific id for this shared group.-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
Method Detail
-
dispose
public boolean dispose()
Description copied from class:Inventor
Explicitly call this method to force object to dispose its unmanaged resources. The object may not be reused in the application code after this call.- Specified by:
dispose
in interfaceSafeDisposable
- Overrides:
dispose
in classInventor
- Returns:
true
if this object native resources were successfully disposed;false
if it was already disposed or no native resources has been registered for this object.
-
isDisposable
public boolean isDisposable()
Description copied from interface:SafeDisposable
Returns a boolean flag which indicates if it is safe to callSafeDisposable.dispose()
on the object.- Specified by:
isDisposable
in interfaceSafeDisposable
- Returns:
true
if the object can be disposed in a safe manner
-
remove
public void remove(SoDeviceContext ctx)
Removes a device context from the group.
-
add
public void add(SoDeviceContext ctx)
Adds a device context to the group.
-
setId
public void setId(int id)
Sets a specific id for this shared group.
-
contains
public boolean contains(SoDeviceContext ctx)
Returns true if the passed context is part of the shared group.
-
contains
public boolean contains(SoBaseContextCache object)
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.
-
getId
public int getId()
Gets the id of this shared group.
-
getPrimaryContext
public SoDeviceContext getPrimaryContext()
Returns the first context found in the shared group.
-
-