Webdar 1.0.0
Web user interface to libdar
html_form_overwrite_chain_cell.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_FORM_OVERWRITE_CHAIN_CELL_HPP
25#define HTML_FORM_OVERWRITE_CHAIN_CELL_HPP
26
27 // C system header files
28#include "my_config.h"
29extern "C"
30{
31
32}
33
34 // C++ system header files
35
36 // webdar headers
37#include "html_overwrite_action.hpp"
38#include "html_form_overwrite_action.hpp"
39#include "html_hr.hpp"
40#include "jsoner.hpp"
41#include "events.hpp"
42#include "actor.hpp"
43
45
48
50 public jsoner,
51 public events,
52 public actor
53{
54public:
55 static const std::string changed;
56
57 html_form_overwrite_chain_cell(std::unique_ptr<html_form_overwrite_action> & insert);
60 html_form_overwrite_chain_cell & operator = (const html_form_overwrite_chain_cell & ref) = delete;
61 html_form_overwrite_chain_cell & operator = (html_form_overwrite_chain_cell && ref) noexcept = delete;
63
64 html_form_overwrite_action & get_cell_action();
65
67 virtual std::unique_ptr<libdar::crit_action> get_overwriting_action() const override;
68
70 virtual void load_json(const json & source) override { incell->load_json(source); };
71
73 virtual json save_json() const override { return incell->save_json(); };
74
76 virtual void clear_json() override { incell->clear_json(); };
77
79 virtual void on_event(const std::string & event_name) override;
80
81private:
82 html_hr line;
83 std::unique_ptr<html_form_overwrite_action> incell;
84
85};
86
87#endif
class of object that are pointed/triggered to by others
Definition: actor.hpp:55
class events
Definition: events.hpp:52
html component to be adopted by an html_form class
Definition: html_form_overwrite_action.hpp:63
html component holding an element in an overwriting policy chain (class html_form_overwrite_chain_act...
Definition: html_form_overwrite_chain_cell.hpp:53
virtual void load_json(const json &source) override
inherited from jsoner
Definition: html_form_overwrite_chain_cell.hpp:70
virtual void on_event(const std::string &event_name) override
inherited from actor
Definition: html_form_overwrite_chain_cell.cpp:82
virtual void clear_json() override
inherited from jsoner
Definition: html_form_overwrite_chain_cell.hpp:76
virtual json save_json() const override
inherited from jsoner
Definition: html_form_overwrite_chain_cell.hpp:73
virtual std::unique_ptr< libdar::crit_action > get_overwriting_action() const override
obtain the crit_chain_cell object for libdar option
Definition: html_form_overwrite_chain_cell.cpp:76
class html_hr is the implementation of
Definition: html_hr.hpp:45
html component used for constant actions in overwriting policies
Definition: html_overwrite_action.hpp:48
class jsoner
Definition: jsoner.hpp:73
defines the event class
defines jsoner class and class exception_json