coan  6.0.1
A C/C++ Configuration Analyzer
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
dataset::selector Struct Reference

Encapsulates the selection of files for processing. More...

#include <dataset.h>

Public Member Functions

 selector (std::string const &extensions=std::string())
 Construct from a filter string. More...
 
bool operator() (std::string const &filename)
 Say whether a file is selected for processing. More...
 
unsigned files () const
 Get the number of files so far selected.
 

Private Attributes

std::vector< std::string > _filter_extensions
 A vector of the file extensions that are to be selected.
 
unsigned _files
 The number of files so far selected.
 

Detailed Description

Encapsulates the selection of files for processing.

struct selector encapsulates the selection of files for processing that satisfy the --filter option.

Definition at line 57 of file dataset.h.

Constructor & Destructor Documentation

dataset::selector::selector ( std::string const &  extensions = std::string())
explicit

Construct from a filter string.

Explicitly construct given a filter string.

Parameters
extensionsAn empty string or else a comma-punctuated list of the extensions of files that are to be selected.

Definition at line 76 of file dataset.cpp.

Member Function Documentation

bool dataset::selector::operator() ( std::string const &  filename)

Say whether a file is selected for processing.

Parameters
filenameThe name of the file to be tested.
Returns
True iff the file is selected.

Definition at line 91 of file dataset.cpp.


The documentation for this struct was generated from the following files: