}
public override void visit_error_code (ErrorCode item) {
+ process_node (item);
}
public override void visit_enum_value (Api.EnumValue item) {
+ process_node (item);
}
public override void visit_delegate (Delegate item) {
api/signaturebuilder.vala \
api/struct.vala \
api/symbol.vala \
- api/symbolaccessibility.vala \
api/tree.vala \
api/typeparameter.vala \
api/typereference.vala \
base (symbol, parent);
}
+ public override bool is_public {
+ get {
+ return ((Enum)parent).is_public;
+ }
+ }
+
+ public override bool is_protected {
+ get {
+ return ((Enum)parent).is_protected;
+ }
+ }
+
+ public override bool is_internal {
+ get {
+ return ((Enum)parent).is_internal;
+ }
+ }
+
+ public override bool is_private {
+ get {
+ return ((Enum)parent).is_private;
+ }
+ }
+
protected override void process_comments (Settings settings, DocumentationParser parser) {
var source_comment = ((Vala.EnumValue) symbol).comment;
if (source_comment != null) {
}
protected override Inline build_signature () {
- return new SignatureBuilder ()
- .append_symbol (this)
- .append ("=")
- .append (((Vala.EnumValue) symbol).value.to_string ())
- .get ();
+ var builder = new SignatureBuilder ()
+ .append_symbol (this);
+
+ if (((Vala.EnumValue) symbol).value != null) {
+ builder.append ("=")
+ .append (((Vala.EnumValue) symbol).value.to_string ());
+ }
+
+ return builder.get ();
}
}
base (symbol, parent);
}
+ public override bool is_public {
+ get {
+ return ((ErrorDomain)parent).is_public;
+ }
+ }
+
+ public override bool is_protected {
+ get {
+ return ((ErrorDomain)parent).is_protected;
+ }
+ }
+
+ public override bool is_internal {
+ get {
+ return ((ErrorDomain)parent).is_internal;
+ }
+ }
+
+ public override bool is_private {
+ get {
+ return ((ErrorDomain)parent).is_private;
+ }
+ }
+
public string get_cname () {
return ((Vala.ErrorCode) symbol).get_cname ();
}
using Gee;
-public abstract class Valadoc.Api.Symbol : Node, SymbolAccessibility {
+public abstract class Valadoc.Api.Symbol : Node {
protected Vala.Symbol symbol { private set; get; }
return true;
}
- public bool is_public {
+ public virtual bool is_public {
get {
return symbol.access == Vala.SymbolAccessibility.PUBLIC;
}
}
- public bool is_protected {
+ public virtual bool is_protected {
get {
return symbol.access == Vala.SymbolAccessibility.PROTECTED;
}
}
- public bool is_internal {
+ public virtual bool is_internal {
get {
return symbol.access == Vala.SymbolAccessibility.INTERNAL;
}
}
- public bool is_private {
+ public virtual bool is_private {
get {
return symbol.access == Vala.SymbolAccessibility.PRIVATE;
}
+++ /dev/null
-/* symbolaccessibility.vala
- *
- * Copyright (C) 2008 Florian Brosch
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Author:
- * Florian Brosch <flo.brosch@gmail.com>
- */
-
-using Gee;
-
-public interface Valadoc.Api.SymbolAccessibility {
-
- public abstract bool is_public { get; }
-
- public abstract bool is_protected { get; }
-
- public abstract bool is_internal { get; }
-
- public abstract bool is_private { get; }
-}
-
|| node is Class
|| node is Struct
|| node is Enum
- || node is ErrorDomain;
+ || node is Api.EnumValue
+ || node is ErrorDomain
+ || node is ErrorCode;
}
public void write_navi_packages_inline (Api.Tree tree) {
Api.NodeType.CONSTANT
})) {
writer.start_tag ("h2", {"class", css_title}).text ("Content:").end_tag ("h2");
- write_children_table (node, Api.NodeType.ERROR_CODE, "Error codes");
- write_children_table (node, Api.NodeType.ENUM_VALUE, "Enum values");
+ write_children (node, Api.NodeType.ERROR_CODE, "Error codes", node);
+ write_children (node, Api.NodeType.ENUM_VALUE, "Enum values", node);
write_children (node, Api.NodeType.CLASS, "Classes", node);
write_children (node, Api.NodeType.STRUCT, "Structs", node);
write_children (node, Api.NodeType.ENUM, "Enums", node);
}
}
- private void write_children_table (Api.Node node, Api.NodeType type, string type_string) {
- Gee.Collection<Api.Node> children = node.get_children_by_type (Api.NodeType.ENUM_VALUE);
- if (children.size > 0) {
- writer.start_tag ("h3", {"class", css_title}).text (type_string).text (":").end_tag ("h3");
- writer.start_tag ("table", {"class", get_html_css_class (node)});
- foreach (Api.Node child in children) {
- writer.start_tag ("tr");
- writer.start_tag ("td", {"class", get_html_css_class (child), "id", child.name});
- writer.text (child.name);
- writer.end_tag ("td");
-
- writer.start_tag ("td");
- this.write_documentation (child, node);
- writer.end_tag ("td");
-
- writer.end_tag ("tr");
- }
- writer.end_tag ("table");
- }
- }
-
protected void write_image_block (Api.Node element) {
if (!(element is Class || element is Interface || element is Struct)) {
return;