libabigail
Classes | Namespaces | Functions
abg-regex.h File Reference

Wrappers around regex types and functions. More...

#include <regex.h>
#include <memory>
#include <string>
#include <vector>
#include "abg-sptr-utils.h"
Include dependency graph for abg-regex.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  escape
 A class to hold a reference to a string to regex escape. More...
 
struct  regex_t_deleter
 A delete functor for a shared_ptr of regex_t. More...
 

Namespaces

 abigail
 Toplevel namespace for libabigail.
 
 abigail::regex
 Namespace for regex types and functions.
 
 abigail::sptr_utils
 Namespace for the utilities to wrap C types into std::shared_ptr.
 

Functions

template<>
regex::regex_t_sptr build_sptr< regex_t > ()
 Specialization of sptr_utils::build_sptr for regex_t. More...
 
template<>
regex::regex_t_sptr build_sptr< regex_t > (regex_t *p)
 Specialization of sptr_utils::build_sptr for regex_t. More...
 
regex_t_sptr compile (const std::string &str)
 Compile a regex from a string. More...
 
std::string generate_from_strings (const std::vector< std::string > &strs)
 Generate a regex pattern equivalent to testing set membership. More...
 
bool match (const regex_t_sptr &r, const std::string &str)
 See if a string matches a regex. More...
 
std::ostream & operator<< (std::ostream &os, const escape &esc)
 Escape regex special charaters in input string. More...
 

Detailed Description

Wrappers around regex types and functions.

Definition in file abg-regex.h.