Loading...
Searching...
No Matches
defile.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 DEFILE_HPP
#define DEFILE_HPP
#include "../my_config.h"
#include "path.hpp"
#include "cat_entree.hpp"
namespace libdar
{
class defile
{
public :
defile(const path &racine) : chemin(racine) { init = true; cache_set = none; };
defile(const defile & ref) = default;
defile(defile && ref) noexcept = default;
defile & operator = (const defile & ref) = default;
defile & operator = (defile && ref) noexcept = default;
~defile() = default;
void enfile(const cat_entree *e);
const path & get_path() const { return chemin; };
const std::string & get_string() const;
const std::string & get_string_without_root() const;
private :
path chemin;
bool init;
mutable enum { none, full, without_root } cache_set;
mutable std::string cache;
};
} // 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::defile::init
bool init
true if reached the "root" (all pushed arguments have been poped)
Definition defile.hpp:63
libdar::defile::cache_set
enum libdar::defile::@357212250211056354353230002234254230045262314016 cache_set
whether cache is accurate
libdar::defile::cache
std::string cache
cache of "chemin" converted into string
Definition defile.hpp:65
libdar::defile::chemin
path chemin
current path
Definition defile.hpp:62
libdar::path
the class path is here to manipulate paths in the Unix notation: using'/'
Definition path.hpp:51
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
path.hpp
here is the definition of the path class