2006-07-07 Jürg Billeter <j@bitron.ch>
+ * vala/valaconstructor.vala, vala/valacontinuestatement.vala,
+ vala/valadeclarationstatement.vala, vala/valadestructor.vala: add
+ interface documentation, use implicit namespace specification
+
+2006-07-07 Jürg Billeter <j@bitron.ch>
+
* vala/valacodecontext.vala: use continue statements to decrease
indentation levels
* vala/valasymbolbuilder.vala, vala/valasymbolresolver.vala,
using GLib;
-namespace Vala {
- public class Constructor : CodeNode {
- public Statement body { get; construct; }
- public bool instance = true;
-
- public static ref Constructor new (SourceReference source) {
- return (new Constructor (source_reference = source));
+/**
+ * Represents a class or instance constructor.
+ */
+public class Vala.Constructor : CodeNode {
+ /**
+ * The body of this constructor.
+ */
+ public Statement body { get; set; }
+
+ private bool _instance = true;
+
+ /**
+ * Specifies whether this is an instance or a class constructor.
+ */
+ public bool instance {
+ get {
+ return _instance;
}
+ set {
+ _instance = value;
+ }
+ }
+
+ /**
+ * Creates a new constructor.
+ *
+ * @param source reference to source code
+ * @return newly created constructor
+ */
+ public static ref Constructor! new (SourceReference source) {
+ return (new Constructor (source_reference = source));
+ }
+
+ public override void accept (CodeVisitor! visitor) {
+ visitor.visit_begin_constructor (this);
- public override void accept (CodeVisitor visitor) {
- visitor.visit_begin_constructor (this);
-
- if (body != null) {
- body.accept (visitor);
- }
-
- visitor.visit_end_constructor (this);
+ if (body != null) {
+ body.accept (visitor);
}
+
+ visitor.visit_end_constructor (this);
}
}
using GLib;
-namespace Vala {
- public class ContinueStatement : Statement {
- public static ref ContinueStatement new (SourceReference source) {
- return (new ContinueStatement (source_reference = source));
- }
-
- public override void accept (CodeVisitor visitor) {
- visitor.visit_continue_statement (this);
- }
+/**
+ * Represents a continue statement in the source code.
+ */
+public class Vala.ContinueStatement : Statement {
+ /**
+ * Creates a new continue statement.
+ *
+ * @param source reference to source code
+ * @return newly created continue statement
+ */
+ public static ref ContinueStatement! new (SourceReference source) {
+ return (new ContinueStatement (source_reference = source));
+ }
+
+ public override void accept (CodeVisitor! visitor) {
+ visitor.visit_continue_statement (this);
}
}
using GLib;
-namespace Vala {
- public class DeclarationStatement : Statement {
- public LocalVariableDeclaration declaration { get; construct; }
+/**
+ * Represents a local variable declaration statement in the source code.
+ */
+public class Vala.DeclarationStatement : Statement {
+ /**
+ * The local variable declaration.
+ */
+ public LocalVariableDeclaration! declaration { get; set construct; }
- public static ref DeclarationStatement new (LocalVariableDeclaration decl, SourceReference source) {
- return (new DeclarationStatement (declaration = decl, source_reference = source));
- }
-
- public override void accept (CodeVisitor visitor) {
- declaration.accept (visitor);
-
- visitor.visit_declaration_statement (this);
- }
+ /**
+ * Creates a new declaration statement.
+ *
+ * @param decl local variable declaration
+ * @param source reference to source code
+ * @return newly created declaration statement
+ */
+ public static ref DeclarationStatement! new (LocalVariableDeclaration! decl, SourceReference source) {
+ return (new DeclarationStatement (declaration = decl, source_reference = source));
+ }
+
+ public override void accept (CodeVisitor! visitor) {
+ declaration.accept (visitor);
+
+ visitor.visit_declaration_statement (this);
}
}
using GLib;
-namespace Vala {
- public class Destructor : CodeNode {
- public Statement body { get; construct; }
- public bool instance = true;
-
- public static ref Destructor new (SourceReference source) {
- return (new Destructor (source_reference = source));
+/**
+ * Represents a class or instance destructor.
+ */
+public class Vala.Destructor : CodeNode {
+ /**
+ * The body of this constructor.
+ */
+ public Statement body { get; set; }
+
+ private bool _instance = true;
+
+ /**
+ * Specifies whether this is an instance or a class destructor.
+ */
+ public bool instance {
+ get {
+ return _instance;
}
+ set {
+ _instance = value;
+ }
+ }
+
+ /**
+ * Creates a new destructor.
+ *
+ * @param source reference to source code
+ * @return newly created destructor
+ */
+ public static ref Destructor! new (SourceReference source) {
+ return (new Destructor (source_reference = source));
+ }
+
+ public override void accept (CodeVisitor! visitor) {
+ visitor.visit_begin_destructor (this);
- public override void accept (CodeVisitor visitor) {
- visitor.visit_begin_destructor (this);
-
- if (body != null) {
- body.accept (visitor);
- }
-
- visitor.visit_end_destructor (this);
+ if (body != null) {
+ body.accept (visitor);
}
+
+ visitor.visit_end_destructor (this);
}
}