|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.sns.xal.model.gen.SequenceGenerator
This class build model sequences (Sector objects) from
the hardware representation given by AcceleratorSeq objects.
Note that Sector objects may be nested within each other
to arbitrary order.
A proxy tree is built (@see gov.sns.xal.model.gen.ptree) which breaks the
hardware into nested sequences hardware components and subcomponents
that have model representations. The SequenceGenerator class
implements the IProxyVisitor interface, which means it is
a visitor class of the proxy tree.
| Constructor Summary | |
SequenceGenerator()
|
|
| Method Summary | |
static Sector |
buildModelSector(AcceleratorSeq smfSeq)
Build and return an Sector sequence object
that models the given hardware represented by the
AcceleratorSeq argument. |
Sector |
genModelSector(AcceleratorSeq smfSeq)
Build and return an Sector sequence object
that models the given hardware represented by the
AcceleratorSeq argument. |
void |
leaving(ProxyTree pxyNode)
Catch the end of processing event for a ProxyTree node. |
void |
process(DriftSpace pxyNode)
Accept a proxy-tree node of type DriftSpace and perform
any visitor specific processing of the node argument. |
void |
process(ProxyTree pxyNode)
Begin building a (Sub)sequence of model elements. |
void |
process(ThickHardware pxyNode)
Process a ThickHardware node of the proxy tree. |
void |
process(ThinHardware pxyNode)
Process a ThinHardware node of the proxy tree. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SequenceGenerator()
| Method Detail |
public static Sector buildModelSector(AcceleratorSeq smfSeq)
throws GenerationException
Sector sequence object
that models the given hardware represented by the
AcceleratorSeq argument.
smfSeq - hardware reference to be modeled
GenerationException - unable to build model
public Sector genModelSector(AcceleratorSeq smfSeq)
throws GenerationException
Sector sequence object
that models the given hardware represented by the
AcceleratorSeq argument.
smfSeq - hardware reference to be modeled
GenerationException - unable to build model
public void process(ThinHardware pxyNode)
throws GenerationException
ThinHardware node of the proxy tree. Check if
node is a leaf in the tree then build a modeling element and initiate
synchronization if so.
process in interface IProxyVisitorpxyNode - ThinHardware proxy-tree node
GenerationException - unable to process node (visitor specific)IProxyVisitor.process(gov.sns.xal.model.gen.ptree.ThinHardware)
public void process(ThickHardware pxyNode)
throws GenerationException
ThickHardware node of the proxy tree. Check if
node is a leaf in the tree then build a modeling element and initiate
synchronization if so.
process in interface IProxyVisitorpxyNode - ThickHardware proxy-tree node
GenerationException - unable to process node (visitor specific)IProxyVisitor.process(gov.sns.xal.model.gen.ptree.ThickHardware)
public void process(DriftSpace pxyNode)
throws GenerationException
IProxyVisitorDriftSpace and perform
any visitor specific processing of the node argument.
process in interface IProxyVisitorpxyNode -
GenerationException - unable to process node (visitor specific)IProxyVisitor.process(gov.sns.xal.model.gen.ptree.DriftSpace)
public void process(ProxyTree pxyNode)
throws GenerationException
ProxyTree node in the proxy tree object which indicates
a child sequence. We must create a new Sector object
and push it onto the sequence stack as the current sequence under
construction. If this is the first time this method is called on the
proxy tree we must set the newly created Sector object
as the master sequence for the tree.
process in interface IProxyVisitorpxyNode - ProxyTree object representing an AcceleratorSeq object
GenerationException - unable to process node (visitor specific)IProxyVisitor.process(gov.sns.xal.model.gen.ptree.ProxyTree)
public void leaving(ProxyTree pxyNode)
throws GenerationException
ProxyTree node.
We must pop the sequence stack to return to the building of the previous
Sector object.
leaving in interface IProxyVisitorpxyNode - dummy argument indicatin we are leaving a ProxyTree object
GenerationException - must have been a sequence stack crashIProxyVisitor.leaving(gov.sns.xal.model.gen.ptree.ProxyTree)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||