fr.emn.reactiveinput.devices
Class FStdCompound

java.lang.Object
  extended byfr.emn.reactiveinput.devices.FStdCompound
All Implemented Interfaces:
DeviceFolder

public class FStdCompound
extends java.lang.Object
implements DeviceFolder


Field Summary
static CompoundDevice compound
           
static InPin inpin
           
static OutPin outpin
           
 
Constructor Summary
FStdCompound()
           
 
Method Summary
 DeviceDescriptor getDefaultDescriptor()
          Returns a descriptor telling all possible devices this folder can contain in all possible environments (DDFolder not included).
 DeviceDescriptor getDefaultDescriptor(Device device)
          Returns the descriptor that will be used to build device's default signature.
 java.lang.String getName()
           
 DeviceFolderContainer getParent()
          Allows this folder to be added to a parent folder.
 Device[] getPrototypes()
          Returns all available prototypes from this folder for the current environment.
 void setParent(DeviceFolderContainer newParent)
          Allows this folder to be added to a parent folder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inpin

public static final InPin inpin

outpin

public static final OutPin outpin

compound

public static final CompoundDevice compound
Constructor Detail

FStdCompound

public FStdCompound()
Method Detail

getDefaultDescriptor

public DeviceDescriptor getDefaultDescriptor()
Description copied from interface: DeviceFolder
Returns a descriptor telling all possible devices this folder can contain in all possible environments (DDFolder not included).

Returns DDAny if this descriptor can contain every kind of device, or returns a more restrictive DeviceDescriptor defining the particular kind of devices associated with this folder.

Specified by:
getDefaultDescriptor in interface DeviceFolder

getDefaultDescriptor

public DeviceDescriptor getDefaultDescriptor(Device device)
Description copied from interface: DeviceFolder
Returns the descriptor that will be used to build device's default signature.

The device signature is used to serialize the device, i.e. retreive it in further executions of the virtual machine. The default signature of the device D from folder F is given by the combination (DDAnd) of three descriptors (See getDefaultSignature() method in DescriptorManager class):

1) new DDFolder(F)

2) F.getDefaultDescriptor()

3) F.getDefaultDescriptor(D)

Two devices with the same signature are equivalent in functionnality. Device equivalence must be defined as restrictive as possible. However, this method must only return information that is useful to identify the device inside the folder.

For example, if all devices of the same class are equivalent for a given folder (as in standard.processors folder), you can return a class descriptor (DDClass). However, in folders that provide devices of the same class with different functionnalities, you must use an alternate method for identifying them (such as their name, or other properties).

Note1: When possible, move factorizable descriptors in getDefaultDescriptor(void) method.

Note2: Do not include descriptors that are already defined in getDefaultDescriptor(void).

Specified by:
getDefaultDescriptor in interface DeviceFolder

getName

public java.lang.String getName()
Specified by:
getName in interface DeviceFolder

getParent

public DeviceFolderContainer getParent()
Description copied from interface: DeviceFolder
Allows this folder to be added to a parent folder.

Specified by:
getParent in interface DeviceFolder

getPrototypes

public Device[] getPrototypes()
Description copied from interface: DeviceFolder
Returns all available prototypes from this folder for the current environment.

Prototype devices include copiable devices and static devices. Copiable devices must be copied before using them.

Note: This method must not return devices that do not match the getDefaultDescriptor(void) method.

Specified by:
getPrototypes in interface DeviceFolder

setParent

public void setParent(DeviceFolderContainer newParent)
Description copied from interface: DeviceFolder
Allows this folder to be added to a parent folder.

Specified by:
setParent in interface DeviceFolder