Webdar 1.0.0
Web user interface to libdar
Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
html_form_overwrite_base_criterium Class Reference

html component to be adopted by an html_form that implements atomic/base actions for overwriting policies More...

#include <html_form_overwrite_base_criterium.hpp>

Inheritance diagram for html_form_overwrite_base_criterium:
Inheritance graph
[legend]
Collaboration diagram for html_form_overwrite_base_criterium:
Collaboration graph
[legend]

Public Member Functions

 html_form_overwrite_base_criterium (const html_form_overwrite_base_criterium &ref)=delete
 
 html_form_overwrite_base_criterium (html_form_overwrite_base_criterium &&ref) noexcept=delete
 
html_form_overwrite_base_criteriumoperator= (const html_form_overwrite_base_criterium &ref)=delete
 
html_form_overwrite_base_criteriumoperator= (html_form_overwrite_base_criterium &&ref) noexcept=delete
 
void set_mode (const std::string &mode)
 set the base mode (use crit_* static char* above) More...
 
void set_invert (bool val)
 set invert value More...
 
void set_negate (bool val)
 set invert value More...
 
void set_date (const libdar::infinint &val)
 set date More...
 
void set_hourshift (unsigned int shift)
 set hourshift More...
 
virtual std::unique_ptr< libdar::criterium > get_overwriting_criterium () const override
 obtain the crit_base_criterium object for libdar option More...
 
virtual void load_json (const json &source) override
 inherited from jsoner More...
 
virtual json save_json () const override
 inherited from jsoner More...
 
virtual void clear_json () override
 inherited from jsoner More...
 
virtual void on_event (const std::string &event_name) override
 inherited from actor More...
 
- Public Member Functions inherited from html_overwrite_criterium
 html_overwrite_criterium (const html_overwrite_criterium &ref)=default
 
 html_overwrite_criterium (html_overwrite_criterium &&ref) noexcept=delete
 
html_overwrite_criteriumoperator= (const html_overwrite_criterium &ref)=default
 
html_overwrite_criteriumoperator= (html_overwrite_criterium &&ref) noexcept=delete
 
virtual std::unique_ptr< libdar::criterium > get_overwriting_criterium () const =0
 obtain the crit_criterium object for libdar option More...
 
- Public Member Functions inherited from body_builder
 body_builder ()
 constructor
 
 body_builder (const body_builder &ref)
 copy constructor More...
 
 body_builder (body_builder &&ref) noexcept=delete
 move constructor More...
 
body_builderoperator= (const body_builder &ref)
 assignment operator drops all existing children More...
 
body_builderoperator= (body_builder &&ref) noexcept=delete
 move operator More...
 
virtual ~body_builder ()
 the (virtual) destructor
 
void set_prefix (const chemin &prefix)
 
void adopt (body_builder *obj)
 
bool is_adopted () const
 whether the object has currently a parent (= is adopted)
 
void foresake (body_builder *obj)
 
void set_visible (bool mode)
 ask for the object to become visible in HTML page or temporarily hidden More...
 
bool get_visible () const
 returns the current visible status of the object More...
 
bool get_visible_recursively () const
 return the effective visible status of an object taking into account all of ancestors that adopted it
 
void add_css_class (const std::string &name)
 set this object with a additional css_class (assuming it is defined in a css_library available for this object)
 
void add_css_class (const css_class_group &cg)
 set this object with an additional set of css_classes (assuming they are all defined in a css_library available for this object)
 
bool has_css_class (const std::string &name) const
 check the presence of the given class name
 
void remove_css_class (const std::string &name)
 remove the provided css_class name from the list of css_class names this object has been assigned to
 
void remove_css_class (const css_class_group &cg)
 remove the provided css_class_group from the list
 
void clear_css_classes ()
 clear the whole list of css_class names
 
const std::set< std::string > & get_css_classes_as_a_set () const
 provide the list of css_class names that this object has been set with
 
css_class_group get_css_class_group () const
 provide the list of css_class names as a css_class_group
 
std::string get_css_classes (const std::string &extra="") const
 return the class_name as inlined css, suitable to be added in a html marker More...
 
void define_css_class_in_library (const css_class &csscl)
 
void define_css_class_in_library (const std::string &name, const css &cssdef)
 
bool is_css_class_defined_in_library (const std::string &name) const
 check whether a css_class of given name already exists in a reachable css_library
 
std::string get_body_part (const chemin &path, const request &req)
 
void ignore_body_changed_from_my_children (bool mode)
 ignore my_body_part_has_changed() invoked from adopted children and myself More...
 
bool get_ignore_body_changed_from_my_children () const
 get the current status of ignore_body_changed_from_my_children()
 
void set_no_CR (bool no_cr=true)
 ask for the implementation not to add a new line after this control More...
 
void assign_anchor (bool mode)
 assign an anchor to this object (the object's inherited_get_body_part() will be wrapped into an HTML anchor: ) More...
 
std::string get_assigned_anchor () const
 return the anchor value that has been assiged to this object (without the leading #) More...
 
virtual void bind_to_anchor (const std::string &val)
 ask inherited components to use this anchor in case they redirect to an new URL or generate new URLs within their body part. More...
 
- Public Member Functions inherited from actor
 actor (const actor &ref)=default
 
 actor (actor &&ref) noexcept(false)=default
 
actoroperator= (const actor &ref)=default
 
actoroperator= (actor &&ref) noexcept(false)
 
virtual void on_event (const std::string &event_name)=0
 implementation in inherited class of the action triggered by the event given in argument More...
 
- Public Member Functions inherited from reference
 reference ()
 usual constructor
 
 reference (const reference &ref)
 copy constructor More...
 
 reference (reference &&ref) noexcept(false)
 move constructor (only operational for objects without peering) More...
 
referenceoperator= (const reference &ref)
 assignment operator (only operational for objects without peering) More...
 
referenceoperator= (reference &&ref) noexcept(false)
 move assigment operator More...
 
virtual ~reference ()
 destructor
 
void peer_with (reference *obj)
 method used to create a relation between two objects More...
 
void break_peer_with (reference *obj)
 break the peering with the object given as argument
 
bool is_peer (reference *obj) const
 whether a peering exists with that object
 
bool is_empty () const
 whether the current object has peering
 
unsigned int size () const
 the number of peers
 
- Public Member Functions inherited from jsoner
 jsoner (const jsoner &ref)=default
 
 jsoner (jsoner &&ref) noexcept(false)=default
 
jsoneroperator= (const jsoner &ref)=default
 
jsoneroperator= (jsoner &&ref) noexcept(false)=default
 
virtual void load_json (const json &source)=0
 setup the components from the json provided information More...
 
virtual json save_json () const =0
 produce a json structure from the component configuration More...
 
virtual void clear_json ()=0
 instruct the object to get to its default/initial configuration More...
 
- Public Member Functions inherited from events
 events (const events &ref)
 copy constructor More...
 
 events (events &&ref) noexcept(false)=default
 
eventsoperator= (const events &ref)=default
 
eventsoperator= (events &&ref) noexcept(false)
 
void record_actor_on_event (actor *ptr, const std::string &name)
 record an actor for an given event
 

Static Public Attributes

static const std::string changed = "hfobc_changed"
 
static constexpr const char * crit_in_place_is_inode = "in place entry is an inode"
 
static constexpr const char * crit_in_place_is_dir = "in place entry is a directory"
 
static constexpr const char * crit_in_place_is_file = "in place entry is a plain file"
 
static constexpr const char * crit_in_place_is_hardlinked_inode = "in place entry is a hard linked inode"
 
static constexpr const char * crit_in_place_is_new_hardlinked_inode = "in place entry is a hard linked inode we meet for the first time"
 
static constexpr const char * crit_in_place_data_more_recent = "in place inode has more recent data"
 
static constexpr const char * crit_in_place_data_more_recent_or_equal_to = "in place inode a data more recent than or equal to: "
 
static constexpr const char * crit_in_place_data_bigger = "both are plain files and in place one is bigger file"
 
static constexpr const char * crit_in_place_data_saved = "in place has its data saved or is not an inode"
 
static constexpr const char * crit_in_place_data_dirty = "in place entry is a dirty file"
 
static constexpr const char * crit_in_place_data_sparse = "in place entry is a sparse file"
 
static constexpr const char * crit_in_place_has_delta_sig = "in place entry has a delta signature attached"
 
static constexpr const char * crit_same_inode_data = "both entry are of the same type and have the same metadata"
 
static constexpr const char * crit_in_place_EA_present = "in place entry has Extended Attributes"
 
static constexpr const char * crit_in_place_EA_more_recent = "in place entry has more recent Extended Attributes"
 
static constexpr const char * crit_in_place_EA_more_recent_or_equal_to = "in place entry has EA more recent than or equal to:"
 
static constexpr const char * crit_in_place_more_EA = "in place entry has more Extended Attributes"
 
static constexpr const char * crit_in_place_EA_bigger = "in place entry has bigger Extended Attributes"
 
static constexpr const char * crit_in_place_EA_saved = "in place entry has Extended Attributes saved"
 
static constexpr const char * crit_same_type = "both entries are of the same type"
 

Protected Member Functions

virtual std::string inherited_get_body_part (const chemin &path, const request &req) override
 inherited from body_builder from html_overwrite_criterium More...
 
- Protected Member Functions inherited from body_builder
virtual std::string inherited_get_body_part (const chemin &path, const request &req)=0
 implementation of get_body_part() method for inherited classes More...
 
void my_body_part_has_changed ()
 let a class record a change in what inherited_get_body_part() would return if it was called again with the same request More...
 
virtual void my_visibility_has_changed ()
 available for inherited class to be informed when their visibility changes More...
 
bool has_my_body_part_changed () const
 obtain the body_part changed status More...
 
chemin get_path () const
 return the path of 'this' according to its descent in the body_builder tree of adopted children
 
std::string get_recorded_name () const
 
void store_css_library ()
 this creates a css_library accessible from adopted objects to hold html class definitions More...
 
bool has_local_css_library () const
 return true if this object has a css_library locally stored (not from a adopter object)
 
std::unique_ptr< css_library > & lookup_css_library () const
 lookup toward registered parent body_builder object for the closest stored css_library More...
 
std::string get_body_part_from_target_child (const chemin &path, const request &req)
 
std::string get_body_part_from_all_children (const chemin &path, const request &req)
 
virtual void path_has_changed ()
 For inherited classes, called when the path has changed,. More...
 
virtual void has_adopted (body_builder *obj)
 Be informed that a new child has been adopted. More...
 
virtual void will_foresake (body_builder *obj)
 Be informed that a child is about to be foresaken. More...
 
virtual void has_been_adopted_by (body_builder *obj)
 Be informed that we have been adopted by obj, our new parent.
 
virtual void will_be_foresaken_by (body_builder *obj)
 Be informed that we are about to be foresaken by obj, our soon former parent.
 
virtual void css_classes_have_changed ()
 Be informed about css class modification. More...
 
virtual void new_css_library_available ()
 
unsigned int size () const
 access to adopted childs
 
body_builderoperator[] (unsigned int i)
 access to adopted childs
 
body_builderget_parent () const
 return the parent object or nullptr if no object has adopted this object
 
template<class T >
void closest_ancestor_of_type (T *&ancestor)
 access to the closest ancestor (parent) matching (dynamic_cast) the provided type More...
 
void orphan_all_children ()
 orphan all adopted children
 
bool get_no_CR () const
 true if it has been requested no to add Carriage Return after the HTML object
 
- Protected Member Functions inherited from reference
virtual void broken_peering_from (reference *obj)
 to be informed when a peer has broke the peering with me More...
 
void reset_read_peers () const
 reset the peers reading
 
bool read_next_peer (reference *&peer) const
 
- Protected Member Functions inherited from events
virtual void broken_peering_from (reference *obj) override
 inherited from class reference More...
 
void register_name (const std::string &name)
 add a new event for actors to register against
 
void unregister_name (const std::string &name)
 remove an event and remove all actors that registed on it
 
void rename_name (const std::string &old_name, const std::string &new_name)
 rename an event and keep all existing peering to this new event More...
 
void act (const std::string &name)
 trigger a given event
 

Additional Inherited Members

- Static Protected Member Functions inherited from jsoner
static json wrap_config_with_json_header (unsigned int version, const std::string &class_id, const json &config)
 given a version, class_id and configuration generates the global and common json structure More...
 
static json unwrap_config_from_json_header (const json &source, unsigned int &version, std::string &class_id)
 from a given json global and common json structure split header parts and return the config part More...
 
- Static Protected Attributes inherited from jsoner
static constexpr const char * jsoner_version_label = "version"
 
static constexpr const char * jsoner_id_label = "class_id"
 
static constexpr const char * jsoner_config_label = "config"
 

Detailed Description

html component to be adopted by an html_form that implements atomic/base actions for overwriting policies

Member Function Documentation

◆ clear_json()

void html_form_overwrite_base_criterium::clear_json ( )
overridevirtual

inherited from jsoner

Implements jsoner.

◆ get_overwriting_criterium()

unique_ptr< libdar::criterium > html_form_overwrite_base_criterium::get_overwriting_criterium ( ) const
overridevirtual

obtain the crit_base_criterium object for libdar option

Implements html_overwrite_criterium.

◆ inherited_get_body_part()

string html_form_overwrite_base_criterium::inherited_get_body_part ( const chemin path,
const request req 
)
overrideprotectedvirtual

inherited from body_builder from html_overwrite_criterium

Implements body_builder.

◆ load_json()

void html_form_overwrite_base_criterium::load_json ( const json &  source)
overridevirtual

inherited from jsoner

Implements jsoner.

◆ on_event()

void html_form_overwrite_base_criterium::on_event ( const std::string &  event_name)
overridevirtual

inherited from actor

Implements actor.

◆ save_json()

json html_form_overwrite_base_criterium::save_json ( ) const
overridevirtual

inherited from jsoner

Implements jsoner.

◆ set_date()

void html_form_overwrite_base_criterium::set_date ( const libdar::infinint &  val)
inline

set date

Note
this call is to programmatically setup a component, normal way to setup is from Web user interaction

◆ set_hourshift()

void html_form_overwrite_base_criterium::set_hourshift ( unsigned int  shift)
inline

set hourshift

Note
this call is to programmatically setup a component, normal way to setup is from Web user interaction

◆ set_invert()

void html_form_overwrite_base_criterium::set_invert ( bool  val)
inline

set invert value

Note
this call is to programmatically setup a component, normal way to setup is from Web user interaction

◆ set_mode()

void html_form_overwrite_base_criterium::set_mode ( const std::string &  mode)
inline

set the base mode (use crit_* static char* above)

Note
this call is to programmatically setup a component, normal way to setup is from Web user interaction

◆ set_negate()

void html_form_overwrite_base_criterium::set_negate ( bool  val)
inline

set invert value

Note
this call is to programmatically setup a component, normal way to setup is from Web user interaction

The documentation for this class was generated from the following files: