2 * Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>
4 * This file is part of CasparCG (www.casparcg.com).
6 * CasparCG is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * CasparCG 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
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with CasparCG. If not, see <http://www.gnu.org/licenses/>.
19 * Author: Helge Norberg, helge.norberg@svt.se
26 #include <common/memory.h>
28 namespace caspar { namespace core {
30 class paragraph_builder : public spl::enable_shared_from_this<paragraph_builder>
33 virtual ~paragraph_builder() { }
34 virtual spl::shared_ptr<paragraph_builder> text(std::wstring text) { return shared_from_this(); };
35 virtual spl::shared_ptr<paragraph_builder> code(std::wstring text) { return shared_from_this(); };
36 virtual spl::shared_ptr<paragraph_builder> strong(std::wstring text) { return shared_from_this(); };
37 virtual spl::shared_ptr<paragraph_builder> see(std::wstring item) { return shared_from_this(); };
38 virtual spl::shared_ptr<paragraph_builder> url(std::wstring url, std::wstring name = L"") { return shared_from_this(); };
41 class definition_list_builder : public spl::enable_shared_from_this<definition_list_builder>
44 virtual ~definition_list_builder() { }
45 virtual spl::shared_ptr<definition_list_builder> item(std::wstring term, std::wstring description) { return shared_from_this(); };
51 virtual ~help_sink() { }
53 virtual void short_description(const std::wstring& short_description) { };
54 virtual void syntax(const std::wstring& syntax) { };
55 virtual spl::shared_ptr<paragraph_builder> para() { return spl::make_shared<paragraph_builder>(); }
56 virtual spl::shared_ptr<definition_list_builder> definitions() { return spl::make_shared<definition_list_builder>(); }
57 virtual void example(const std::wstring& code, const std::wstring& caption = L"") { }
59 virtual void begin_item(const std::wstring& name) { };
60 virtual void end_item() { };
62 friend help_repository;