1 /* tagletdeprecated.vala
3 * Copyright (C) 2008-2009 Didier Villevalois
4 * Copyright (C) 2008-2012 Florian Brosch
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.
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.
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
21 * Didier 'Ptitjes Villevalois <ptitjes@free.fr>
25 using Valadoc
.Content
;
27 public class Valadoc
.Taglets
.Deprecated
: BlockContent
, Taglet
, Block
{
28 public Rule?
get_parser_rule (Rule run_rule
) {
32 public override void check (Api
.Tree api_root
, Api
.Node container
, string file_path
,
33 ErrorReporter reporter
, Settings settings
)
35 base.check (api_root
, container
, file_path
, reporter
, settings
);
36 reporter
.simple_warning ("%s: %s: @deprecated".printf (file_path
, container
.get_full_name ()),
37 "@deprecated is deprecated. Use [Version (deprecated = true)]");
40 public override void accept (ContentVisitor visitor
) {
41 visitor
.visit_taglet (this
);
44 public override bool is_empty () {
48 public override ContentElement
copy (ContentElement? new_parent
= null) {
49 Deprecated deprecated
= new
Deprecated ();
50 deprecated
.parent
= new_parent
;
52 foreach (Block element
in content
) {
53 Block copy
= element
.copy (deprecated
) as Block
;
54 deprecated
.content
.add (copy
);