Webdar 1.0.0
Web user interface to libdar
html_hash_algo.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_HASH_ALGO_HPP
25#define HTML_HASH_ALGO_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 <dar/libdar.hpp>
36
37 // webdar headers
38#include "html_form_select.hpp"
39
41
43{
44public:
45 static const std::string changed;
46
47 html_hash_algo(const std::string & title);
48 html_hash_algo(const html_hash_algo & ref) = delete;
49 html_hash_algo(html_hash_algo && ref) noexcept = delete;
50 html_hash_algo & operator = (const html_hash_algo & ref) = delete;
51 html_hash_algo & operator = (html_hash_algo && ref) noexcept = delete;
52 ~html_hash_algo() = default;
53
54 libdar::hash_algo get_value() const;
55 void set_value(libdar::hash_algo val);
56
58 virtual void on_event(const std::string & event_name) override { act(changed); };
59};
60
61#endif
void act(const std::string &name)
trigger a given event
Definition: events.cpp:151
class html_form_select implements HTML input of type "select"
Definition: html_form_select.hpp:53
html component used for the user to define a has algorithm
Definition: html_hash_algo.hpp:43
virtual void on_event(const std::string &event_name) override
actor indirect inheritance
Definition: html_hash_algo.hpp:58