moves
Class constructFamilyBeacon

java.lang.Object
  |
  +--moves.EuMove
        |
        +--moves.constructFamily
              |
              +--moves.constructFamilyBeacon
Direct Known Subclasses:
AddEnds, ConstructArc, ConstructHalfLine, FindIntersection

public abstract class constructFamilyBeacon
extends constructFamily

This class is behind all the LEA moves AddEnds, GetArc, GetHalfLine and FindIntersection. These moves are characterized by the following properties:


Field Summary
protected  fundamentals.EuBeacon beacon
          The beacon
 
Fields inherited from class moves.EuMove
allowedSegments, in, out
 
Constructor Summary
constructFamilyBeacon(interagents.finalWrapper in, interagents.finalWrapper out, fundamentals.EuArguments args, int beacon, java.lang.String inmodes, java.lang.String outmodes)
          This constructor tries, given full information for a LEA program, to find an input and an output mode and checks that no arguments are passed.
constructFamilyBeacon(java.util.Vector inputs, java.util.Vector results, java.util.Vector newResults, interagents.EuLab lab, java.lang.String inmodes, java.lang.String outmodes)
          This constructor creates, given a selection of objects from a user, a move which the user may elect to perform.
 
Method Summary
protected  void initBeacon(int beacon)
          Initializes beacon, throwing a DesignException if beacon unexpected This instance will accept beacons, leaving to iobUsageChecks() to check their relevance
protected  boolean iobUsageChecks()
          Does various checks to see that the conditions described in the field Input/output/beacon usage of the description of the LEA commands are in fact met.
protected  void issueBeacon(interagents.finalWrapper preout, interagents.EuLab lab)
          Finds a beacon that distinguishes.
 void passExceptionDetails(exceptions.LeaException le)
           
protected  void refineConstructs(interagents.joinedWrapper findings, interagents.EuLab lab)
          Does nothing, but is overwritten in constructFamilyWithBeacon
 java.lang.String toString()
          Document the move
protected  void weeder(interagents.joinedWrapper findings, int n, interagents.EuLab lab)
          Weeds among constructed points.
 
Methods inherited from class moves.constructFamily
ex, findAllConstructs, issueBeacon, postprocess
 
Methods inherited from class moves.EuMove
checkSegment, executeMacro, executeMain, executeSegmentOnly, exMacro, exMain, getFirstOutIndex, initArguments, name, operationName, passHintDetails, passSelection, postMacro, postMain, preMacro, preMain, preprocess, specialSegmentOK
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

beacon

protected fundamentals.EuBeacon beacon
The beacon

Constructor Detail

constructFamilyBeacon

public constructFamilyBeacon(interagents.finalWrapper in,
                             interagents.finalWrapper out,
                             fundamentals.EuArguments args,
                             int beacon,
                             java.lang.String inmodes,
                             java.lang.String outmodes)
                      throws DesignException
This constructor tries, given full information for a LEA program, to find an input and an output mode and checks that no arguments are passed.

Parameters:
in - the input @see finalWrapper
out - the output @see finalWrapper
args - arguments
beacon - a beacon, or 0 if no such was requested

constructFamilyBeacon

public constructFamilyBeacon(java.util.Vector inputs,
                             java.util.Vector results,
                             java.util.Vector newResults,
                             interagents.EuLab lab,
                             java.lang.String inmodes,
                             java.lang.String outmodes)
                      throws LeaException
This constructor creates, given a selection of objects from a user, a move which the user may elect to perform. The constructor may end in exception if not all criteria for the move are met.

Parameters:
lab - the current EuLab
Method Detail

refineConstructs

protected void refineConstructs(interagents.joinedWrapper findings,
                                interagents.EuLab lab)
                         throws LeaException
Description copied from class: constructFamily
Does nothing, but is overwritten in constructFamilyWithBeacon

Overrides:
refineConstructs in class constructFamily
LeaException

weeder

protected void weeder(interagents.joinedWrapper findings,
                      int n,
                      interagents.EuLab lab)
               throws LeaException
Weeds among constructed points.

Parameters:
findings - a joinedWrapper
n - the number of objects desired after weeding (1 or 2)
lab - the EuLab with which to weed
LeaException

issueBeacon

protected void issueBeacon(interagents.finalWrapper preout,
                           interagents.EuLab lab)
                    throws LeaException
Finds a beacon that distinguishes. Updates beacon, forgets entries if a special was requested, updates input in case of beacons CLOSE, FAR, CCW, CW

Overrides:
issueBeacon in class EuMove
Parameters:
lab - the current EuLab
LeaException

initBeacon

protected void initBeacon(int beacon)
                   throws DesignException
Initializes beacon, throwing a DesignException if beacon unexpected This instance will accept beacons, leaving to iobUsageChecks() to check their relevance

Overrides:
initBeacon in class EuMove
Parameters:
beacon - an integer representing the requested beacon, or 0 if no beacon requested
Throws:
DesignException - if beacon unexpected

iobUsageChecks

protected boolean iobUsageChecks()
Does various checks to see that the conditions described in the field Input/output/beacon usage of the description of the LEA commands are in fact met.

Overrides:
iobUsageChecks in class EuMove
Returns:
true if no problem encountered

passExceptionDetails

public void passExceptionDetails(exceptions.LeaException le)
Overrides:
passExceptionDetails in class EuMove

toString

public java.lang.String toString()
Document the move

Overrides:
toString in class EuMove
Returns:
a string in the format exemplified by (L2,C4)>>>FindIntersection[new]>>(P6!)