0.5.4
C++ to UML diagram generator based on Clang
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
clanguml::common::regex Struct Reference

Wrapper around std::regex, which contains original pattern. More...

Detailed Description

Wrapper around std::regex, which contains original pattern.

Definition at line 235 of file types.h.

#include <types.h>

Public Member Functions

 regex (std::regex r, std::string p)
 Constructor.
 
bool operator%= (const std::string &v) const
 Regular expression match operator.
 

Public Attributes

std::regex regexp
 
std::string pattern
 

Constructor & Destructor Documentation

◆ regex()

clanguml::common::regex::regex ( std::regex  r,
std::string  p 
)
inline

Constructor.

Parameters
rParsed regular expression
pRaw regular expression pattern used for regenerating config and debugging

Definition at line 243 of file types.h.

244 : regexp{std::move(r)}
245 , pattern{std::move(p)}
246 {
247 }

Member Function Documentation

◆ operator%=()

bool clanguml::common::regex::operator%= ( const std::string &  v) const
inline

Regular expression match operator.

Parameters
vValue to match against internal std::regex
Returns
True, if the argument matches the regular expression

Definition at line 254 of file types.h.

255 {
256 return std::regex_match(v, regexp);
257 }

Member Data Documentation

◆ pattern

std::string clanguml::common::regex::pattern

Original regular expression pattern

Definition at line 260 of file types.h.

◆ regexp

std::regex clanguml::common::regex::regexp

Parsed regular expression

Definition at line 259 of file types.h.


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