Changeset 798 in webkit for trunk/JavaScriptCore/kjs/regexp_object.h
- Timestamp:
- Mar 21, 2002, 4:31:57 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/regexp_object.h
r6 r798 1 // -*- c-basic-offset: 2 -*- 1 2 /* 2 3 * This file is part of the KDE libraries … … 16 17 * License along with this library; if not, write to the Free Software 17 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * 20 * $Id$ 18 21 */ 19 22 … … 21 24 #define _REGEXP_OBJECT_H_ 22 25 23 #include "object.h" 24 #include "function.h" 26 #include "internal.h" 27 #include "function_object.h" 28 #include "regexp.h" 25 29 26 30 namespace KJS { 27 28 class RegExp Object : public ConstructorImp {31 class ExecState; 32 class RegExpPrototypeImp : public ObjectImp { 29 33 public: 30 RegExp Object(const Object& funcProto, const Object ®Proto);31 Completion execute(const List &);32 Object construct(const List &);34 RegExpPrototypeImp(ExecState *exec, 35 ObjectPrototypeImp *objProto, 36 FunctionPrototypeImp *funcProto); 33 37 }; 34 38 35 class RegExpProto type : public ObjectImp {39 class RegExpProtoFuncImp : public InternalFunctionImp { 36 40 public: 37 RegExpPrototype(const Object& proto); 38 KJSO get(const UString &p) const; 39 }; 41 RegExpProtoFuncImp(ExecState *exec, 42 FunctionPrototypeImp *funcProto, int i, int len); 40 43 41 class RegExpProtoFunc : public InternalFunctionImp { 42 public: 43 RegExpProtoFunc(int i) : id(i) { } 44 Completion execute(const List &); 44 virtual bool implementsCall() const; 45 virtual Value call(ExecState *exec, Object &thisObj, const List &args); 46 45 47 enum { Exec, Test, ToString }; 46 48 private: … … 48 50 }; 49 51 52 class RegExpImp : public ObjectImp { 53 public: 54 RegExpImp(RegExpPrototypeImp *regexpProto); 55 ~RegExpImp(); 56 void setRegExp(RegExp *r) { reg = r; } 57 RegExp* regExp() const { return reg; } 58 59 virtual const ClassInfo *classInfo() const { return &info; } 60 static const ClassInfo info; 61 private: 62 RegExp *reg; 63 }; 64 65 class RegExpObjectImp : public InternalFunctionImp { 66 public: 67 RegExpObjectImp(ExecState *exec, 68 RegExpPrototypeImp *regProto, 69 FunctionPrototypeImp *funcProto); 70 virtual ~RegExpObjectImp(); 71 virtual bool implementsConstruct() const; 72 virtual Object construct(ExecState *exec, const List &args); 73 virtual bool implementsCall() const; 74 virtual Value call(ExecState *exec, Object &thisObj, const List &args); 75 76 Value get(ExecState *exec, const UString &p) const; 77 int ** registerRegexp( const RegExp* re, const UString& s ); 78 Value arrayOfMatches(ExecState *exec, const UString &result) const; 79 private: 80 UString lastString; 81 int *lastOvector; 82 uint lastNrSubPatterns; 83 }; 84 50 85 }; // namespace 51 86
Note:
See TracChangeset
for help on using the changeset viewer.