summaryrefslogtreecommitdiffstats
path: root/libqpdf/qpdf/PCRE.hh
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2009-10-21 02:27:24 +0200
committerJay Berkenbilt <ejb@ql.org>2009-10-21 02:27:24 +0200
commit748ab301d4f17c77393b08de4ef541b957bde275 (patch)
tree5801b2c2f64a3ea3873bfd46fb3ac0cfeb9cc411 /libqpdf/qpdf/PCRE.hh
parenteff113fa6891387fc16c179ab5ef6f15674513ec (diff)
downloadqpdf-748ab301d4f17c77393b08de4ef541b957bde275.tar.zst
go back to function-based DLL_EXPORT rather than class-based to avoid creation of export files with executables under msvc
git-svn-id: svn+q:///qpdf/trunk@849 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'libqpdf/qpdf/PCRE.hh')
-rw-r--r--libqpdf/qpdf/PCRE.hh17
1 files changed, 16 insertions, 1 deletions
diff --git a/libqpdf/qpdf/PCRE.hh b/libqpdf/qpdf/PCRE.hh
index ad7d960a..546c374d 100644
--- a/libqpdf/qpdf/PCRE.hh
+++ b/libqpdf/qpdf/PCRE.hh
@@ -17,7 +17,7 @@
// Note: this class does not encapsulate all features of the PCRE
// package -- only those that I actually need right now are here.
-class DLL_EXPORT PCRE
+class PCRE
{
public:
// This is thrown when an attempt is made to access a non-existent
@@ -25,6 +25,7 @@ class DLL_EXPORT PCRE
class NoBackref: public std::logic_error
{
public:
+ DLL_EXPORT
NoBackref();
virtual ~NoBackref() throw() {}
};
@@ -33,10 +34,15 @@ class DLL_EXPORT PCRE
{
friend class PCRE;
public:
+ DLL_EXPORT
Match(int nbackrefs, char const* subject);
+ DLL_EXPORT
Match(Match const&);
+ DLL_EXPORT
Match& operator=(Match const&);
+ DLL_EXPORT
~Match();
+ DLL_EXPORT
operator bool();
// All the back reference accessing routines may throw the
@@ -48,9 +54,13 @@ class DLL_EXPORT PCRE
// and not matching at all.
// see getMatch flags below
+ DLL_EXPORT
std::string getMatch(int n, int flags = 0);
+ DLL_EXPORT
void getOffsetLength(int n, int& offset, int& length);
+ DLL_EXPORT
int getOffset(int n);
+ DLL_EXPORT
int getLength(int n);
// nMatches returns the number of available matches including
@@ -60,6 +70,7 @@ class DLL_EXPORT PCRE
// will return the whole string, getMatch(1) will return the
// text that matched the backreference, and getMatch(2) will
// throw an exception because it is out of range.
+ DLL_EXPORT
int nMatches() const;
// Flags for getMatch
@@ -82,12 +93,16 @@ class DLL_EXPORT PCRE
// The value passed in as options is passed to pcre_exec. See man
// pcreapi for details.
+ DLL_EXPORT
PCRE(char const* pattern, int options = 0);
+ DLL_EXPORT
~PCRE();
+ DLL_EXPORT
Match match(char const* subject, int options = 0, int startoffset = 0,
int size = -1);
+ DLL_EXPORT
static void test(int n = 0);
private: