bes
Updated for version 3.20.6
BESRegex.h
1
// BESRegex.h
2
3
// This file is part of bes, A C++ back-end server implementation framework
4
// for the OPeNDAP Data Access Protocol.
5
6
// Copyright (c) 2004-2009 University Corporation for Atmospheric Research
7
// Author: Patrick West <pwest@ucar.edu> and Jose Garcia <jgarcia@ucar.edu>
8
// and James Gallagher <jgallagher@gso.uri.edu>
9
//
10
// This library is free software; you can redistribute it and/or
11
// modify it under the terms of the GNU Lesser General Public
12
// License as published by the Free Software Foundation; either
13
// version 2.1 of the License, or (at your option) any later version.
14
//
15
// This library is distributed in the hope that it will be useful,
16
// but WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
// Lesser General Public License for more details.
19
//
20
// You should have received a copy of the GNU Lesser General Public
21
// License along with this library; if not, write to the Free Software
22
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23
//
24
// You can contact University Corporation for Atmospheric Research at
25
// 3080 Center Green Drive, Boulder, CO 80301
26
27
// (c) COPYRIGHT University Corporation for Atmospheric Research 2004-2005
28
// Please read the full copyright statement in the file COPYRIGHT_UCAR.
29
//
30
// Authors:
31
// pwest Patrick West <pwest@ucar.edu>
32
// jgarcia Jose Garcia <jgarcia@ucar.edu>
33
// jimg James Gallagher <jgallagher@gso.uri.edu>
34
35
#ifndef _BESRegex_h
36
#define _BESRegex_h 1
37
41
class
BESRegex
42
{
43
private
:
44
// d_preg was a regex_t* but I needed to include both regex.h and config.h
45
// to make the gnulib code work. Because this header is installed (and is
46
// used by other libraries) it cannot include config.h, so I moved the
47
// regex.h and config.h (among other) includes to the implementation. It
48
// would be cleaner to use a special class, but for one field that seems
49
// like overkill.
50
void
*d_preg;
51
void
init(
const
char
*t);
52
53
public
:
54
BESRegex
(
const
char
*t);
55
BESRegex
(
const
char
*t,
int
dummy);
56
~
BESRegex
();
57
59
int
match
(
const
char
* s,
int
len,
int
pos = 0);
61
int
search
(
const
char
* s,
int
len,
int
& matchlen,
int
pos = 0);
62
};
63
64
#endif
BESRegex::BESRegex
BESRegex(const char *t)
Definition:
BESRegex.cc:83
BESRegex::search
int search(const char *s, int len, int &matchlen, int pos=0)
How much of the string does the pattern matche.
Definition:
BESRegex.cc:135
BESRegex
Definition:
BESRegex.h:41
BESRegex::match
int match(const char *s, int len, int pos=0)
Does the pattern match.
Definition:
BESRegex.cc:105
dispatch
BESRegex.h
Generated by
1.8.17