/[pcre]/code/trunk/pcrecpparg.h.in
ViewVC logotype

Diff of /code/trunk/pcrecpparg.h.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 87 by nigel, Sat Feb 24 21:41:21 2007 UTC revision 263 by ph10, Mon Nov 12 16:53:25 2007 UTC
# Line 35  Line 35 
35  #include <stdlib.h>    // for NULL  #include <stdlib.h>    // for NULL
36  #include <string>  #include <string>
37    
38    #include <pcre.h>
39    
40  namespace pcrecpp {  namespace pcrecpp {
41    
42  class StringPiece;  class StringPiece;
# Line 46  template Line 48  template
48  class _RE_MatchObject {  class _RE_MatchObject {
49   public:   public:
50    static inline bool Parse(const char* str, int n, void* dest) {    static inline bool Parse(const char* str, int n, void* dest) {
51        if (dest == NULL) return true;
52      T* object = reinterpret_cast<T*>(dest);      T* object = reinterpret_cast<T*>(dest);
53      return object->ParseFrom(str, n);      return object->ParseFrom(str, n);
54    }    }
55  };  };
56    
57  class Arg {  class PCRECPP_EXP_DEFN Arg {
58   public:   public:
59    // Empty constructor so we can declare arrays of Arg    // Empty constructor so we can declare arrays of Arg
60    Arg();    Arg();
# Line 148  inline bool Arg::Parse(const char* str, Line 151  inline bool Arg::Parse(const char* str,
151    inline Arg CRadix(type* ptr) { \    inline Arg CRadix(type* ptr) { \
152      return Arg(ptr, Arg::parse_ ## name ## _cradix); }      return Arg(ptr, Arg::parse_ ## name ## _cradix); }
153    
154  MAKE_INTEGER_PARSER(short,              short);  MAKE_INTEGER_PARSER(short,              short)     /*                        */
155  MAKE_INTEGER_PARSER(unsigned short,     ushort);  MAKE_INTEGER_PARSER(unsigned short,     ushort)    /*                        */
156  MAKE_INTEGER_PARSER(int,                int);  MAKE_INTEGER_PARSER(int,                int)       /* Don't use semicolons   */
157  MAKE_INTEGER_PARSER(unsigned int,       uint);  MAKE_INTEGER_PARSER(unsigned int,       uint)      /* after these statement  */
158  MAKE_INTEGER_PARSER(long,               long);  MAKE_INTEGER_PARSER(long,               long)      /* because they can cause */
159  MAKE_INTEGER_PARSER(unsigned long,      ulong);  MAKE_INTEGER_PARSER(unsigned long,      ulong)     /* compiler warnings if   */
160  #if @pcre_have_long_long@  #if @pcre_have_long_long@                          /* the checking level is  */
161  MAKE_INTEGER_PARSER(long long,          longlong);  MAKE_INTEGER_PARSER(long long,          longlong)  /* turned up high enough. */
162  #endif  #endif                                             /*                        */
163  #if @pcre_have_ulong_long@  #if @pcre_have_ulong_long@                         /*                        */
164  MAKE_INTEGER_PARSER(unsigned long long, ulonglong);  MAKE_INTEGER_PARSER(unsigned long long, ulonglong) /*                        */
165  #endif  #endif
166    
167  #undef PCRE_IS_SET  #undef PCRE_IS_SET

Legend:
Removed from v.87  
changed lines
  Added in v.263

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12