/* * CENA C++ Utilities * * by Stephane Chatty * * Copyright 1991, 1992 * Laboratoire de Recherche en Informatique (LRI) * Centre d'Etudes de la Navigation Aerienne (CENA) * * Regular expressions * * $Id$ * $CurLog$ */ #ifndef RegExp_H_ #define RegExp_H_ #include "cplus_bugs.h" #include "bool.h" #ifdef __hpux #define REGCOMP #else #define RE_COMP #endif #ifdef REGCOMP /* POSIX version of regular expressions */ class CcuRegExp { private: const char* String; void* Compiled; public: inline CcuRegExp (const char* s) : String (s), Compiled (0) {} ~CcuRegExp (); bool Compile (); bool Match (const char*); inline const char* GetExpr () {return String;} }; #endif /* REGCOMP */ #ifdef RE_COMP class CcuRegExp { private: const char* String; static CcuRegExp* Compiled; public: inline CcuRegExp (const char* s) : String (s) {} inline ~CcuRegExp () {}; bool Compile (); bool Match (const char*); inline const char* GetExpr () {return String;} }; #endif /* RE_COMP */ #if !defined(REGCOMP) && !defined(RE_COMP) class CcuRegExp { private: const char* String; char* Compiled; public: inline CcuRegExp (const char* s) : String (s), Compiled (0) {} ~CcuRegExp (); bool Compile (); bool Match (const char*); inline const char* GetExpr () { return String; } }; #endif /* !REGCOMP && !RE_COMP */ #endif /* RegExp_H_ */