Changeset 1799 in webkit for trunk/JavaScriptCore/kjs/object.h
- Timestamp:
- Aug 12, 2002, 1:14:02 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/object.h
r1623 r1799 80 80 class Object : public Value { 81 81 public: 82 Object() ;82 Object() { } 83 83 explicit Object(ObjectImp *v); 84 Object(const Object &v); 85 virtual ~Object(); 86 87 Object& operator=(const Object &v); 88 89 virtual const ClassInfo *classInfo() const; 84 85 ObjectImp *imp() const; 86 87 const ClassInfo *classInfo() const; 90 88 bool inherits(const ClassInfo *cinfo) const; 91 89 … … 133 131 */ 134 132 Value get(ExecState *exec, const UString &propertyName) const; 133 Value get(ExecState *exec, unsigned propertyName) const; 135 134 136 135 /** … … 145 144 void put(ExecState *exec, const UString &propertyName, 146 145 const Value &value, int attr = None); 146 void put(ExecState *exec, unsigned propertyName, 147 const Value &value, int attr = None); 147 148 148 149 /** … … 169 170 */ 170 171 bool hasProperty(ExecState *exec, const UString &propertyName) const; 172 bool hasProperty(ExecState *exec, unsigned propertyName) const; 171 173 172 174 /** … … 182 184 */ 183 185 bool deleteProperty(ExecState *exec, const UString &propertyName); 186 bool deleteProperty(ExecState *exec, unsigned propertyName); 184 187 185 188 /** … … 350 353 }; 351 354 355 inline Object Value::toObject(ExecState *exec) const { return rep->toObject(exec); } 356 352 357 class ObjectImp : public ValueImp { 353 358 public: … … 467 472 // [[Get]] - must be implemented by all Objects 468 473 virtual Value get(ExecState *exec, const UString &propertyName) const; 474 virtual Value get(ExecState *exec, unsigned propertyName) const; 469 475 470 476 /** … … 476 482 virtual void put(ExecState *exec, const UString &propertyName, 477 483 const Value &value, int attr = None); 484 virtual void put(ExecState *exec, unsigned propertyName, 485 const Value &value, int attr = None); 478 486 479 487 /** … … 493 501 virtual bool hasProperty(ExecState *exec, 494 502 const UString &propertyName) const; 503 virtual bool hasProperty(ExecState *exec, unsigned propertyName) const; 495 504 496 505 /** … … 502 511 virtual bool deleteProperty(ExecState *exec, 503 512 const UString &propertyName); 513 virtual bool deleteProperty(ExecState *exec, unsigned propertyName); 504 514 505 515 /** … … 560 570 bool toBoolean(ExecState *exec) const; 561 571 double toNumber(ExecState *exec) const; 562 int toInteger(ExecState *exec) const;563 int toInt32(ExecState *exec) const;564 unsigned int toUInt32(ExecState *exec) const;565 unsigned short toUInt16(ExecState *exec) const;566 572 UString toString(ExecState *exec) const; 567 573 Object toObject(ExecState *exec) const; … … 613 619 }; 614 620 621 inline Object::Object(ObjectImp *v) : Value(v) { } 622 623 inline ObjectImp *Object::imp() const { return static_cast<ObjectImp*>(rep); } 624 625 inline const ClassInfo *Object::classInfo() const 626 { return imp()->classInfo(); } 627 628 inline bool Object::inherits(const ClassInfo *cinfo) const 629 { return imp()->inherits(cinfo); } 630 631 inline Value Object::prototype() const 632 { return Value(imp()->prototype()); } 633 634 inline UString Object::className() const 635 { return imp()->className(); } 636 637 inline Value Object::get(ExecState *exec, const UString &propertyName) const 638 { return imp()->get(exec,propertyName); } 639 640 inline Value Object::get(ExecState *exec, unsigned propertyName) const 641 { return imp()->get(exec,propertyName); } 642 643 inline void Object::put(ExecState *exec, const UString &propertyName, const Value &value, int attr) 644 { imp()->put(exec,propertyName,value,attr); } 645 646 inline void Object::put(ExecState *exec, unsigned propertyName, const Value &value, int attr) 647 { imp()->put(exec,propertyName,value,attr); } 648 649 inline bool Object::canPut(ExecState *exec, const UString &propertyName) const 650 { return imp()->canPut(exec,propertyName); } 651 652 inline bool Object::hasProperty(ExecState *exec, const UString &propertyName) const 653 { return imp()->hasProperty(exec, propertyName); } 654 655 inline bool Object::hasProperty(ExecState *exec, unsigned propertyName) const 656 { return imp()->hasProperty(exec, propertyName); } 657 658 inline bool Object::deleteProperty(ExecState *exec, const UString &propertyName) 659 { return imp()->deleteProperty(exec,propertyName); } 660 661 inline bool Object::deleteProperty(ExecState *exec, unsigned propertyName) 662 { return imp()->deleteProperty(exec,propertyName); } 663 664 inline Value Object::defaultValue(ExecState *exec, Type hint) const 665 { return imp()->defaultValue(exec,hint); } 666 667 inline bool Object::implementsConstruct() const 668 { return imp()->implementsConstruct(); } 669 670 inline Object Object::construct(ExecState *exec, const List &args) 671 { return imp()->construct(exec,args); } 672 673 inline bool Object::implementsCall() const 674 { return imp()->implementsCall(); } 675 676 inline Value Object::call(ExecState *exec, Object &thisObj, const List &args) 677 { return imp()->call(exec,thisObj,args); } 678 679 inline bool Object::implementsHasInstance() const 680 { return imp()->implementsHasInstance(); } 681 682 inline Boolean Object::hasInstance(ExecState *exec, const Value &value) 683 { return imp()->hasInstance(exec,value); } 684 685 inline const List Object::scope() const 686 { return imp()->scope(); } 687 688 inline void Object::setScope(const List &s) 689 { imp()->setScope(s); } 690 691 inline List Object::propList(ExecState *exec, bool recursive) 692 { return imp()->propList(exec,recursive); } 693 694 inline Value Object::internalValue() const 695 { return imp()->internalValue(); } 696 697 inline void Object::setInternalValue(const Value &v) 698 { imp()->setInternalValue(v); } 699 700 extern const UString lengthPropertyName; 701 extern const UString prototypePropertyName; 702 extern const UString toStringPropertyName; 703 extern const UString valueOfPropertyName; 704 615 705 }; // namespace 616 706
Note:
See TracChangeset
for help on using the changeset viewer.