Class TemplateModel
- All Implemented Interfaces:
IModel
- Since:
- 3.0.0
- Author:
- Daniel Fernández
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(IModelVisitor visitor) Accept a visitor implementingIModelVisitor
.final void
add
(ITemplateEvent event) Adds an event at the end of the sequence.final void
Add an entire model at the end of the sequence.final IModel
Clones the model and all its events.final ITemplateEvent
get
(int pos) Retrieves a specific event from the model sequence.final IEngineConfiguration
Returns the engine configuration that was used for creating this model.final TemplateData
final TemplateMode
Returns the template mode used for creating this model.final void
insert
(int pos, ITemplateEvent event) Inserts an event into a specific position in the sequence.final void
insertModel
(int pos, IModel model) Inserts an entire model into a specific position in this model's sequence.final void
remove
(int pos) Remove an event from the sequence.final void
replace
(int pos, ITemplateEvent event) Replaces the event at the specified position with the one passed as argument.final void
reset()
Remove all events from the model sequence.final int
size()
The size of the model (number ofITemplateEvent
objects contained).final String
toString()
final void
Write this model (its events) through the specified writer.
-
Method Details
-
getTemplateData
-
getConfiguration
Description copied from interface:IModel
Returns the engine configuration that was used for creating this model.
- Specified by:
getConfiguration
in interfaceIModel
- Returns:
- the engine configuration.
-
getTemplateMode
Description copied from interface:IModel
Returns the template mode used for creating this model.
- Specified by:
getTemplateMode
in interfaceIModel
- Returns:
- the template mode.
-
size
public final int size()Description copied from interface:IModel
The size of the model (number of
ITemplateEvent
objects contained). -
get
Description copied from interface:IModel
Retrieves a specific event from the model sequence.
-
add
Description copied from interface:IModel
Adds an event at the end of the sequence.
-
insert
Description copied from interface:IModel
Inserts an event into a specific position in the sequence.
-
replace
Description copied from interface:IModel
Replaces the event at the specified position with the one passed as argument.
-
addModel
Description copied from interface:IModel
Add an entire model at the end of the sequence. This effectively appends the
model
argument's sequence to this one. -
insertModel
Description copied from interface:IModel
Inserts an entire model into a specific position in this model's sequence.
- Specified by:
insertModel
in 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:IModel
Remove an event from the sequence.
-
reset
public final void reset()Description copied from interface:IModel
Remove all events from the model sequence.
-
cloneModel
Description copied from interface:IModel
Clones the model and all its events.
- Specified by:
cloneModel
in interfaceIModel
- Returns:
- the new model.
-
write
Description copied from interface:IModel
Write this model (its events) through the specified writer.
- Specified by:
write
in interfaceIModel
- Parameters:
writer
- the writer that will be used for writing the model.- Throws:
IOException
- should any exception happen.
-
accept
Description copied from interface:IModel
Accept a visitor implementing
IModelVisitor
. This visitor will be executed for each event in the sequence. -
toString
-