HGL::Common::RegexInitializer Class Reference
[Utility classes]

Initializes an extended regular expression. More...

#include <regexinitializer.h>

Inherited by HGL::Common::URIImpl::_URIInit.

List of all members.

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.

Detailed Description

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.

Author:
Heiko Schäfer <heiko@hgl.rangun.de>

Constructor & Destructor Documentation

RegexInitializer::RegexInitializer ( const char *const   pattern,
bool  nosub = false 
) [explicit]

Constructor

Initializes, resp. compiles the regular expression

Parameters:
pattern the pattern to compile
nosub true if the REG_NOSUB flag should be set
RegexInitializer::~RegexInitializer (  )  [virtual]

Destructor

Frees the regular expression


Member Function Documentation

HGL::Common::RegexInitializer::operator const regex_t * (  )  const

Gets the compiled regular expression.

Returns:
the compiled regular expression

Generated on 9 Apr 2014 for hgl 0.5.26~svn by  doxygen 1.6.1