|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttemplates.operations.EventSynchronizer
public class EventSynchronizer
Implements operations commonly employed by the other template design operations.
| Constructor Summary | |
|---|---|
EventSynchronizer()
|
|
| Method Summary | |
|---|---|
protected static long[] |
getEventPointer(java.lang.String name)
Retrieve the ids of the template design component and the event in the underlying model from the unique event name string generated by getUniqueEventName(TemplateComponent, long). |
protected static java.lang.String |
getUniqueEventName(TemplateComponent c,
long eventId)
Generate a unique event name string for the given event. |
static void |
label4Humans(TemplateModel model,
java.util.Collection<ides.api.model.fsa.FSAModel> fsas)
Relabel the events of the outputs of synchronizeAndCompose(TemplateModel, Collection, Collection)
with names which are human-readable. |
static ides.api.model.fsa.FSAModel[] |
synchronizeAndCompose(TemplateModel model,
java.util.Collection<TemplateComponent> modules,
java.util.Collection<TemplateComponent> channels)
Composes a list of modules and synchronizes and composes a list of channels. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EventSynchronizer()
| Method Detail |
|---|
public static ides.api.model.fsa.FSAModel[] synchronizeAndCompose(TemplateModel model,
java.util.Collection<TemplateComponent> modules,
java.util.Collection<TemplateComponent> channels)
Note: as different modules may have the same event names (and as all
alphabets are assumed to be disjunct), the event names in the outputs are
replaced with unique strings. To convert these unique string to a
human-readable form, use label4Humans(TemplateModel, Collection).
model - the template model containing the modules and channelsmodules - the modules to be composedchannels - the channels to be synchronized and composed
FSAModels; the first model is the
composition of the given modules; the second model is the
composition of the synchronized versions of the given channels
(if no channels were given, the second model is a single-state
automaton where all events are self-looped)
java.lang.IllegalArgumentException - when the list of modules is emptylabel4Humans(TemplateModel, Collection)
public static void label4Humans(TemplateModel model,
java.util.Collection<ides.api.model.fsa.FSAModel> fsas)
synchronizeAndCompose(TemplateModel, Collection, Collection)
with names which are human-readable. The existing labels are assumed to
be unique string identifiers as generated by
synchronizeAndCompose(TemplateModel, Collection, Collection).
This method may produce unexpected results if the template design has
been modified in between the invocations of
synchronizeAndCompose(TemplateModel, Collection, Collection) and
this method.
model - the template design containing the inputs to
synchronizeAndCompose(TemplateModel, Collection, Collection)fsas - the outputs of
synchronizeAndCompose(TemplateModel, Collection, Collection)synchronizeAndCompose(TemplateModel, Collection, Collection)
protected static java.lang.String getUniqueEventName(TemplateComponent c,
long eventId)
c - the template design componenteventId - the id of the event in the underlying model of the given
component
protected static long[] getEventPointer(java.lang.String name)
getUniqueEventName(TemplateComponent, long).
name - the unique event name
TemplateComponent
and the id of the event in the underlying model of the
TemplateComponent.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||