Class 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 Detail

      • SoDeviceContextSharedGroup

        public SoDeviceContextSharedGroup()
        Creates a new SharedGroup.
      • SoDeviceContextSharedGroup

        public SoDeviceContextSharedGroup​(int id)
        Creates a new SharedGroup with specific id.
    • 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 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.
      • 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.