Interface IModel

    • Method Detail

      • getConfiguration

        IEngineConfiguration getConfiguration()

        Returns the engine configuration that was used for creating this model.

        Returns:
        the engine configuration.
      • getTemplateMode

        TemplateMode getTemplateMode()

        Returns the template mode used for creating this model.

        Returns:
        the template mode.
      • size

        int size()

        The size of the model (number of ITemplateEvent objects contained).

        Returns:
        the size of the model.
      • get

        ITemplateEvent get​(int pos)

        Retrieves a specific event from the model sequence.

        Parameters:
        pos - the position (zero-based) of the event to be retrieved.
        Returns:
        the retrieved event.
      • add

        void add​(ITemplateEvent event)

        Adds an event at the end of the sequence.

        Parameters:
        event - the event to be added.
      • insert

        void insert​(int pos,
                    ITemplateEvent event)

        Inserts an event into a specific position in the sequence.

        Parameters:
        pos - the position to insert the event (zero-based).
        event - the event to be inserted.
      • replace

        void replace​(int pos,
                     ITemplateEvent event)

        Replaces the event at the specified position with the one passed as argument.

        Parameters:
        pos - the position of the event to be replaced (zero-based).
        event - the event to serve as replacement.
      • addModel

        void addModel​(IModel model)

        Add an entire model at the end of the sequence. This effectively appends the model argument's sequence to this one.

        Parameters:
        model - the model to be appended.
      • insertModel

        void insertModel​(int pos,
                         IModel model)

        Inserts an entire model into a specific position in this model's sequence.

        Parameters:
        pos - the position to insert the mdoel (zero-based).
        model - the model to be inserted.
      • remove

        void remove​(int pos)

        Remove an event from the sequence.

        Parameters:
        pos - the position (zero-based) of the event to be removed.
      • reset

        void reset()

        Remove all events from the model sequence.

      • cloneModel

        IModel cloneModel()

        Clones the model and all its events.

        Returns:
        the new model.
      • accept

        void accept​(IModelVisitor visitor)

        Accept a visitor implementing IModelVisitor. This visitor will be executed for each event in the sequence.

        Parameters:
        visitor - the visitor object.
      • write

        void write​(Writer writer)
            throws IOException

        Write this model (its events) through the specified writer.

        Parameters:
        writer - the writer that will be used for writing the model.
        Throws:
        IOException - should any exception happen.