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

shwild/shwild.h File Reference


Detailed Description

[C/C++] This is the root file of the shwild C-API

#include <stddef.h>

Go to the source code of this file.

Namespaces

namespace  shwild

Classes

struct  shwild_slice_t
 Length-aware string. More...

Defines

#define SHWILD_VER_MAJOR   0
 The major version number of shwild.
#define SHWILD_VER_MINOR   9
 The minor version number of shwild.
#define SHWILD_VER_REVISION   20
 The revision version number of shwild.
#define SHWILD_VER   SHWILD_VER_0_9_20
 The current composite version number of shwild.
#define SHWILD_F_SUPPRESS_RANGE_SUPPORT   (0x0001)
#define SHWILD_F_SUPPRESS_BACKSLASH_ESCAPE   (0x0002)
#define SHWILD_F_SUPPRESS_RANGE_CONTINUUM_SUPPORT   (0x0004)
#define SHWILD_F_SUPPRESS_RANGE_CONTINUUM_HIGHLOW_SUPPORT   (0x0008)
#define SHWILD_F_SUPPRESS_RANGE_CONTINUUM_CROSSCASE_SUPPORT   (0x0010)
#define SHWILD_F_SUPPRESS_RANGE_LITERAL_WILDCARD_SUPPORT   (0x0020)
#define SHWILD_F_SUPPRESS_RANGE_LEADTRAIL_LITERAL_HYPHEN_SUPPORT   (0x0040)
#define SHWILD_F_SUPPRESS_RANGE_NOT_SUPPORT   (0x0400)
#define SHWILD_F_IGNORE_CASE   (0x0200)
#define SHWILD_RC_SUCCESS   (0)
#define SHWILD_RC_ALLOC_ERROR   (SHWILD_RC_ERROR_BASE_ - 1)
#define SHWILD_RC_PARSE_ERROR   (SHWILD_RC_ERROR_BASE_ - 2)
#define SHWILD_RC_UNSPECIFIED   (SHWILD_RC_ERROR_BASE_ - 3)

Typedefs

typedef struct shwild_handle_t_ * shwild_handle_t
 Handle to compiled pattern.
typedef shwild_slice_t slice_t
 C++ synonym for shwild_slice_t.

Functions

int shwild_init (void)
 Initialises the shwild API.
void shwild_uninit (void)
 Uninitialises the shwild API.
int shwild_match (char const *pattern, char const *string, unsigned flags)
 Matches a string against an shwild pattern.
int shwild_match_s (shwild_slice_t const *pattern, shwild_slice_t const *string, unsigned flags)
 Synonym for shwild_match() using length-aware string arguments.
int shwild_compile_pattern (char const *pattern, unsigned flags, shwild_handle_t *phCompiledPattern)
 Compiles a pattern into an efficient form for use in multiple match operations.
int shwild_compile_pattern_s (shwild_slice_t const *pattern, unsigned flags, shwild_handle_t *phCompiledPattern)
 Synonym for shwild_compile_pattern() using length-aware string arguments.
int shwild_match_pattern (shwild_handle_t hCompiledPattern, char const *string)
 Matches a string against against a pre-compiled shwild pattern.
int shwild_match_pattern_s (shwild_handle_t hCompiledPattern, shwild_slice_t const *string)
 Synonym for shwild_match_pattern() using length-aware string arguments.
void shwild_destroy_pattern (shwild_handle_t hCompiledPattern)
 Releases all resources associated with a pre-compiled shwild pattern.
int match (char const *pattern, char const *string, unsigned flags=0)
 C++ overload synonym for shwild_match().
int compile_pattern (char const *pattern, unsigned flags, shwild_handle_t *phCompiledPattern)
 C++ overload synonym for shwild_compile_pattern().
int match_pattern (shwild_handle_t hCompiledPattern, char const *string)
 C++ overload synonym for shwild_match_pattern().
void destroy_pattern (shwild_handle_t hCompiledPattern)
 C++ overload synonym for shwild_destroy_pattern().


Define Documentation

#define SHWILD_VER   SHWILD_VER_0_9_20

The current composite version number of shwild.

#define SHWILD_VER_MAJOR   0

The major version number of shwild.

#define SHWILD_VER_MINOR   9

The minor version number of shwild.

#define SHWILD_VER_REVISION   20

The revision version number of shwild.


Function Documentation

int shwild_init ( void   ) 

Initialises the shwild API.

Returns:
Status indicating whether initialisation was successful
Return values:
<0 An error
>=0 Initialisation was successful

void shwild_uninit ( void   ) 

Uninitialises the shwild API.

Remarks:
Must be called once for each successful call to shwild_init().


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