From de6df4ba3bbbd19094c0245284bff529c94608f2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Christophe=20Beaupr=C3=A9?= Date: Fri, 28 Nov 2014 12:09:56 -0500 Subject: [PATCH] neo_doxygen: Add missing documentation. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jean-Christophe Beaupré --- contrib/neo_doxygen/src/doxml/compounddef.nit | 2 ++ contrib/neo_doxygen/src/doxml/doc.nit | 1 + contrib/neo_doxygen/src/doxml/listener.nit | 7 +++++++ contrib/neo_doxygen/src/model/class_compound.nit | 1 + contrib/neo_doxygen/src/model/graph.nit | 3 +++ contrib/neo_doxygen/src/model/member.nit | 21 ++++++++++++++++++++ contrib/neo_doxygen/src/tests/neo_doxygen_dump.nit | 3 +++ 7 files changed, 38 insertions(+) diff --git a/contrib/neo_doxygen/src/doxml/compounddef.nit b/contrib/neo_doxygen/src/doxml/compounddef.nit index 4cd42ca..64a301d 100644 --- a/contrib/neo_doxygen/src/doxml/compounddef.nit +++ b/contrib/neo_doxygen/src/doxml/compounddef.nit @@ -22,7 +22,9 @@ import more_collections class CompoundDefListener super EntityDefListener + # The defined compound. var compound: Compound is writable, noinit + private var memberdef: MemberDefListener is noinit private var param_listener: TypeParamListener is noinit diff --git a/contrib/neo_doxygen/src/doxml/doc.nit b/contrib/neo_doxygen/src/doxml/doc.nit index e934bab..da9f09e 100644 --- a/contrib/neo_doxygen/src/doxml/doc.nit +++ b/contrib/neo_doxygen/src/doxml/doc.nit @@ -21,6 +21,7 @@ import listener class DocListener super TextListener + # The read documentation. var doc = new JsonArray is writable redef fun end_listening do diff --git a/contrib/neo_doxygen/src/doxml/listener.nit b/contrib/neo_doxygen/src/doxml/listener.nit index 26de0d2..40d021f 100644 --- a/contrib/neo_doxygen/src/doxml/listener.nit +++ b/contrib/neo_doxygen/src/doxml/listener.nit @@ -36,6 +36,7 @@ abstract class DoxmlListener self.locator = locator end + # The Doxygen’s namespace IRI. protected fun dox_uri: String do return "" redef fun start_element(uri: String, local_name: String, qname: String, @@ -61,6 +62,9 @@ abstract class DoxmlListener # See `ContentHandler.start_element` for the description of the parameters. protected fun end_dox_element(local_name: String) do end + # Get the boolean value of the specified attribute. + # + # `false` by default. protected fun get_bool(atts: Attributes, local_name: String): Bool do return get_optional(atts, local_name, "no") == "yes" end @@ -197,7 +201,10 @@ end class TextListener super StackableListener + # The read text. protected var buffer: Buffer = new FlatBuffer + + # Is the last read chunk was ignorable white space? private var sp: Bool = false redef fun listen_until(uri: String, local_name: String) do diff --git a/contrib/neo_doxygen/src/model/class_compound.nit b/contrib/neo_doxygen/src/model/class_compound.nit index 5c7e061..dd73976 100644 --- a/contrib/neo_doxygen/src/model/class_compound.nit +++ b/contrib/neo_doxygen/src/model/class_compound.nit @@ -210,6 +210,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 diff --git a/contrib/neo_doxygen/src/model/graph.nit b/contrib/neo_doxygen/src/model/graph.nit index 4481b2e..43edfa4 100644 --- a/contrib/neo_doxygen/src/model/graph.nit +++ b/contrib/neo_doxygen/src/model/graph.nit @@ -20,7 +20,10 @@ import location # A Neo4j graph. class NeoGraph + # All the nodes in the graph. var all_nodes: SimpleCollection[NeoNode] = new Array[NeoNode] + + # All the edges in the graph. var all_edges: SimpleCollection[NeoEdge] = new Array[NeoEdge] # Add a relationship between two nodes. diff --git a/contrib/neo_doxygen/src/model/member.nit b/contrib/neo_doxygen/src/model/member.nit index f29892e..58c25a4 100644 --- a/contrib/neo_doxygen/src/model/member.nit +++ b/contrib/neo_doxygen/src/model/member.nit @@ -92,6 +92,15 @@ abstract class Member end end + # Get the visibility. + # + # Return `""` by default. + fun visibility: String do + var visibility = self["visibility"] + if visibility isa String then return visibility + return "" + end + redef fun name=(name: String) do super if introducer != null then @@ -174,6 +183,7 @@ class UnknownMember redef fun put_edges do end end +# A local definition of a method. class Method super Member @@ -216,6 +226,7 @@ class Method end end +# A local definition of an attribute. class Attribute super Member @@ -256,9 +267,19 @@ abstract class MemberIntroducer self["visibility"] = "public" end + # Set the visibility. fun visibility=(visibility: String) do self["visibility"] = visibility end + + # Get the visibility. + # + # Return `""` by default. + fun visibility: String do + var visibility = self["visibility"] + if visibility isa String then return visibility + return "" + end end # A `MProperty` node for a method. diff --git a/contrib/neo_doxygen/src/tests/neo_doxygen_dump.nit b/contrib/neo_doxygen/src/tests/neo_doxygen_dump.nit index 326a030..f52cd01 100644 --- a/contrib/neo_doxygen/src/tests/neo_doxygen_dump.nit +++ b/contrib/neo_doxygen/src/tests/neo_doxygen_dump.nit @@ -36,6 +36,9 @@ redef class NeoDoxygenCommand redef fun create_store(url) do return new DebugStore end +# Dummy storage medium that write a debugging output to the standard output. +# +# For testing purposes only. class DebugStore super GraphStore -- 1.7.9.5