Loading...
Searching...
No Matches
cat_eod.hpp
Go to the documentation of this file.
/*********************************************************************/
// dar - disk archive - a backup/restoration program
// Copyright (C) 2002-2024 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_EOD_HPP
#define CAT_EOD_HPP
#include "../my_config.h"
extern "C"
{
} // end extern "C"
#include "cat_entree.hpp"
namespace libdar
{
class cat_eod : public cat_entree
{
public :
cat_eod(): cat_entree(saved_status::saved) {};
cat_eod(const cat_eod & ref) = default;
cat_eod(cat_eod && ref) noexcept = default;
cat_eod & operator = (const cat_eod & ref) = default;
cat_eod & operator = (cat_eod && ref) noexcept = default;
~cat_eod() = default;
cat_eod(const smart_pointer<pile_descriptor> & pdesc, bool small): cat_entree(pdesc, small, saved_status::saved) {};
// dump defined by cat_entree
virtual bool operator == (const cat_entree & ref) const override { return true; };
virtual unsigned char signature() const override { return 'z'; };
virtual std::string get_description() const override { return "end of directory"; };
cat_entree *clone() const override { return new (std::nothrow) cat_eod(); };
};
} // end of namespace
#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_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
libdar
libdar namespace encapsulate all libdar symbols
Definition archive.hpp:47