LivCos
Source Code Paths
1 Introduction
2 Entity ID Management
2.1 Setting "id" Attribute
3 Code Path TODOs
1 Introduction
Some processes in the LivCos application are best explained with the source code involved.
2 Entity ID Management
The ID values of the entity elements are managed automatically. Whenever a new entity is inserted, it's ID value will be checked to be unique within the object.
2.1 Setting "id" Attribute
Set any value to an "id" attribute of a content element node (entity element).
The set-attribute event is fired. The object, containing the entity, is registered to handle this event.
First we collect the currently existing ID values with a certain prefix.
If the value already forms the ID for another entity, we create a new one and replace the original setting.
This again fires a set-attribute event.
This time it is unique and we don't need to create and set another new value.
3 Code Path TODOs
Allow to suppress return values, when it's not of any interest for the topic to explain.
TODO: Allow to name instances to be called.
TODO: Allow to document concurrent events.
TODO: Point a code walk to a specific source code revision.