class_def["mdoc"] = doc
end
- redef fun declare_super(id: String, name: String, prot: String, virt: String) do
- class_def.declare_super(id, name, prot, virt)
+ redef fun declare_super(id: String, full_name: String, prot: String, virt: String) do
+ class_def.declare_super(id, full_name, prot, virt)
end
redef fun declare_member(member: Member) do
self["is_intro"] = true
end
- fun declare_super(id: String, name: String, prot: String, virt: String) do
- # TODO prot, virt, name
+ fun declare_super(id: String, full_name: String, prot: String,
+ virt: String) do
+ # TODO prot, virt, full_name
if "" != id then
supers.add(id)
end
# Declare an inner namespace.
#
+ # Note: Althought Doxygen indicates that the name is optional,
+ # declarations with an empty name are not supported yet.
+ #
# Parameters:
#
# * `id`: `model_id` of the inner namespace. May be empty.
- # * `name`: string identifying the inner namespace. May be empty.
- fun declare_namespace(id: String, name: String) do end
+ # * `full_name`: qualified name of the inner namespace.
+ fun declare_namespace(id: String, full_name: String) do end
# Declare an inner class.
#
+ # Note: Althought Doxygen indicates that both arguments are optional,
+ # declarations with either an empty name or an empty ID are not
+ # supported yet.
+ #
# Parameters:
#
- # * `id`: `model_id` of the inner class. May be empty.
- # * `name`: string identifying the inner class. May be empty.
- fun declare_class(id: String, name: String) do end
+ # * `id`: `model_id` of the inner class.
+ # * `full_name`: qualified name of the inner class.
+ fun declare_class(id: String, full_name: String) do end
# Declare a base compound (usually, a base class).
#
# Parameters:
#
# * `id`: `model_id` of the base compound. May be empty.
- # * `name`: string identifying the base compound. May be empty.
+ # * `full_name`: qualified name of the base compound. May be empty.
# * `prot`: visibility (proctection) of the relationship.
# * `virt`: level of virtuality of the relationship.
- fun declare_super(id: String, name: String, prot: String, virt: String) do end
+ fun declare_super(id: String, full_name: String, prot: String,
+ virt: String) do end
end
# An unrecognized compound.
end
end
- redef fun declare_namespace(id: String, name: String) do
+ redef fun declare_namespace(id: String, full_name: String) do
var m: Module
- if inner_namespaces.keys.has(name) then
- m = inner_namespaces[name]
+ assert not full_name.is_empty else
+ sys.stderr.write "Inner mamespace declarations without name are not yet supported.\n"
+ end
+ if inner_namespaces.keys.has(full_name) then
+ m = inner_namespaces[full_name]
if id != "" then m.parent = id
else
m = new Module(graph)
- m.full_name = "{name}{ns_separator}{basename}"
+ m.full_name = "{full_name}{ns_separator}{basename}"
m.parent = id
m.location = self["location"].as(nullable Location)
- inner_namespaces[name] = m
+ inner_namespaces[full_name] = m
end
end
- redef fun declare_class(id: String, name: String) do
- var match = name.search_last(ns_separator)
+ redef fun declare_class(id: String, full_name: String) do
+ assert not id.is_empty else
+ sys.stderr.write "Inner class declarations without ID are not yet supported.\n"
+ end
+ assert not full_name.is_empty else
+ sys.stderr.write "Inner class declarations without name are not yet supported.\n"
+ end
+ var match = full_name.search_last(ns_separator)
var ns_name: String
var m: Module
if match == null then
ns_name = ""
else
- ns_name = name.substring(0, match.from)
+ ns_name = full_name.substring(0, match.from)
end
if inner_namespaces.keys.has(ns_name) then
m = inner_namespaces[ns_name]
declare_namespace("", ns_name)
m = inner_namespaces[ns_name]
end
- m.declare_class(id, name)
+ m.declare_class(id, full_name)
end
redef fun put_in_graph do
self.labels.add("MModule")
end
- redef fun declare_class(id: String, name: String) do
+ redef fun declare_class(id: String, full_name: String) do
+ assert not id.is_empty else
+ sys.stderr.write "Inner class declarations without ID not supported yet.\n"
+ end
inner_classes.add(id)
end