moves
Class constructFamily

java.lang.Object
  |
  +--moves.EuMove
        |
        +--moves.constructFamily
Direct Known Subclasses:
ConstructCircle, constructFamilyBeacon, constructFamilyRandom, ConstructInterval, ConstructLine, SetRadius

public abstract class constructFamily
extends EuMove

This abstract class is behind all the LEA moves AddCenter, AddFull, CastAsInterval, ConstructCircle, ConstructLine, SetRadius. It will extend also to the abstract class constructFamilyWithBeacon which is in turn behind AddEnds, Call, CastAsArc, CastAsHalfLine and FindIntersection. These moves are characterized by the following properties:


Field Summary
 
Fields inherited from class moves.EuMove
allowedSegments, in, out
 
Constructor Summary
constructFamily(interagents.finalWrapper in, interagents.finalWrapper out, fundamentals.EuArguments args, int beacon, java.lang.String inmodes, java.lang.String outmodes)
          This constructor checks syntax, given full information from a LEA program.
constructFamily(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 ex(interagents.EuLab lab)
          Performs the constructions and resolves output, identical in main and macro mode
protected  void findAllConstructs(interagents.explicitHolder results, interagents.EuLab lab)
          Does all constructions and places them in the provided explicitHolder.
protected  void issueBeacon(interagents.joinedWrapper findings, interagents.EuLab lab)
          Does nothing, but is overwritten in constructFamilyWithBeacon
protected  int postprocess(interagents.EuLab lab, librarian.ppProcessor ppp)
          Performs various postprocessing of the move, updating the ppProcessor if necessary.
protected  void refineConstructs(interagents.joinedWrapper findings, interagents.EuLab lab)
          Does nothing, but is overwritten in constructFamilyWithBeacon
 
Methods inherited from class moves.EuMove
checkSegment, executeMacro, executeMain, executeSegmentOnly, exMacro, exMain, getFirstOutIndex, initArguments, initBeacon, iobUsageChecks, issueBeacon, name, operationName, passExceptionDetails, passHintDetails, passSelection, postMacro, postMain, preMacro, preMain, preprocess, specialSegmentOK, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

constructFamily

public constructFamily(interagents.finalWrapper in,
                       interagents.finalWrapper out,
                       fundamentals.EuArguments args,
                       int beacon,
                       java.lang.String inmodes,
                       java.lang.String outmodes)
                throws DesignException
This constructor checks syntax, given full information from a LEA program.

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

constructFamily

public constructFamily(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

ex

protected void ex(interagents.EuLab lab)
           throws LeaException
Performs the constructions and resolves output, identical in main and macro mode

Overrides:
ex in class EuMove
Parameters:
lab - the EuLab in which to put the constructions and get the objects to perform them
LeaException

findAllConstructs

protected void findAllConstructs(interagents.explicitHolder results,
                                 interagents.EuLab lab)
                          throws LeaException
Does all constructions and places them in the provided explicitHolder. Must be overwritten for effect

Parameters:
results - an explicitHolder
lab - the EuLab in which to get the objects with which to construct
Throws:
LeaRuntimeException - if problems in construction
LeaException

refineConstructs

protected void refineConstructs(interagents.joinedWrapper findings,
                                interagents.EuLab lab)
                         throws LeaException
Does nothing, but is overwritten in constructFamilyWithBeacon

LeaException

issueBeacon

protected void issueBeacon(interagents.joinedWrapper findings,
                           interagents.EuLab lab)
                    throws LeaException
Does nothing, but is overwritten in constructFamilyWithBeacon

Parameters:
findings - a joinedWrapper with the found objects
lab - the current EuLab
LeaException

postprocess

protected int postprocess(interagents.EuLab lab,
                          librarian.ppProcessor ppp)
                   throws LeaException
Performs various postprocessing of the move, updating the ppProcessor if necessary. The actions may be segment-dependent. In this instance the history function of the ppProcessor is updated, and the status of newly constructed objects is updated.

Overrides:
postprocess in class EuMove
Parameters:
ppp - the ppProcessor to be updated
Returns:
the new segment
LeaException