1/* warning.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.Warning : BlockContent, Block {
26	internal Warning () {
27		base ();
28	}
29
30	public override void check (Api.Tree api_root, Api.Node container, string file_path,
31								ErrorReporter reporter, Settings settings)
32	{
33		// Check inline content
34		base.check (api_root, container, file_path, reporter, settings);
35	}
36
37	public override void accept (ContentVisitor visitor) {
38		visitor.visit_warning (this);
39	}
40
41	public override ContentElement copy (ContentElement? new_parent = null) {
42		Warning warning = new Warning ();
43		warning.parent = new_parent;
44
45		foreach (Block block in content) {
46			Block copy = block.copy (warning) as Block;
47			warning.content.add (copy);
48		}
49
50		return warning;
51	}
52}
53
54