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

Loading...
Searching...
No Matches
cat_tube.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_TUBE_HPP
27#define CAT_TUBE_HPP
28
29#include "../my_config.h"
30
31 extern "C"
32{
33} // end extern "C"
34
35#include "cat_inode.hpp"
36
37 namespace libdar
38{
39
42
44 class cat_tube : public cat_inode
45 {
46 public :
47 cat_tube(const infinint & xuid, const infinint & xgid, U_16 xperm,
48 const datetime & last_access,
49 const datetime & last_modif,
50 const datetime & last_change,
51 const std::string & xname,
52 const infinint & fs_device):
53 cat_inode(xuid, xgid, xperm, last_access, last_modif, last_change, xname, fs_device)
54 { set_saved_status(saved_status::saved); };
55
56 cat_tube(const std::shared_ptr<user_interaction> & dialog,
57 const smart_pointer<pile_descriptor> & pdesc,
58 const archive_version & reading_ver,
59 saved_status saved,
60 bool small): cat_inode(dialog, pdesc, reading_ver, saved, small) {};
61
62 cat_tube(const cat_tube & ref) = default;
63 cat_tube(cat_tube && ref) noexcept = default;
64 cat_tube & operator = (const cat_tube & ref) = default;
65 cat_tube & operator = (cat_tube && ref) = default;
66 ~cat_tube() = default;
67
68 virtual bool operator == (const cat_entree & ref) const override;
69
70 // using dump from cat_inode class
71 // using method is_more_recent_than() from cat_inode class
72 // using method has_changed_since() from cat_inode class
73
75 virtual unsigned char signature() const override { return 'p'; };
76 virtual std::string get_description() const override { return "named pipe"; };
77
79 virtual cat_entree *clone() const override { return new (std::nothrow) cat_tube(*this); };
80 };
81
83
84} // end of namespace
85
86#endif
cat_inode.hpp
base object for all inode types, managed EA and FSA, dates, permissions, ownership,...
libdar::archive_version
class archive_version manages the version of the archive format
Definition archive_version.hpp:47
libdar::cat_entree
the root class from all other inherite for any entry in the catalogue
Definition cat_entree.hpp:60
libdar::cat_entree::set_saved_status
void set_saved_status(saved_status x)
modify the saved_status of the object
Definition cat_entree.hpp:167
libdar::cat_inode
the root class for all cat_inode
Definition cat_inode.hpp:53
libdar::cat_inode::cat_inode
cat_inode(const infinint &xuid, const infinint &xgid, U_16 xperm, const datetime &last_access, const datetime &last_modif, const datetime &last_change, const std::string &xname, const infinint &device)
flag used to only consider certain fields when comparing/restoring inodes
libdar::cat_tube
the named pipe class
Definition cat_tube.hpp:45
libdar::cat_tube::signature
virtual unsigned char signature() const override
inherited from cat_entree
Definition cat_tube.hpp:75
libdar::cat_tube::get_description
virtual std::string get_description() const override
inherited class designation
Definition cat_tube.hpp:76
libdar::cat_tube::operator==
virtual bool operator==(const cat_entree &ref) const override
returns true if the two object are the same
libdar::cat_tube::clone
virtual cat_entree * clone() const override
inherited from cat_entree
Definition cat_tube.hpp:79
libdar::datetime
stores time information
Definition datetime.hpp:59
libdar::infinint
the arbitrary large positive integer class
Definition real_infinint.hpp:62
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_status
data saved status for an entry
Definition cat_status.hpp:45
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