/*
This file is part of the WebKit open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "config.h"
#if ENABLE(SVG)
#include "Document.h"
#include "Frame.h"
#include "SVGDocumentExtensions.h"
#include "SVGElement.h"
#include "SVGAnimatedTemplate.h"
#include "JSSVGUnitTypes.h"
#include <wtf/GetPtr.h>
#include "SVGUnitTypes.h"
using namespace KJS;
namespace WebCore {
/* Hash table */
static const HashEntry JSSVGUnitTypesTableEntries[] =
{
{ "constructor", JSSVGUnitTypes::ConstructorAttrNum, DontDelete|DontEnum|ReadOnly, 0, 0 }
};
static const HashTable JSSVGUnitTypesTable =
{
2, 1, JSSVGUnitTypesTableEntries, 1
};
/* Hash table for constructor */
static const HashEntry JSSVGUnitTypesConstructorTableEntries[] =
{
{ "SVG_UNIT_TYPE_UNKNOWN", SVGUnitTypes::SVG_UNIT_TYPE_UNKNOWN, DontDelete|ReadOnly, 0, &JSSVGUnitTypesConstructorTableEntries[3] },
{ 0, 0, 0, 0, 0 },
{ "SVG_UNIT_TYPE_USERSPACEONUSE", SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE, DontDelete|ReadOnly, 0, 0 },
{ "SVG_UNIT_TYPE_OBJECTBOUNDINGBOX", SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, DontDelete|ReadOnly, 0, 0 }
};
static const HashTable JSSVGUnitTypesConstructorTable =
{
2, 4, JSSVGUnitTypesConstructorTableEntries, 3
};
class JSSVGUnitTypesConstructor : public DOMObject {
public:
JSSVGUnitTypesConstructor(ExecState* exec)
{
setPrototype(exec->lexicalInterpreter()->builtinObjectPrototype());
putDirect(exec->propertyNames().prototype, JSSVGUnitTypesPrototype::self(exec), None);
}
virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
JSValue* getValueProperty(ExecState*, int token) const;
virtual const ClassInfo* classInfo() const { return &info; }
static const ClassInfo info;
virtual bool implementsHasInstance() const { return true; }
};
const ClassInfo JSSVGUnitTypesConstructor::info = { "SVGUnitTypesConstructor", 0, &JSSVGUnitTypesConstructorTable, 0 };
bool JSSVGUnitTypesConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
return getStaticValueSlot<JSSVGUnitTypesConstructor, DOMObject>(exec, &JSSVGUnitTypesConstructorTable, this, propertyName, slot);
}
JSValue* JSSVGUnitTypesConstructor::getValueProperty(ExecState*, int token) const
{
// The token is the numeric value of its associated constant
return jsNumber(token);
}
/* Hash table for prototype */
static const HashEntry JSSVGUnitTypesPrototypeTableEntries[] =
{
{ "SVG_UNIT_TYPE_UNKNOWN", SVGUnitTypes::SVG_UNIT_TYPE_UNKNOWN, DontDelete|ReadOnly, 0, &JSSVGUnitTypesPrototypeTableEntries[3] },
{ 0, 0, 0, 0, 0 },
{ "SVG_UNIT_TYPE_USERSPACEONUSE", SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE, DontDelete|ReadOnly, 0, 0 },
{ "SVG_UNIT_TYPE_OBJECTBOUNDINGBOX", SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, DontDelete|ReadOnly, 0, 0 }
};
static const HashTable JSSVGUnitTypesPrototypeTable =
{
2, 4, JSSVGUnitTypesPrototypeTableEntries, 3
};
const ClassInfo JSSVGUnitTypesPrototype::info = { "SVGUnitTypesPrototype", 0, &JSSVGUnitTypesPrototypeTable, 0 };
JSObject* JSSVGUnitTypesPrototype::self(ExecState* exec)
{
return KJS::cacheGlobalObject<JSSVGUnitTypesPrototype>(exec, "[[JSSVGUnitTypes.prototype]]");
}
bool JSSVGUnitTypesPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
return getStaticValueSlot<JSSVGUnitTypesPrototype, JSObject>(exec, &JSSVGUnitTypesPrototypeTable, this, propertyName, slot);
}
JSValue* JSSVGUnitTypesPrototype::getValueProperty(ExecState*, int token) const
{
// The token is the numeric value of its associated constant
return jsNumber(token);
}
const ClassInfo JSSVGUnitTypes::info = { "SVGUnitTypes", 0, &JSSVGUnitTypesTable, 0 };
JSSVGUnitTypes::JSSVGUnitTypes(ExecState* exec, SVGUnitTypes* impl)
: m_impl(impl)
{
setPrototype(JSSVGUnitTypesPrototype::self(exec));
}
JSSVGUnitTypes::~JSSVGUnitTypes()
{
ScriptInterpreter::forgetDOMObject(m_impl.get());
}
bool JSSVGUnitTypes::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
return getStaticValueSlot<JSSVGUnitTypes, KJS::DOMObject>(exec, &JSSVGUnitTypesTable, this, propertyName, slot);
}
JSValue* JSSVGUnitTypes::getValueProperty(ExecState* exec, int token) const
{
switch (token) {
case ConstructorAttrNum:
return getConstructor(exec);
}
return 0;
}
JSValue* JSSVGUnitTypes::getConstructor(ExecState* exec)
{
return KJS::cacheGlobalObject<JSSVGUnitTypesConstructor>(exec, "[[SVGUnitTypes.constructor]]");
}
KJS::JSValue* toJS(KJS::ExecState* exec, SVGUnitTypes* obj)
{
return KJS::cacheDOMObject<SVGUnitTypes, JSSVGUnitTypes>(exec, obj);
}
SVGUnitTypes* toSVGUnitTypes(KJS::JSValue* val)
{
return val->isObject(&JSSVGUnitTypes::info) ? static_cast<JSSVGUnitTypes*>(val)->impl() : 0;
}
}
#endif // ENABLE(SVG)