org.jocl.cloth.utils.gui
Class CLDefaultConfig

java.lang.Object
  extended by org.jocl.cloth.utils.gui.CLDefaultConfig
All Implemented Interfaces:
CLConfig, CLMutableConfig

public class CLDefaultConfig
extends java.lang.Object
implements CLMutableConfig

Default implementation of a CLMutableConfig


Constructor Summary
CLDefaultConfig()
          Default constructor.
 
Method Summary
 void addCLConfigListener(CLConfigListener clConfigListener)
          Add the given CLConfigListener to be informed about modifications in this configuration.
protected  void fireConfigChanged()
          Notify all registered CLConfigListeners about a modification in this configuration.
 java.util.List<org.jocl.cl_device_id> getDevices()
          Returns an unmodifiable list containing the OpenCL devices
 org.jocl.cl_platform_id getPlatform()
          Returns the OpenCL platform
 void removeCLConfigListener(CLConfigListener clConfigListener)
          Remove the given CLConfigListener.
 void setConfig(org.jocl.cl_platform_id platform, java.util.List<org.jocl.cl_device_id> devices)
          Set the platform and devices of this CLConfig.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CLDefaultConfig

public CLDefaultConfig()
Default constructor. Creates an empty configuration, where the platform is null and the list of devices is empty.

Method Detail

setConfig

public void setConfig(org.jocl.cl_platform_id platform,
                      java.util.List<org.jocl.cl_device_id> devices)
Description copied from interface: CLMutableConfig
Set the platform and devices of this CLConfig. None of the given parameters may be null.

Specified by:
setConfig in interface CLMutableConfig
Parameters:
platform - The platform.
devices - The list of devices.

getPlatform

public org.jocl.cl_platform_id getPlatform()
Description copied from interface: CLConfig
Returns the OpenCL platform

Specified by:
getPlatform in interface CLConfig
Returns:
The OpenCL platform

getDevices

public java.util.List<org.jocl.cl_device_id> getDevices()
Description copied from interface: CLConfig
Returns an unmodifiable list containing the OpenCL devices

Specified by:
getDevices in interface CLConfig
Returns:
The OpenCL devices

addCLConfigListener

public void addCLConfigListener(CLConfigListener clConfigListener)
Description copied from interface: CLConfig
Add the given CLConfigListener to be informed about modifications in this configuration.

Specified by:
addCLConfigListener in interface CLConfig
Parameters:
clConfigListener - The listener to add

removeCLConfigListener

public void removeCLConfigListener(CLConfigListener clConfigListener)
Description copied from interface: CLConfig
Remove the given CLConfigListener.

Specified by:
removeCLConfigListener in interface CLConfig
Parameters:
clConfigListener - The listener to remove

fireConfigChanged

protected void fireConfigChanged()
Notify all registered CLConfigListeners about a modification in this configuration.