Provide a default CMS_MODULE.is_installed: BOOLEAN implementation based on storage of custom value.

Now use CMS_MODULE.is_initialized: BOOLEAN as precondition of many routines.
Instantiation of node storage is now done in NODE_MODULE and not any more in CMS_NODE_API.
CMS_NODE_API can be instantiated only by NODE_MODULE.
This commit is contained in:
2015-05-29 19:20:31 +02:00
parent b77c5cd93c
commit 70d53b3ef1
8 changed files with 105 additions and 70 deletions

View File

@@ -158,6 +158,8 @@ feature -- Query: module
t := a_type.name
if t.starts_with ("!") then
t.remove_head (1)
elseif t.starts_with ("?") then
t.remove_head (1)
end
across
setup.modules as ic
@@ -186,7 +188,12 @@ feature -- Query: module
-- Enabled module API associated with module typed `a_type'.
do
if attached module (a_type) as mod then
Result := mod.module_api
if mod.is_enabled then
if not mod.is_initialized then
mod.initialize (Current)
end
Result := mod.module_api
end
end
end