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

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

cat_nomme.hpp
Go to the documentation of this file.
1 /*********************************************************************/
2 // dar - disk archive - a backup/restoration program
3 // Copyright (C) 2002-2052 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 //
19 // to contact the author : http://dar.linux.free.fr/email.html
20 /*********************************************************************/
21
25
26 #ifndef CAT_NOMME_HPP
27 #define CAT_NOMME_HPP
28
29 #include "../my_config.h"
30
31 extern "C"
32 {
33 } // end extern "C"
34
35 #include <string>
36 #include "cat_entree.hpp"
37
38 namespace libdar
39 {
42
44 class cat_nomme : public cat_entree
45 {
46 public:
47 cat_nomme(const std::string & name) { xname = name; };
48 cat_nomme(const smart_pointer<pile_descriptor> & pdesc, bool small);
49 bool operator == (const cat_entree & ref) const;
50 virtual bool operator < (const cat_nomme & ref) const { return xname < ref.xname; };
51 virtual ~cat_nomme() throw(Ebug) {};
52
53 const std::string & get_name() const { return xname; };
54 void change_name(const std::string & x) { xname = x; };
55
59 bool same_as(const cat_nomme & ref) const { return xname == ref.xname; };
60
61 // signature() is kept as an abstract method
62 // clone() is also ketp abstract
63
64 protected:
65 void inherited_dump(const pile_descriptor & pdesc, bool small) const;
66
67 private:
68 std::string xname;
69
70 };
71
72
74
75 } // end of namespace
76
77 #endif
libdar::cat_nomme
the base class for all entry that have a name
Definition: cat_nomme.hpp:44
cat_entree.hpp
base class for all object contained in a catalogue
libdar::smart_pointer< pile_descriptor >
libdar::Ebug
exception used to signal a bug. A bug is triggered when reaching some code that should never be reach...
Definition: erreurs.hpp:137
libdar::cat_nomme::inherited_dump
void inherited_dump(const pile_descriptor &pdesc, bool small) const
inherited class may overload this method but shall first call the parent's inherited_dump() in the ov...
libdar::cat_nomme::same_as
bool same_as(const cat_nomme &ref) const
Definition: cat_nomme.hpp:59
libdar::cat_entree
the root class from all other inherite for any entry in the catalogue
Definition: cat_entree.hpp:85
libdar::cat_nomme::operator==
bool operator==(const cat_entree &ref) const
returns true if the two object have the same content
libdar
libdar namespace encapsulate all libdar symbols
Definition: archive.hpp:47