Initializes an extended regular expression. More...
#include <regexinitializer.h>
Inherited by HGL::Common::URIImpl::_URIInit.
Public Member Functions | |
| RegexInitializer (const char *const pattern, bool nosub=false) | |
| Constructor | |
| virtual | ~RegexInitializer () |
| Destructor | |
| operator const regex_t * () const | |
| Gets the compiled regular expression. | |
Initializes an extended regular expression.
Regular expressions must be compiled before use and freed after use. Therefore it is adviseable to do this in static initialization and destruction. This class will initialize, resp. compile a regular expression in its constructor and freeing it in its destructor.
| RegexInitializer::RegexInitializer | ( | const char *const | pattern, | |
| bool | nosub = false | |||
| ) | [explicit] |
Constructor
Initializes, resp. compiles the regular expression
| pattern | the pattern to compile | |
| nosub | true if the REG_NOSUB flag should be set |
| RegexInitializer::~RegexInitializer | ( | ) | [virtual] |
Destructor
Frees the regular expression
| HGL::Common::RegexInitializer::operator const regex_t * | ( | ) | const |
Gets the compiled regular expression.
1.6.1