public abstract class Valadoc.Content.BlockContent : ContentElement {
- public Vala.List<Block> content { get { return _content; } }
-
- private Vala.List<Block> _content;
+ public Vala.List<Block> content { get; private set; }
construct {
- _content = new Vala.ArrayList<Block> ();
+ content = new Vala.ArrayList<Block> ();
}
internal BlockContent () {
public override void check (Api.Tree api_root, Api.Node container, string file_path,
ErrorReporter reporter, Settings settings)
{
- foreach (Block element in _content) {
+ foreach (Block element in content) {
element.parent = this;
element.check (api_root, container, file_path, reporter, settings);
}
}
public override void accept_children (ContentVisitor visitor) {
- foreach (Block element in _content) {
+ foreach (Block element in content) {
element.accept (visitor);
}
}
using Valadoc.Taglets;
public class Valadoc.Content.Comment : BlockContent {
- public Vala.List<Taglet> taglets { get { return _taglets; } }
- private Vala.List<Taglet> _taglets;
+ public Vala.List<Taglet> taglets { get; private set; }
private bool checked = false;
internal Comment () {
base ();
- _taglets = new Vala.ArrayList<Taglet> ();
+ taglets = new Vala.ArrayList<Taglet> ();
}
public override void configure (Settings settings, ResourceLocator locator) {
base.check (api_root, container, file_path, reporter, settings);
- foreach (Taglet element in _taglets) {
+ foreach (Taglet element in taglets) {
element.parent = this;
element.check (api_root, container, file_path, reporter, settings);
}
public override void accept_children (ContentVisitor visitor) {
base.accept_children (visitor);
- foreach (Taglet element in _taglets) {
+ foreach (Taglet element in taglets) {
element.accept (visitor);
}
}
// TODO inherit stuff if needed
- foreach (Taglet taglet in _taglets) {
+ foreach (Taglet taglet in taglets) {
if (taglet.get_type () == taglet_type) {
selected_taglets.add (taglet);
}
comment.content.add (copy);
}
- foreach (Taglet taglet in _taglets) {
+ foreach (Taglet taglet in taglets) {
Taglet copy = taglet.copy (comment) as Taglet;
comment.taglets.add (copy);
}
public abstract class Valadoc.Content.InlineContent : ContentElement {
- public Vala.List<Inline> content {
- get {
- return _content;
- }
- }
-
- private Vala.List<Inline> _content;
+ public Vala.List<Inline> content { get; private set; }
construct {
- _content = new Vala.ArrayList<Inline> ();
+ content = new Vala.ArrayList<Inline> ();
}
internal InlineContent () {
public override void check (Api.Tree api_root, Api.Node container, string file_path,
ErrorReporter reporter, Settings settings)
{
- foreach (Inline element in _content) {
+ foreach (Inline element in content) {
element.parent = this;
element.check (api_root, container, file_path, reporter, settings);
}
}
public override void accept_children (ContentVisitor visitor) {
- foreach (Inline element in _content) {
+ foreach (Inline element in content) {
element.accept (visitor);
}
}
}
internal void replace_node (Inline old, Inline replacement) {
- int index = _content.index_of (old);
+ int index = content.index_of (old);
assert (index >= 0);
- _content.set (index, replacement);
+ content.set (index, replacement);
}
}
}
// TODO add initial value (either a number or some letters)
- public Vala.List<ListItem> items {
- get {
- return _items;
- }
- }
-
- private Vala.List<ListItem> _items;
+ public Vala.List<ListItem> items { get; private set; }
internal List () {
base ();
- _bullet = Bullet.NONE;
- _items = new Vala.ArrayList<ListItem> ();
+ bullet = Bullet.NONE;
+ items = new Vala.ArrayList<ListItem> ();
}
public override void check (Api.Tree api_root, Api.Node container, string file_path,
ErrorReporter reporter, Settings settings)
{
// Check individual list items
- foreach (ListItem element in _items) {
+ foreach (ListItem element in items) {
element.parent = this;
element.check (api_root, container, file_path, reporter, settings);
}
}
public override void accept_children (ContentVisitor visitor) {
- foreach (ListItem element in _items) {
+ foreach (ListItem element in items) {
element.accept (visitor);
}
}
public override bool is_empty () {
- return _items.size == 0;
+ return items.size == 0;
}
public override ContentElement copy (ContentElement? new_parent = null) {
public class Valadoc.Content.Table : ContentElement, Block {
- public Vala.List<TableRow> rows {
- get {
- return _rows;
- }
- }
-
- private Vala.List<TableRow> _rows;
+ public Vala.List<TableRow> rows { get; private set; }
internal Table () {
base ();
- _rows = new Vala.ArrayList<TableRow> ();
+ rows = new Vala.ArrayList<TableRow> ();
}
public override void check (Api.Tree api_root, Api.Node container, string file_path,
// Check the table consistency in term of row/column number
// Check individual rows
- foreach (var row in _rows) {
+ foreach (var row in rows) {
row.parent = this;
row.check (api_root, container, file_path, reporter, settings);
}
}
public override void accept_children (ContentVisitor visitor) {
- foreach (TableRow element in _rows) {
+ foreach (TableRow element in rows) {
element.accept (visitor);
}
}
Table table = new Table ();
table.parent = new_parent;
- foreach (var row in _rows) {
+ foreach (var row in rows) {
TableRow copy = row.copy (table) as TableRow;
table.rows.add (copy);
}
public class Valadoc.Content.TableRow : ContentElement {
- public Vala.List<TableCell> cells {
- get {
- return _cells;
- }
- }
-
- private Vala.List<TableCell> _cells;
+ public Vala.List<TableCell> cells { get; private set; }
internal TableRow () {
base ();
- _cells = new Vala.ArrayList<TableCell> ();
+ cells = new Vala.ArrayList<TableCell> ();
}
public override void check (Api.Tree api_root, Api.Node container, string file_path,
ErrorReporter reporter, Settings settings)
{
// Check individual cells
- foreach (var cell in _cells) {
+ foreach (var cell in cells) {
cell.parent = this;
cell.check (api_root, container, file_path, reporter, settings);
}
}
public override void accept_children (ContentVisitor visitor) {
- foreach (TableCell element in _cells) {
+ foreach (TableCell element in cells) {
element.accept (visitor);
}
}
TableRow row = new TableRow ();
row.parent = new_parent;
- foreach (TableCell cell in _cells) {
+ foreach (TableCell cell in cells) {
TableCell copy = cell.copy (row) as TableCell;
row.cells.add (copy);
}