Disk ARchive  2.5.10
Full featured and portable backup and archiving tool
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules
Public Member Functions | Protected Attributes | List of all members
libdar::et_mask Class Reference

makes an AND operator between two or more masks More...

#include <mask.hpp>

Inherits libdar::mask.

Inherited by libdar::ou_mask.

Public Member Functions

 et_mask ()
 the constructor to be used by libdar external programs More...
 
 et_mask (const et_mask &m)
 copy constructor
 
const et_maskoperator= (const et_mask &m)
 assignment operator
 
 ~et_mask ()
 destructor
 
void add_mask (const mask &toadd)
 add a mask to the operator More...
 
bool is_covered (const std::string &expression) const
 inherited from the mask class
 
bool is_covered (const path &chemin) const
 check whether the given path is covered by the mask More...
 
maskclone () const
 inherited from the mask class
 
U_I size () const
 the number of mask on which is done the AND operator More...
 
void clear ()
 clear the mask More...
 
- Public Member Functions inherited from libdar::on_pool
void * operator new (size_t n_byte)
 
void * operator new (size_t n_byte, const std::nothrow_t &nothrow_value)
 
void * operator new[] (size_t n_byte)
 
void * operator new[] (size_t n_byte, const std::nothrow_t &nothrow_value)
 
void * operator new (size_t n_byte, memory_pool *p)
 
void * operator new[] (size_t n_byte, memory_pool *p)
 
void operator delete (void *ptr, memory_pool *p)
 this operator is called by the compiler if an exception is throw from the constructor of the allocated object
 
void operator delete[] (void *ptr, memory_pool *p)
 this operator is called by the compiler if an exception is throw from the constructor of the allocated objects
 
void operator delete (void *ptr)
 this is the usual delete operator, modified to handle allocated objects allocated on a memory pool or not
 
void operator delete[] (void *ptr)
 this is the usual delete[] operator, modified to handle allocated objects allocated on a memory pool or not
 

Protected Attributes

std::vector< mask * > lst
 

Additional Inherited Members

- Protected Member Functions inherited from libdar::on_pool
memory_pool * get_pool () const
 
template<class T >
void meta_new (T *&ptr, size_t num)
 
template<class T >
void meta_delete (T *ptr)
 

Detailed Description

makes an AND operator between two or more masks

Definition at line 216 of file mask.hpp.

Constructor & Destructor Documentation

libdar::et_mask::et_mask ( )
inline

the constructor to be used by libdar external programs

Note
at this stage the mask is not usable and will throw an exception until some mask are added to the AND thanks to the add_mask() method

Definition at line 225 of file mask.hpp.

Referenced by clone().

Member Function Documentation

void libdar::et_mask::add_mask ( const mask toadd)

add a mask to the operator

Parameters
[in]toadda mask to add to the AND operator
Note
the mask given in argument has not to survive the et_mask to which it has been added a internal copy of the mask has been done.
void libdar::et_mask::clear ( )
inline

clear the mask

remove all previously added masks

Note
that after this call the mask is no more usable as the AND operator cannot be done on any mask

Definition at line 259 of file mask.hpp.

bool libdar::et_mask::is_covered ( const path chemin) const
inlinevirtual

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.

Reimplemented in libdar::ou_mask.

Definition at line 243 of file mask.hpp.

U_I libdar::et_mask::size ( ) const
inline

the number of mask on which is done the AND operator

Returns
the number of mask that has been added thanks to the add_mask() method
Note
there is no mean to remove a given mask once it has been added (see the clear method)

Definition at line 252 of file mask.hpp.


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