Disk ARchive 2.8.3
Full featured and portable backup and archiving tool
Loading...
Searching...
No Matches
cat_blockdev.hpp
Go to the documentation of this file.
1/*********************************************************************/
2// dar - disk archive - a backup/restoration program
3// Copyright (C) 2002-2026 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_BLOCKDEV_HPP
27#define CAT_BLOCKDEV_HPP
28
29#include "../my_config.h"
30
31extern "C"
32{
33} // end extern "C"
34
35#include "cat_device.hpp"
36
37namespace libdar
38{
39
42
44
45 class cat_blockdev : public cat_device
46 {
47 public:
48 cat_blockdev(const infinint & uid, const infinint & gid, U_16 perm,
49 const datetime & last_access,
50 const datetime & last_modif,
51 const datetime & last_change,
52 const std::string & name,
53 U_16 major,
54 U_16 minor,
55 const infinint & fs_device) : cat_device(uid, gid, perm, last_access,
56 last_modif, last_change, name,
57 major, minor, fs_device) {};
58 cat_blockdev(const std::shared_ptr<user_interaction> & dialog,
60 const archive_version & reading_ver,
62 bool small) : cat_device(dialog, pdesc, reading_ver, saved, small) {};
63
64 cat_blockdev(const cat_blockdev & ref) = default;
65 cat_blockdev(cat_blockdev && ref) noexcept = default;
66 cat_blockdev & operator = (const cat_blockdev & ref) = default;
67 cat_blockdev & operator = (cat_blockdev && ref) = default;
68 ~cat_blockdev() = default;
69
70 virtual bool operator == (const cat_entree & ref) const override;
71
72 // using dump from cat_device class
73 // using method is_more_recent_than() from cat_device class
74 // using method has_changed_since() from cat_device class
75 virtual unsigned char signature() const override { return 'b'; };
76 virtual std::string get_description() const override { return "block device"; };
77 virtual cat_entree *clone() const override { return new (std::nothrow) cat_blockdev(*this); };
78 };
79
81
82} // end of namespace
83
84#endif
parent class for all special devices inodes
class archive_version manages the version of the archive format
virtual bool operator==(const cat_entree &ref) const override
returns true if the two object are the same
virtual unsigned char signature() const override
inherited class signature
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
the root class from all other inherite for any entry in the catalogue
U_16 perm
inode's permission
infinint uid
inode owner's user ID
infinint gid
inode owner's group ID
the arbitrary large positive integer class
smart pointer class to be used to automagically manage multiple time pointed to address
saved_status
data saved status for an entry
include macro defined by the configure script and some specific additional ones
libdar namespace encapsulate all libdar symbols