Webdar 1.0.0
Web user interface to libdar
html_static_url.hpp
1/*********************************************************************/
2// webdar - a web server and interface program to libdar
3// Copyright (C) 2013-2025 Denis Corbin
4//
5// This file is part of Webdar
6//
7// Webdar is free software: you can redistribute it and/or modify
8// it under the terms of the GNU General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11//
12// Webdar is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with Webdar. If not, see <http://www.gnu.org/licenses/>
19//
20//----
21// to contact the author: dar.linux@free.fr
22/*********************************************************************/
23
24#ifndef HTML_STATIC_URL_HPP
25#define HTML_STATIC_URL_HPP
26
27 // C system header files
28#include "my_config.h"
29extern "C"
30{
31
32}
33
34 // C++ system header files
35#include "static_body_builder.hpp"
36#include "html_url.hpp"
37#include "html_text.hpp"
38#include "central_report.hpp"
39
40 // webdar headers
41
43
45{
46public:
47 html_static_url(const std::string & url, const std::string & label);
48 html_static_url(const html_static_url & ref) = default;
49 html_static_url(html_static_url && ref) noexcept = delete;
50 html_static_url & operator = (const html_static_url & ref) = default;
51 html_static_url & operator = (html_static_url && ref) noexcept = delete;
52 ~html_static_url() = default;
53
54 void change_label(const std::string & newlabel);
55 const std::string & get_label() const { return x_label; };
56
58 virtual std::string get_body_part() const override;
59
60protected:
61 using body_builder::adopt; // forbidding object to adopt other body_builder objects
62
63private:
64 std::string x_label;
65 html_text child;
66 std::shared_ptr<central_report_stdout> faked;
67};
68
69#endif
void adopt(body_builder *obj)
Definition: body_builder.cpp:117
html component implementing the usual hyperlink component
Definition: html_static_url.hpp:45
virtual std::string get_body_part() const override
inherited from static_body_builder
Definition: html_static_url.cpp:66
class html_text manage text and header in html document
Definition: html_text.hpp:52
html component implementing the usual hyperlink component
Definition: html_url.hpp:43
base class of html components that are static
Definition: static_body_builder.hpp:47