Class TemplateModel
- All Implemented Interfaces:
IModel
- Since:
- 3.0.0
- Author:
- Daniel Fernández
-
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(IModelVisitor visitor) Accept a visitor implementingIModelVisitor.final voidadd(ITemplateEvent event) Adds an event at the end of the sequence.final voidAdd an entire model at the end of the sequence.final IModelClones the model and all its events.final ITemplateEventget(int pos) Retrieves a specific event from the model sequence.final IEngineConfigurationReturns the engine configuration that was used for creating this model.final TemplateDatafinal TemplateModeReturns the template mode used for creating this model.final voidinsert(int pos, ITemplateEvent event) Inserts an event into a specific position in the sequence.final voidinsertModel(int pos, IModel model) Inserts an entire model into a specific position in this model's sequence.final voidremove(int pos) Remove an event from the sequence.final voidreplace(int pos, ITemplateEvent event) Replaces the event at the specified position with the one passed as argument.final voidreset()Remove all events from the model sequence.final intsize()The size of the model (number ofITemplateEventobjects contained).final StringtoString()final voidWrite this model (its events) through the specified writer.
-
Method Details
-
getTemplateData
-
getConfiguration
Description copied from interface:IModelReturns the engine configuration that was used for creating this model.
- Specified by:
getConfigurationin interfaceIModel- Returns:
- the engine configuration.
-
getTemplateMode
Description copied from interface:IModelReturns the template mode used for creating this model.
- Specified by:
getTemplateModein interfaceIModel- Returns:
- the template mode.
-
size
public final int size()Description copied from interface:IModelThe size of the model (number of
ITemplateEventobjects contained). -
get
Description copied from interface:IModelRetrieves a specific event from the model sequence.
-
add
Description copied from interface:IModelAdds an event at the end of the sequence.
-
insert
Description copied from interface:IModelInserts an event into a specific position in the sequence.
-
replace
Description copied from interface:IModelReplaces the event at the specified position with the one passed as argument.
-
addModel
Description copied from interface:IModelAdd an entire model at the end of the sequence. This effectively appends the
modelargument's sequence to this one. -
insertModel
Description copied from interface:IModelInserts an entire model into a specific position in this model's sequence.
- Specified by:
insertModelin interfaceIModel- Parameters:
pos- the position to insert the mdoel (zero-based).model- the model to be inserted.
-
remove
public final void remove(int pos) Description copied from interface:IModelRemove an event from the sequence.
-
reset
public final void reset()Description copied from interface:IModelRemove all events from the model sequence.
-
cloneModel
Description copied from interface:IModelClones the model and all its events.
- Specified by:
cloneModelin interfaceIModel- Returns:
- the new model.
-
write
Description copied from interface:IModelWrite this model (its events) through the specified writer.
- Specified by:
writein interfaceIModel- Parameters:
writer- the writer that will be used for writing the model.- Throws:
IOException- should any exception happen.
-
accept
Description copied from interface:IModelAccept a visitor implementing
IModelVisitor. This visitor will be executed for each event in the sequence. -
toString
-