From: Jürg Billeter Date: Fri, 7 Jul 2006 08:17:47 +0000 (+0000) Subject: add interface documentation, use implicit namespace specification X-Git-Tag: VALA_0_0_1~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=235eba7a4e65a40a16c3d3ab05c44a9fa6a0d71f;p=thirdparty%2Fvala.git add interface documentation, use implicit namespace specification 2006-07-07 Jürg Billeter * vala/valaconstructor.vala, vala/valacontinuestatement.vala, vala/valadeclarationstatement.vala, vala/valadestructor.vala: add interface documentation, use implicit namespace specification svn path=/trunk/; revision=69 --- diff --git a/vala/ChangeLog b/vala/ChangeLog index de43c0121..fa2daee13 100644 --- a/vala/ChangeLog +++ b/vala/ChangeLog @@ -1,3 +1,9 @@ +2006-07-07 Jürg Billeter + + * 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 * vala/valacodecontext.vala: use continue statements to decrease diff --git a/vala/vala/valaconstructor.vala b/vala/vala/valaconstructor.vala index 1fbf94eaf..6632453e0 100644 --- a/vala/vala/valaconstructor.vala +++ b/vala/vala/valaconstructor.vala @@ -22,23 +22,46 @@ 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); } } diff --git a/vala/vala/valacontinuestatement.vala b/vala/vala/valacontinuestatement.vala index fa7c8456f..a39edabde 100644 --- a/vala/vala/valacontinuestatement.vala +++ b/vala/vala/valacontinuestatement.vala @@ -22,14 +22,21 @@ 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); } } diff --git a/vala/vala/valadeclarationstatement.vala b/vala/vala/valadeclarationstatement.vala index 1339e57e4..ffcb748be 100644 --- a/vala/vala/valadeclarationstatement.vala +++ b/vala/vala/valadeclarationstatement.vala @@ -22,18 +22,29 @@ 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); } } diff --git a/vala/vala/valadestructor.vala b/vala/vala/valadestructor.vala index 04a590a75..dc19e3a85 100644 --- a/vala/vala/valadestructor.vala +++ b/vala/vala/valadestructor.vala @@ -22,23 +22,46 @@ 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); } }