fr.emn.reactiveinput.descriptor
Interface DeviceDescriptor

All Known Implementing Classes:
DDAnd, DDAny, DDClass, DDDeclare, DDError, DDExternalInput, DDExternalOutput, DDFolder, DDIns, DDMutable, DDName, DDNot, DDOptional, DDOr, DDOutCount, DDOuts, DDProperties

public interface DeviceDescriptor

A DeviceDescriptor represents a possibly non-enumerable set of input devices.

A DeviceDescriptor is a set of input devices defined by the method contains(Device). It is mostly used to query devices.

Simple descriptor classes are provided in Descriptors package, along with meta descriptors that allow constructing union (OrDescriptor) and intersections (AndDescriptor) of simple descriptors.

A DeviceDescriptor has a String form, which can be used to re-create equivalent descriptors (i.e. containing the same devices). This string form allows DeviceDescriptors to be serializable, and enables its use in scripts.

The string form is given by the getString() method, and reification is provided by a constructor with a String argument that all descriptors must also implement.

Always use the prefix "DD" when you create a new device descriptor class: the class name without suffix is used in script form (see DescriptorManager for details).


Method Summary
 boolean contains(Device d)
          Returns true if this descriptor contains given device.
 java.lang.String getString()
          Returns the string form of this descriptor.
 

Method Detail

contains

public boolean contains(Device d)
Returns true if this descriptor contains given device.


getString

public java.lang.String getString()
Returns the string form of this descriptor.

Returns null if the descriptor is not valid (in all environments).