Synesis Software STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ...

Pattern Class Reference
[C++ API]

#include <shwild/shwild.hpp>

List of all members.


Detailed Description

Facade for the shwild C API.


Public Member Functions

 Pattern (char const *pattern, unsigned flags=0)
 Parses and precompiles the given pattern, according to the behaviour specified by the given flags.
 Pattern (slice_t const *pattern, unsigned flags=0)
 Parses and precompiles the given pattern, according to the behaviour specified by the given flags.
 Pattern (slice_t const &pattern, unsigned flags=0)
 Parses and precompiles the given pattern, according to the behaviour specified by the given flags.
 ~Pattern ()
 Releases any resources associated with the instance.
bool match (char const *string) const
 Match the given string against the precompiled pattern maintained as member state.
bool match (slice_t const *string) const
 Match the given string against the precompiled pattern maintained as member state.
bool match (slice_t const &string) const
 Match the given string against the precompiled pattern maintained as member state.
int numMatched () const
 The number of potential matches (including the end marker) in the compiled pattern.


Constructor & Destructor Documentation

Pattern ( char const *  pattern,
unsigned  flags = 0 
) [inline, explicit]

Parses and precompiles the given pattern, according to the behaviour specified by the given flags.

Note:
If the parsing fails, an instance of PatternException is thrown

Pattern ( slice_t const *  pattern,
unsigned  flags = 0 
) [inline, explicit]

Parses and precompiles the given pattern, according to the behaviour specified by the given flags.

Note:
If the parsing fails, an instance of PatternException is thrown

Pattern ( slice_t const &  pattern,
unsigned  flags = 0 
) [inline, explicit]

Parses and precompiles the given pattern, according to the behaviour specified by the given flags.

Note:
If the parsing fails, an instance of PatternException is thrown

~Pattern (  )  [inline]

Releases any resources associated with the instance.


Member Function Documentation

bool match ( char const *  string  )  const [inline]

Match the given string against the precompiled pattern maintained as member state.

bool match ( slice_t const *  string  )  const [inline]

Match the given string against the precompiled pattern maintained as member state.

bool match ( slice_t const &  string  )  const [inline]

Match the given string against the precompiled pattern maintained as member state.

int numMatched (  )  const [inline]

The number of potential matches (including the end marker) in the compiled pattern.

Note:
For compilation without exception support, this will be <0 if a compilation error occurred


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

b64 Library documentation © Synesis Software Pty Ltd, 2004-2012