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 voidadd(SoDeviceContext ctx)Adds a device context to the group.booleancontains(SoBaseContextCache object)Returns true if the specified object is already in the list of notified objects.booleancontains(SoDeviceContext ctx)Returns true if the passed context is part of the shared group.booleandispose()Explicitly call this method to force object to dispose its unmanaged resources.intgetId()Gets the id of this shared group.SoDeviceContextgetPrimaryContext()Returns the first context found in the shared group.booleanisDisposable()Returns a boolean flag which indicates if it is safe to callSafeDisposable.dispose()on the object.voidremove(SoDeviceContext ctx)Removes a device context from the group.voidsetId(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:InventorExplicitly 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:
disposein interfaceSafeDisposable- Overrides:
disposein classInventor- Returns:
trueif this object native resources were successfully disposed;falseif it was already disposed or no native resources has been registered for this object.
-
isDisposable
public boolean isDisposable()
Description copied from interface:SafeDisposableReturns a boolean flag which indicates if it is safe to callSafeDisposable.dispose()on the object.- Specified by:
isDisposablein interfaceSafeDisposable- Returns:
trueif 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.
-
-