1/* item.vala 2 * 3 * Copyright (C) 2008 Florian Brosch 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2.1 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 * 19 * Author: 20 * Florian Brosch <flo.brosch@gmail.com> 21 */ 22 23 24using Valadoc.Content; 25 26/** 27 * Represents a node in the api tree. 28 */ 29public abstract class Valadoc.Api.Item : Object { 30 private Inline _signature; 31 32 public Vala.CodeNode? data { 33 private set; 34 get; 35 } 36 37 /** 38 * The parent of this item. 39 */ 40 public Item parent { 41 protected set; 42 get; 43 } 44 45 protected Item (Vala.CodeNode? data) { 46 this.data = data; 47 } 48 49 internal virtual void parse_comments (Settings settings, DocumentationParser parser) { 50 } 51 52 internal virtual void check_comments (Settings settings, DocumentationParser parser) { 53 } 54 55 56 /** 57 * The signature of this item. 58 */ 59 public Inline signature { 60 get { 61 if (_signature == null) { 62 _signature = build_signature (); 63 } 64 return _signature; 65 } 66 } 67 68 protected abstract Inline build_signature (); 69} 70 71