/*
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 "JSSVGAnimatedAngle.h"
#include <wtf/GetPtr.h>
#include "JSSVGAngle.h"
#include "SVGAngle.h"
using namespace KJS;
namespace WebCore {
/* Hash table */
static const HashEntry JSSVGAnimatedAngleTableEntries[] =
{
{ "baseVal", JSSVGAnimatedAngle::BaseValAttrNum, DontDelete|ReadOnly, 0, 0 },
{ "animVal", JSSVGAnimatedAngle::AnimValAttrNum, DontDelete|ReadOnly, 0, 0 }
};
static const HashTable JSSVGAnimatedAngleTable =
{
2, 2, JSSVGAnimatedAngleTableEntries, 2
};
/* Hash table for prototype */
static const HashEntry JSSVGAnimatedAnglePrototypeTableEntries[] =
{
{ 0, 0, 0, 0, 0 }
};
static const HashTable JSSVGAnimatedAnglePrototypeTable =
{
2, 1, JSSVGAnimatedAnglePrototypeTableEntries, 1
};
const ClassInfo JSSVGAnimatedAnglePrototype::info = { "SVGAnimatedAnglePrototype", 0, &JSSVGAnimatedAnglePrototypeTable, 0 };
JSObject* JSSVGAnimatedAnglePrototype::self(ExecState* exec)
{
return KJS::cacheGlobalObject<JSSVGAnimatedAnglePrototype>(exec, "[[JSSVGAnimatedAngle.prototype]]");
}
const ClassInfo JSSVGAnimatedAngle::info = { "SVGAnimatedAngle", 0, &JSSVGAnimatedAngleTable, 0 };
JSSVGAnimatedAngle::JSSVGAnimatedAngle(ExecState* exec, SVGAnimatedAngle* impl)
: m_impl(impl)
{
setPrototype(JSSVGAnimatedAnglePrototype::self(exec));
}
JSSVGAnimatedAngle::~JSSVGAnimatedAngle()
{
SVGDocumentExtensions::forgetGenericContext<SVGAnimatedAngle>(m_impl.get());
ScriptInterpreter::forgetDOMObject(m_impl.get());
}
bool JSSVGAnimatedAngle::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
return getStaticValueSlot<JSSVGAnimatedAngle, KJS::DOMObject>(exec, &JSSVGAnimatedAngleTable, this, propertyName, slot);
}
JSValue* JSSVGAnimatedAngle::getValueProperty(ExecState* exec, int token) const
{
switch (token) {
case BaseValAttrNum: {
SVGAnimatedAngle* imp = static_cast<SVGAnimatedAngle*>(impl());
return toJS(exec, WTF::getPtr(imp->baseVal()));
}
case AnimValAttrNum: {
SVGAnimatedAngle* imp = static_cast<SVGAnimatedAngle*>(impl());
return toJS(exec, WTF::getPtr(imp->animVal()));
}
}
return 0;
}
KJS::JSValue* toJS(KJS::ExecState* exec, SVGAnimatedAngle* obj)
{
return KJS::cacheDOMObject<SVGAnimatedAngle, JSSVGAnimatedAngle>(exec, obj);
}
SVGAnimatedAngle* toSVGAnimatedAngle(KJS::JSValue* val)
{
return val->isObject(&JSSVGAnimatedAngle::info) ? static_cast<JSSVGAnimatedAngle*>(val)->impl() : 0;
}
}
#endif // ENABLE(SVG)