home *** CD-ROM | disk | FTP | other *** search
- #ifndef __RWREGEXP_H__
- #define __RWREGEXP_H__
- pragma push_align_members(64);
-
- /*
- * Declarations for class RWRegexp --- Regular Expression
- *
- * $Header: E:/vcs/rw/regexp.h_v 1.3 04 Mar 1992 10:22:14 KEFFER $
- *
- ****************************************************************************
- *
- * Rogue Wave Software, Inc.
- * P.O. Box 2328
- * Corvallis, OR 97339
- * Voice: (503) 754-3010 FAX: (503) 757-6650
- *
- * Copyright (C) 1990, 1991. This software is subject to copyright
- * protection under the laws of the United States and other countries.
- *
- ***************************************************************************
- *
- * $Log: E:/vcs/rw/regexp.h_v $
- *
- * Rev 1.3 04 Mar 1992 10:22:14 KEFFER
- * RWString -> RWCString
- *
- * Rev 1.1 28 Oct 1991 09:08:20 keffer
- * Changed inclusions to <rw/xxx.h>
- *
- * Rev 1.0 28 Jul 1991 08:16:10 keffer
- * Tools.h++ V4.0.5 PVCS baseline version
- *
- */
-
- #include "rw/defs.h"
- class RWExport RWCString;
-
- class RWExport RWRegexp {
- public:
- enum statVal {OK=0, ILLEGAL, TOOLONG};
- RWRegexp(const char*);
- RWRegexp(const RWRegexp&);
- ~RWRegexp();
-
- RWRegexp& operator=(const RWRegexp&);
- RWRegexp& operator=(const char*); // Recompiles pattern
- int index(const RWCString& str, int* len, int start=0) const;
- statVal status(); // Return & clear status
- private:
- void copyPattern(const RWRegexp&);
- void genPattern(const char*);
- unsigned char* thePattern; // Compiled pattern
- statVal stat; // Status
- static const unsigned maxpat; // Max length of compiled pattern
- };
-
- pragma pop_align_members();
- #endif /* __RWREGEXP_H__ */
-