| Disk ARchive 2.7.18 Full featured and portable backup and archiving tool

Loading...
Searching...
No Matches
cat_eod.hpp
Go to the documentation of this file.
1/*********************************************************************/
2// dar - disk archive - a backup/restoration program
3// Copyright (C) 2002-2025 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_EOD_HPP
27#define CAT_EOD_HPP
28
29#include "../my_config.h"
30
31 extern "C"
32{
33} // end extern "C"
34
35#include "cat_entree.hpp"
36
37 namespace libdar
38{
39
42
43
45 class cat_eod : public cat_entree
46 {
47 public :
48 cat_eod(): cat_entree(saved_status::saved) {};
49 cat_eod(const cat_eod & ref) = default;
50 cat_eod(cat_eod && ref) noexcept = default;
51 cat_eod & operator = (const cat_eod & ref) = default;
52 cat_eod & operator = (cat_eod && ref) = default;
53 ~cat_eod() = default;
54
55 cat_eod(const smart_pointer<pile_descriptor> & pdesc, bool small): cat_entree(pdesc, small, saved_status::saved) {};
56 // dump defined by cat_entree
57 virtual bool operator == (const cat_entree & ref) const override { return true; };
58 virtual unsigned char signature() const override { return 'z'; };
59 virtual std::string get_description() const override { return "end of directory"; };
60 cat_entree *clone() const override { return new (std::nothrow) cat_eod(); };
61
62 };
63
65
66} // end of namespace
67
68#endif
cat_entree.hpp
base class for all object contained in a catalogue
libdar::cat_entree
the root class from all other inherite for any entry in the catalogue
Definition cat_entree.hpp:60
libdar::cat_entree::cat_entree
cat_entree(saved_status val)
setup an object when read from filesystem
Definition cat_entree.hpp:84
libdar::cat_eod
the End of Directory entry class
Definition cat_eod.hpp:46
libdar::cat_eod::clone
cat_entree * clone() const override
a way to copy the exact type of an object even if pointed to by a parent class pointer
Definition cat_eod.hpp:60
libdar::cat_eod::operator==
virtual bool operator==(const cat_entree &ref) const override
returns true if the two object are the same
Definition cat_eod.hpp:57
libdar::cat_eod::get_description
virtual std::string get_description() const override
inherited class designation
Definition cat_eod.hpp:59
libdar::cat_eod::signature
virtual unsigned char signature() const override
inherited class signature
Definition cat_eod.hpp:58
libdar::smart_pointer
smart pointer class to be used to automagically manage multiple time pointed to address
Definition smart_pointer.hpp:79
libdar::saved_status::saved
@ saved
inode is saved in the archive
my_config.h
include macro defined by the configure script and some specific additional ones
libdar
libdar namespace encapsulate all libdar symbols
Definition archive.hpp:47