Disk ARchive 2.7.15
Full featured and portable backup and archiving tool
Loading...
Searching...
No Matches
cat_ignored.hpp
Go to the documentation of this file.
1/*********************************************************************/
2// dar - disk archive - a backup/restoration program
3// Copyright (C) 2002-2024 Denis Corbin
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License
7// as published by the Free Software Foundation; either version 2
8// of the License, or (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18//
19// to contact the author, see the AUTHOR file
20/*********************************************************************/
21
25
26#ifndef CAT_IGNORED_HPP
27#define CAT_IGNORED_HPP
28
29#include "../my_config.h"
30
31extern "C"
32{
33} // end extern "C"
34
35#include "cat_nomme.hpp"
36
37namespace libdar
38{
39
42
44
45 class cat_ignored : public cat_nomme
46 {
47 public :
48 cat_ignored(const std::string & name): cat_nomme(name, saved_status::saved) {};
49 cat_ignored(const smart_pointer<pile_descriptor> & pdesc, bool small) : cat_nomme(pdesc, small, saved_status::saved) { throw SRC_BUG; };
50 cat_ignored(const cat_ignored & ref) = default;
51 cat_ignored(cat_ignored && ref) noexcept = default;
52 cat_ignored & operator = (const cat_ignored & ref) = default;
53 cat_ignored & operator = (cat_ignored && ref) = default;
54 ~cat_ignored() = default;
55
56 virtual bool operator == (const cat_entree & ref) const override;
57
58 virtual unsigned char signature() const override { return 'i'; };
59 virtual std::string get_description() const override { return "ignored entry"; };
60 virtual cat_entree *clone() const override { return new (std::nothrow) cat_ignored(*this); };
61
62 protected:
63 virtual void inherited_dump(const pile_descriptor & pdesc, bool small) const override { throw SRC_BUG; };
64
65 };
66
68
69} // end of namespace
70
71#endif
base class of all objects contained in a catalogue and that can be named
the root class from all other inherite for any entry in the catalogue
the present file to ignore (not to be recorded as deleted later)
virtual bool operator==(const cat_entree &ref) const override
returns true if the two object are the same
virtual void inherited_dump(const pile_descriptor &pdesc, bool small) const override
inherited class may overload this method but shall first call the parent's inherited_dump() in the ov...
virtual cat_entree * clone() const override
a way to copy the exact type of an object even if pointed to by a parent class pointer
virtual std::string get_description() const override
inherited class designation
virtual unsigned char signature() const override
inherited class signature
the base class for all entry that have a name
Definition cat_nomme.hpp:45
smart pointer class to be used to automagically manage multiple time pointed to address
@ saved
inode is saved in the archive
libdar namespace encapsulate all libdar symbols
Definition archive.hpp:47