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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user