Disk ARchive  2.5.4
Full featured and portable backup and archiving tool
mask_list.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 
28 
29 #ifndef MASK_LIST_HPP
30 #define MASK_LIST_HPP
31 
32 #include "../my_config.h"
33 
34 #include "mask.hpp"
35 
36 #include <string>
37 
38 namespace libdar
39 {
40 
43 
49 
50  class mask_list : public mask
51  {
52  public:
53 
55 
63  mask_list(const std::string & filename_list_st, bool case_sensit, const path & prefix, bool include);
64 
66  bool is_covered(const std::string & expression) const;
68  mask *clone() const { return new (get_pool()) mask_list(*this); };
69 
71  U_I size() const { return contenu.size(); };
72 
73  private:
74 
75  std::vector <std::string> contenu;
76  U_I taille;
77  bool case_s;
78  bool including; // mask is used for including files (not for excluding files)
79  };
80 
82 
83 } // end of namespace
84 
85 #endif
the generic class, parent of all masks
Definition: mask.hpp:61
U_I size() const
routing only necessary for doing some testing
Definition: mask_list.hpp:71
mask_list(const std::string &filename_list_st, bool case_sensit, const path &prefix, bool include)
the constructor
memory_pool * get_pool() const
Definition: on_pool.hpp:144
bool is_covered(const std::string &expression) const
inherited from the mask class
here lies a collection of mask classes
mask * clone() const
inherited from the mask class
Definition: mask_list.hpp:68
libdar namespace encapsulate all libdar symbols
Definition: archive.hpp:47
the class path is here to manipulate paths in the Unix notation: using&#39;/&#39;
Definition: path.hpp:50