neo_doxygen: Unlink `name` and `full_name`.
[nit.git] / contrib / neo_doxygen / src / model / class_compound.nit
index 47a95f9..aca58cb 100644 (file)
@@ -50,18 +50,6 @@ class ClassCompound
                class_def.name = name
        end
 
-       redef fun full_name=(full_name: String) do
-               super
-               class_type.full_name = full_name
-               class_def.full_name = full_name
-       end
-
-       redef fun parent_name=(parent_name: String) do
-               super
-               class_type.parent_name = parent_name
-               class_def.parent_name = parent_name
-       end
-
        redef fun location=(location: nullable Location) do
                super
                class_def.location = location
@@ -109,9 +97,23 @@ end
 class ClassDef
        super CodeBlock
 
+       # The defined class.
        var class_compound: ClassCompound
+
+       # The `model_id` of the base classes.
        var supers: SimpleCollection[String] = new Array[String]
-       var members: SimpleCollection[Member] = new Array[Member]
+
+       # The set of the introduced/redefined members.
+       #
+       # Includes inner classes.
+       #
+       # Filled by `declare_member` and `declare_class`.
+       #
+       # Note: `declare_class` is defined by the `inner_class` module.
+       #
+       # SEE: `declare_member`
+       # SEE: `declare_class`
+       var members: SimpleCollection[MemberOrInner] = new Array[MemberOrInner]
 
        init do
                super
@@ -119,6 +121,14 @@ class ClassDef
                self["is_intro"] = true
        end
 
+       # Declare a base compound (usually, a base class).
+       #
+       # Parameters:
+       #
+       # * `id`: `model_id` of 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, full_name: String, prot: String,
                        virt: String) do
                # TODO prot, virt, full_name
@@ -127,29 +137,11 @@ class ClassDef
                end
        end
 
+       # Append the specified member.
        fun declare_member(member: Member) do
-               var full_name = self["full_name"]
-
-               if full_name != null then
-                       member.parent_name = full_name.to_s
-               end
                members.add(member)
        end
 
-       redef fun full_name=(full_name: String) do
-               super
-               for m in members do
-                       m.parent_name = full_name
-               end
-       end
-
-       redef fun parent_name=(parent_name: String) do
-               super
-               for m in members do
-                       m.parent_name = full_name
-               end
-       end
-
        redef fun put_edges do
                super
                graph.add_edge(self, "BOUNDTYPE", class_compound.class_type)
@@ -193,6 +185,7 @@ class ClassType
        # Return the number of arguments.
        fun arity: Int do return arguments.length
 
+       # Is the class generic?
        fun is_generic: Bool do return arity > 0
 
        redef fun put_in_graph do