StringPrototype.h 1.68 KB
Newer Older
weinig@apple.com's avatar
weinig@apple.com committed
1 2
/*
 *  Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
3
 *  Copyright (C) 2007, 2008, 2013 Apple Inc. All rights reserved.
weinig@apple.com's avatar
weinig@apple.com committed
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */

#ifndef StringPrototype_h
#define StringPrototype_h

#include "StringObject.h"

26
namespace JSC {
weinig@apple.com's avatar
weinig@apple.com committed
27

weinig@apple.com's avatar
weinig@apple.com committed
28 29 30
    class ObjectPrototype;

    class StringPrototype : public StringObject {
31
    private:
32
        StringPrototype(VM&, Structure*);
weinig@apple.com's avatar
weinig@apple.com committed
33

34
    public:
35 36
        typedef StringObject Base;

37
        static StringPrototype* create(VM&, JSGlobalObject*, Structure*);
weinig@apple.com's avatar
weinig@apple.com committed
38

39
        static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
40
        {
41
            return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
42 43
        }

44
        DECLARE_INFO;
45 46
        
    protected:
47
        void finishCreation(VM&, JSGlobalObject*, JSString*);
48
        static const unsigned StructureFlags = StringObject::StructureFlags;
49

weinig@apple.com's avatar
weinig@apple.com committed
50
    };
weinig@apple.com's avatar
weinig@apple.com committed
51

52
} // namespace JSC
weinig@apple.com's avatar
weinig@apple.com committed
53 54

#endif // StringPrototype_h