cat_prise.hpp
Go to the documentation of this file.
/*********************************************************************/
// dar - disk archive - a backup/restoration program
// Copyright (C) 2002-2023 Denis Corbin
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
// to contact the author, see the AUTHOR file
/*********************************************************************/
#ifndef CAT_PRISE_HPP
#define CAT_PRISE_HPP
#include "../my_config.h"
extern "C"
{
} // end extern "C"
#include "cat_inode.hpp"
namespace libdar
{
class cat_prise : public cat_inode
{
public :
cat_prise(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 & fs_device):
cat_inode(xuid, xgid, xperm, last_access, last_modif, last_change, xname, fs_device)
{ set_saved_status(saved_status::saved); };
cat_prise(const std::shared_ptr<user_interaction> & dialog,
const smart_pointer<pile_descriptor> & pdesc,
const archive_version & reading_ver,
saved_status saved,
bool small): cat_inode(dialog, pdesc, reading_ver, saved, small) {};
cat_prise(const cat_prise & ref) = default;
cat_prise(cat_prise && ref) noexcept = default;
cat_prise & operator = (const cat_prise & ref) = default;
cat_prise & operator = (cat_prise && ref) noexcept = default;
~cat_prise() = default;
virtual bool operator == (const cat_entree & ref) const override;
// using dump from cat_inode class
// using method is_more_recent_than() from cat_inode class
// using method has_changed_since() from cat_inode class
virtual unsigned char signature() const override { return 's'; };
virtual std::string get_description() const override { return "socket"; };
virtual cat_entree *clone() const override { return new (std::nothrow) cat_prise(*this); };
};
} // end of namespace
#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_prise
the Unix socket inode class
Definition: cat_prise.hpp:46
libdar::cat_prise::clone
virtual cat_entree * clone() const override
inherited from cat_entree
Definition: cat_prise.hpp:82
libdar::cat_prise::operator==
virtual bool operator==(const cat_entree &ref) const override
returns true if the two object are the same
libdar::cat_prise::get_description
virtual std::string get_description() const override
inherited class designation
Definition: cat_prise.hpp:78
libdar::cat_prise::signature
virtual unsigned char signature() const override
inherited from cat_entree
Definition: cat_prise.hpp:77
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< pile_descriptor >
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
libdar
libdar namespace encapsulate all libdar symbols
Definition: archive.hpp:47