Loading...
Searching...
No Matches
cat_chardev.hpp
Go to the documentation of this file.
/*********************************************************************/
// dar - disk archive - a backup/restoration program
// Copyright (C) 2002-2026 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_CHARDEV_HPP
#define CAT_CHARDEV_HPP
#include "../my_config.h"
extern "C"
{
} // end extern "C"
#include "cat_device.hpp"
namespace libdar
{
class cat_chardev : public cat_device
{
public:
cat_chardev(const infinint & uid, const infinint & gid, U_16 perm,
const datetime & last_access,
const datetime & last_modif,
const datetime & last_change,
const std::string & name,
U_16 major,
U_16 minor,
const infinint & fs_device) : cat_device(uid, gid, perm,
last_access,
last_modif,
last_change,
name,
major, minor, fs_device) {};
cat_chardev(const std::shared_ptr<user_interaction> & dialog,
const smart_pointer<pile_descriptor> & pdesc,
const archive_version & reading_ver,
saved_status saved,
bool small) : cat_device(dialog, pdesc, reading_ver, saved, small) {};
cat_chardev(const cat_chardev & ref) = default;
cat_chardev(cat_chardev && ref) noexcept = default;
cat_chardev & operator = (const cat_chardev & ref) = default;
cat_chardev & operator = (cat_chardev && ref) = default;
~cat_chardev() = default;
virtual bool operator == (const cat_entree & ref) const override;
// using dump from cat_device class
// using method is_more_recent_than() from cat_device class
// using method has_changed_since() from cat_device class
virtual unsigned char signature() const override { return 'c'; };
virtual std::string get_description() const override { return "char device"; };
virtual cat_entree *clone() const override { return new (std::nothrow) cat_chardev(*this); };
};
} // end of namespace
#endif
cat_device.hpp
parent class for all special devices inodes
libdar::archive_version
class archive_version manages the version of the archive format
Definition archive_version.hpp:47
libdar::cat_chardev::get_description
virtual std::string get_description() const override
inherited class designation
Definition cat_chardev.hpp:79
libdar::cat_chardev::signature
virtual unsigned char signature() const override
inherited class signature
Definition cat_chardev.hpp:78
libdar::cat_chardev::operator==
virtual bool operator==(const cat_entree &ref) const override
returns true if the two object are the same
libdar::cat_chardev::clone
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
Definition cat_chardev.hpp:80
libdar::cat_entree
the root class from all other inherite for any entry in the catalogue
Definition cat_entree.hpp:60
libdar::cat_inode::perm
U_16 perm
inode's permission
Definition cat_inode.hpp:183
libdar::cat_inode::uid
infinint uid
inode owner's user ID
Definition cat_inode.hpp:181
libdar::cat_inode::gid
infinint gid
inode owner's group ID
Definition cat_inode.hpp:182
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:44
libdar::saved_status::saved
@ saved
inode is saved in the archive
Definition cat_status.hpp:45
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