2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 #ifndef RegExpMatchesArray_h
21 #define RegExpMatchesArray_h
27 class RegExpMatchesArray
: public JSArray
{
29 RegExpMatchesArray(ExecState
*, RegExpConstructorPrivate
*);
30 virtual ~RegExpMatchesArray();
33 virtual bool getOwnPropertySlot(ExecState
* exec
, const Identifier
& propertyName
, PropertySlot
& slot
)
36 fillArrayInstance(exec
);
37 return JSArray::getOwnPropertySlot(exec
, propertyName
, slot
);
40 virtual bool getOwnPropertySlot(ExecState
* exec
, unsigned propertyName
, PropertySlot
& slot
)
43 fillArrayInstance(exec
);
44 return JSArray::getOwnPropertySlot(exec
, propertyName
, slot
);
47 virtual bool getOwnPropertyDescriptor(ExecState
* exec
, const Identifier
& propertyName
, PropertyDescriptor
& descriptor
)
50 fillArrayInstance(exec
);
51 return JSArray::getOwnPropertyDescriptor(exec
, propertyName
, descriptor
);
54 virtual void put(ExecState
* exec
, const Identifier
& propertyName
, JSValue v
, PutPropertySlot
& slot
)
57 fillArrayInstance(exec
);
58 JSArray::put(exec
, propertyName
, v
, slot
);
61 virtual void put(ExecState
* exec
, unsigned propertyName
, JSValue v
)
64 fillArrayInstance(exec
);
65 JSArray::put(exec
, propertyName
, v
);
68 virtual bool deleteProperty(ExecState
* exec
, const Identifier
& propertyName
)
71 fillArrayInstance(exec
);
72 return JSArray::deleteProperty(exec
, propertyName
);
75 virtual bool deleteProperty(ExecState
* exec
, unsigned propertyName
)
78 fillArrayInstance(exec
);
79 return JSArray::deleteProperty(exec
, propertyName
);
82 virtual void getOwnPropertyNames(ExecState
* exec
, PropertyNameArray
& arr
, EnumerationMode mode
= ExcludeDontEnumProperties
)
85 fillArrayInstance(exec
);
86 JSArray::getOwnPropertyNames(exec
, arr
, mode
);
89 void fillArrayInstance(ExecState
*);
94 #endif // RegExpMatchesArray_h