Column Selection


Functions

void suplib::colselect (const vector< string > &icolumns, const vector< string > &exact_add, const vector< string > &regex_add, const vector< string > &exact_del, const vector< string > &regex_del, vector< string > &ocolumns) throw ( Exception )
 select columns based on exact/regex matching/exclusion.
bool suplib::match (const string &str, const string &pattern) throw ( Exception )
 handles Perl regular expression matching.

Function Documentation

void suplib::colselect ( const vector< string > &  icolumns,
const vector< string > &  exact_add,
const vector< string > &  regex_add,
const vector< string > &  exact_del,
const vector< string > &  regex_del,
vector< string > &  ocolumns 
) throw ( Exception )

select columns based on exact/regex matching/exclusion.

Parameters:
icolumns vector of column names on which to operate
exact_add column names to add to output
regex_add regular expressions used to add to output
exact_del column names to exclude from output
regex_del regular expressions used to exclude from output
ocolumns set of column names which were selected
Exceptions:
Exception errors related to pattern matching
colselect places strings from the input vector in the output vector based on matches specified by the parameters. Strings appearing in the exact_del parameter are excluded from the output vector. Strings which match the regular expression in regex_del are excluded from the output vector. Strings which do not match any of the *_del parameters but are either present in exact_add or match a regular expression in regex_add are added to the output set.

Definition at line 52 of file colselect.cc.

bool suplib::match ( const string &  str,
const string &  pattern 
) throw ( Exception )

handles Perl regular expression matching.

Parameters:
str the string
pattern the regular expression pattern with which to compare
Exceptions:
Exception errors related to pattern matching
match uses the pcre library's functionality to compare str with pattern.

Returns:
true is str matches pattern, false if not.

Definition at line 45 of file match.cc.


Generated on Thu Oct 2 20:49:06 2008 for suplibxx by  doxygen 1.5.6