libdar::regular_mask Class Reference
API

matches regular expressions (see "man 7 regex") More...

`#include <mask.hpp>`

Inherits libdar::mask.

## Public Member Functions

| regular_mask (const std::string &wilde_card_expression, bool x_case_sensit)
| the constructor to be used by libdar external programs More...
| regular_mask (const regular_mask &ref)
| the copy constructor More...
| regular_mask (regular_mask &&ref) noexcept
| the move constructor More...
regular_mask & | operator= (const regular_mask &ref)
| the assignment operator
regular_mask & | operator= (regular_mask &&ref) noexcept
| the move operator
virtual | ~regular_mask ()
| destructor More...
bool | is_covered (const std::string &expression) const override
| inherited from the mask class More...
std::string | dump (const std::string &prefix) const override
| inherited from the mask class More...
mask * | clone () 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
mask & | operator= (const mask &ref)=default
mask & | operator= (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 mask * | clone () const =0

## Private Member Functions

void | set_preg (const std::string &wilde_card_expression, bool x_case_sensit)
void | copy_from (const regular_mask &ref)
void | move_from (regular_mask &&ref) noexcept
void | detruit () noexcept

## Private Attributes

regex_t | preg
std::string | mask_exp
| used only by the copy constructor More...
bool | case_sensit
| used only by the copy constructor More...

## Detailed Description

matches regular expressions (see "man 7 regex")

Definition at line 173 of file mask.hpp.

## Constructor & Destructor Documentation

## regular_mask() [1/3]

libdar::regular_mask::regular_mask | ( | const std::string & | wilde_card_expression,
|  | bool | x_case_sensit
| ) |  |

the constructor to be used by libdar external programs

Parameters

  [in] | wilde_card_expression | is the regular expression that defines the mask
  [in] | x_case_sensit | whether the mask is case sensitive or not

Referenced by clone().

## regular_mask() [2/3]

libdar::regular_mask::regular_mask | ( | const regular_mask & | ref | ) |

inline

the copy constructor

Definition at line 185 of file mask.hpp.

## regular_mask() [3/3]

libdar::regular_mask::regular_mask | ( | regular_mask && | ref | ) |

inlinenoexcept

the move constructor

Definition at line 188 of file mask.hpp.

## ~regular_mask()

virtual libdar::regular_mask::~regular_mask | ( |  | ) |

inlinevirtual

destructor

Definition at line 197 of file mask.hpp.

## Member Function Documentation

## clone()

mask * libdar::regular_mask::clone | ( |  | ) | const

inlineoverridevirtual

inherited from the mask class

Implements libdar::mask.

Definition at line 206 of file mask.hpp.

References regular_mask().

## detruit()

void libdar::regular_mask::detruit | ( |  | ) |

inlineprivatenoexcept

Definition at line 218 of file mask.hpp.

## dump()

std::string libdar::regular_mask::dump | ( | const std::string & | prefix | ) | const

overridevirtual

inherited from the mask class

Implements libdar::mask.

## is_covered()

bool libdar::regular_mask::is_covered | ( | const std::string & | expression | ) | const

overridevirtual

inherited from the mask class

Implements libdar::mask.

## Member Data Documentation

## case_sensit

bool libdar::regular_mask::case_sensit

private

used only by the copy constructor

Definition at line 211 of file mask.hpp.

## mask_exp

std::string libdar::regular_mask::mask_exp

private

used only by the copy constructor

Definition at line 210 of file mask.hpp.

## preg

regex_t libdar::regular_mask::preg

private

Definition at line 209 of file mask.hpp.

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

- mask.hpp