Disk ARchive 2.7.16
Full featured and portable backup and archiving tool
Public Member Functions | Private Attributes | List of all members
libdar::simple_path_mask Class Reference

string matches if it is subdir of mask or mask is a subdir of expression More...

#include <mask.hpp>

+ Inheritance diagram for libdar::simple_path_mask:
+ Collaboration diagram for libdar::simple_path_mask:

Public Member Functions

 simple_path_mask (const path &p, bool case_sensit)
 the constructor to be used by libdar external programs More...
 
 simple_path_mask (const simple_path_mask &ref)=default
 
 simple_path_mask (simple_path_mask &&ref) noexcept=default
 
simple_path_maskoperator= (const simple_path_mask &ref)=default
 
simple_path_maskoperator= (simple_path_mask &&ref) noexcept=default
 
bool is_covered (const std::string &expression) const override
 inherited from the mask class More...
 
bool is_covered (const path &chemin) const override
 check whether the given path is covered by the mask More...
 
std::string dump (const std::string &prefix) const override
 dump in human readable form the nature of the mask More...
 
maskclone () const override
 inherited from the mask class More...
 
- Public Member Functions inherited from libdar::mask
 mask (const mask &ref)=default
 
 mask (mask &&ref) noexcept=default
 
maskoperator= (const mask &ref)=default
 
maskoperator= (mask &&ref) noexcept=default
 
virtual bool is_covered (const std::string &expression) const =0
 check wether the given string is covered by the mask More...
 
virtual bool is_covered (const path &chemin) const
 check whether the given path is covered by the mask More...
 
virtual std::string dump (const std::string &prefix="") const =0
 dump in human readable form the nature of the mask More...
 
virtual maskclone () const =0
 

Private Attributes

path chemin
 
bool case_s
 

Detailed Description

string matches if it is subdir of mask or mask is a subdir of expression

Definition at line 395 of file mask.hpp.

Constructor & Destructor Documentation

◆ simple_path_mask()

libdar::simple_path_mask::simple_path_mask ( const path p,
bool  case_sensit 
)
inline

the constructor to be used by libdar external programs

Parameters
[in]pthe path the compare with
[in]case_sensitwhether the mask is case sensitive or not
Note
p must be a valid path

Definition at line 403 of file mask.hpp.

Referenced by clone().

Member Function Documentation

◆ clone()

mask * libdar::simple_path_mask::clone ( ) const
inlineoverridevirtual

inherited from the mask class

Implements libdar::mask.

Definition at line 416 of file mask.hpp.

References simple_path_mask().

◆ dump()

std::string libdar::simple_path_mask::dump ( const std::string &  prefix) const
overridevirtual

dump in human readable form the nature of the mask

Parameters
[in]prefixused for indentation withing the output string

Implements libdar::mask.

◆ is_covered() [1/2]

bool libdar::simple_path_mask::is_covered ( const path chemin) const
overridevirtual

check whether the given path is covered by the mask

Parameters
[in]cheminis the path to check
Returns
true if the given path is covered by the mask
Note
only libdar internally needs to call this method
this is an optional method to the previous one, it can be overwritten

Reimplemented from libdar::mask.

◆ is_covered() [2/2]

bool libdar::simple_path_mask::is_covered ( const std::string &  expression) const
inlineoverridevirtual

inherited from the mask class

Implements libdar::mask.

Definition at line 411 of file mask.hpp.

Member Data Documentation

◆ case_s

bool libdar::simple_path_mask::case_s
private

Definition at line 420 of file mask.hpp.

◆ chemin

path libdar::simple_path_mask::chemin
private

Definition at line 419 of file mask.hpp.


The documentation for this class was generated from the following file: