1/* listitem.vala 2 * 3 * Copyright (C) 2008-2009 Didier Villevalois 4 * Copyright (C) 2008-2012 Florian Brosch 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Lesser General Public 8 * License as published by the Free Software Foundation; either 9 * version 2.1 of the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this library; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 * 20 * Author: 21 * Didier 'Ptitjes Villevalois <ptitjes@free.fr> 22 */ 23 24 25public class Valadoc.Content.ListItem : BlockContent { 26 27 internal ListItem () { 28 base (); 29 } 30 31 public override void check (Api.Tree api_root, Api.Node container, string file_path, 32 ErrorReporter reporter, Settings settings) 33 { 34 // Check block content 35 base.check (api_root, container, file_path, reporter, settings); 36 } 37 38 public override void accept (ContentVisitor visitor) { 39 visitor.visit_list_item (this); 40 } 41 42 public override void accept_children (ContentVisitor visitor) { 43 base.accept_children (visitor); 44 } 45 46 public override ContentElement copy (ContentElement? new_parent = null) { 47 ListItem item = new ListItem (); 48 item.parent = new_parent; 49 50 foreach (Block block in content) { 51 Block copy = block.copy (item) as Block; 52 item.content.add (copy); 53 } 54 55 return item; 56 } 57} 58