cage
Interface CaGeOutlet

All Known Subinterfaces:
CaGeViewer
All Known Implementing Classes:
AbstractChemicalWriter, CaGeJmolViewer, CaGeWriter, CMLWriter, NativeCMLWriter, NativePDBWriter, NativePlanarWriter, NativeWritegraphWriter, RasmolViewer, TextViewer, TwoView

public interface CaGeOutlet

An interface common to all possible types of output in CaGe, i.e. all the writers and viewers.


Method Summary
 int getDimension()
          Returns the dimension which is needed for this outlet.
 void outputResult(CaGeResult result)
          Does the actual output of a result.
 void setDimension(int d)
          Sets the dimension for which this outlet will be used.
 void setGeneratorInfo(GeneratorInfo generatorInfo)
          Sets the generator info provided for this outlet.
 void stop()
          Called when this outlet is no longer needed.
 

Method Detail

setGeneratorInfo

void setGeneratorInfo(GeneratorInfo generatorInfo)
Sets the generator info provided for this outlet. This info can contain hints for the output such as GeneratorInfo.isReembed2DEnabled().

Parameters:
generatorInfo - the generator info provided for this outlet

setDimension

void setDimension(int d)
Sets the dimension for which this outlet will be used. This method may throw a RunTimeException when d is an unsupported dimension.

Parameters:
d - The dimension for which this outlet will be used

getDimension

int getDimension()
Returns the dimension which is needed for this outlet.

Returns:
the dimension which is needed for this outlet.

outputResult

void outputResult(CaGeResult result)
Does the actual output of a result. This method takes the graph, wrapped in a CaGeResult object, as input and performs the method of output specific to this outlet.

Parameters:
result - a CaGeResult object that needs to be outputted.

stop

void stop()
Called when this outlet is no longer needed. The outlet can then perform any necessary clean up tasks such as closing streams.