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.
  • Constructor Details

    • SoDeviceContextSharedGroup

      public SoDeviceContextSharedGroup()
      Creates a new SharedGroup.
    • SoDeviceContextSharedGroup

      public SoDeviceContextSharedGroup(int id)
      Creates a new SharedGroup with specific id.
  • Method Details

    • 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 interface SafeDisposable
      Overrides:
      dispose in class Inventor
      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 call SafeDisposable.dispose() on the object.
      Specified by:
      isDisposable in interface SafeDisposable
      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.