Github

Download version 1.4.8: Windows or Linux

Text Library: Evolicity Text Substitution Engine

Evolicity is a text substitution language that was inspired by the Velocity text substitution language for Java. Evolicity provides a way to merge the data from Eiffel objects into a text template. The template can be either supplied externally or hard-coded into an Eiffel class. The language includes, substitution variables, conditional statements and loops. Substitution variables have a BASH like syntax. Conditionals and loops have an Eiffel like syntax.

The text of this web page was generated by the Eiffel-view repository publisher using the following combination of Evolicity templates:

  1. doc-config/main-template.html.evol
  2. doc-config/site-map-content.html.evol
  3. doc-config/directory-tree-content.html.evol
  4. doc-config/eiffel-source-code.html.evol

To make an Eiffel class serializable with Evolicity you inherit from class EVOLICITY_SERIALIZEABLE. Read the class notes for details on how to use. You can also access the substitution engine directly from the shared instance in class EL_MODULE_EVOLICITY_TEMPLATES

Features

ECF: evolicity.ecf

Directory: library/text/template/evolicity

[ . ]

. /directives

. /expressions

. /expressions/boolean

. /expressions/comparison

. /serialization

. /support

[ . ]

EL_MODULE_EVOLICITY_TEMPLATES

Provides global access to the Evolicity template substitution engine.

The templating substitution language was named "Evolicity" as a portmanteau of "Evolve" and "Felicity" which is also a partial anagram of "Velocity" the Apache project which inspired it. It also bows to an established tradition of naming Eiffel orientated projects starting with the letter 'E'.

EVOLICITY_TEMPLATES

Top level class for Evolicity accessible though EL_MODULE_EVOLICITY_TEMPLATES

The templating substitution language was named Evolicity as a portmanteau of "Evolve" and "Felicity" which is also a partial anagram of "Velocity" the Apache project which inspired it. It also bows to an established tradition of naming Eiffel orientated projects starting with the letter 'E'.

EVOLICITY_COMPILER

EVOLICITY_FILE_LEXER

directives

EVOLICITY_ACROSS_DIRECTIVE

across loop duplicating Eiffel syntax

EVOLICITY_FOREACH_DIRECTIVE

Syntax for looping over a sequence:

#foreach <iteration object variable name> in <sequence name> loop

#end

The iteration object variable name references the current sequence item. Variable 'loop_index' references the sequence index

EVOLICITY_COMPILED_TEMPLATE

EVOLICITY_COMPOUND_DIRECTIVE

EVOLICITY_DIRECTIVE

EVOLICITY_EVALUATE_DIRECTIVE

EVOLICITY_FREE_TEXT_DIRECTIVE

EVOLICITY_IF_ELSE_DIRECTIVE

EVOLICITY_INCLUDE_DIRECTIVE

EVOLICITY_NESTED_TEMPLATE_DIRECTIVE

EVOLICITY_VARIABLE_SUBST_DIRECTIVE

expressions

EVOLICITY_COMPARABLE

EVOLICITY_COMPARABLE_VARIABLE

EVOLICITY_DOUBLE_COMPARABLE

EVOLICITY_EXPRESSION

EVOLICITY_INTEGER_64_COMPARABLE

EVOLICITY_NUMERIC_EXPRESSION

EVOLICITY_REFERENCE_EXPRESSION

expressions/boolean

EVOLICITY_BOOLEAN_AND_EXPRESSION

EVOLICITY_BOOLEAN_CONJUNCTION_EXPRESSION

EVOLICITY_BOOLEAN_EXPRESSION

EVOLICITY_BOOLEAN_NOT_EXPRESSION

EVOLICITY_BOOLEAN_OR_EXPRESSION

EVOLICITY_BOOLEAN_REFERENCE_EXPRESSION

expressions/comparison

EVOLICITY_COMPARISON

EVOLICITY_EQUAL_TO_COMPARISON

EVOLICITY_GREATER_THAN_COMPARISON

EVOLICITY_LESS_THAN_COMPARISON

serialization

EVOLICITY_CACHEABLE_SERIALIZEABLE

Caches the substituted output

EVOLICITY_SERIALIZEABLE

Classes which inherit from EVOLICITY_SERIALIZEABLE can be serialized as text files using an Evolicity template. A template contains a mixture of literal text and Evolicity code that outputs data from Eiffel objects. The template can be an either an external file or hard coded in the class by implementing the function template: READABLE_STRING_GENERAL.

Further Information

Click on class link to see notes.

EVOLICITY_CACHEABLE_SERIALIZEABLE_AS_XML

EVOLICITY_SERIALIZEABLE_AS_XML

EVOLICITY_SERIALIZEABLE_TEXT_VALUE

support

EVOLICITY_CACHEABLE

Facility to cache conversion text

EVOLICITY_CONTEXT_IMP

A createable Evolicity context where you add variables in the following ways:

EVOLICITY_LOCALIZED_VARIABLES

Helper class to translate variable text-values which have a localization translation id of the form "{$<variable-name>}" where $<variable-name> corresponds to a template substitution variable.

Variable_translation_keys returns all localization identifiers which match that pattern.

translated_variables_tables can be merged with getter_function_table in an Evolicity context.

EVOLICITY_TEMPLATE_STACK_TABLE

Stacks of templates to enable use of recursive templates

EVOLICITY_CONTEXT

EVOLICITY_EIFFEL_CONTEXT

Click on class link to see client examples.

EVOLICITY_FUNCTION_REFERENCE

EVOLICITY_OBJECT_TABLE

EVOLICITY_TOKENS

EVOLICITY_VARIABLE_REFERENCE

EVOLICITY_XML_VALUE