/*
    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 "JSSVGPathSegCurvetoCubicSmoothRel.h"

#include "SVGPathSegCurvetoCubicSmoothRel.h"
#include <runtime/Error.h>
#include <wtf/GetPtr.h>

using namespace JSC;

namespace WebCore {

/* Hash table */

static const HashTableValue JSSVGPathSegCurvetoCubicSmoothRelTableValues[] =
{
    { "x", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicSmoothRelX), (intptr_t)setJSSVGPathSegCurvetoCubicSmoothRelX, NoIntrinsic },
    { "y", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicSmoothRelY), (intptr_t)setJSSVGPathSegCurvetoCubicSmoothRelY, NoIntrinsic },
    { "x2", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicSmoothRelX2), (intptr_t)setJSSVGPathSegCurvetoCubicSmoothRelX2, NoIntrinsic },
    { "y2", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicSmoothRelY2), (intptr_t)setJSSVGPathSegCurvetoCubicSmoothRelY2, NoIntrinsic },
    { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicSmoothRelConstructor), (intptr_t)0, NoIntrinsic },
    { 0, 0, 0, 0, NoIntrinsic }
};

static const HashTable JSSVGPathSegCurvetoCubicSmoothRelTable = { 16, 15, JSSVGPathSegCurvetoCubicSmoothRelTableValues, 0 };
/* Hash table for constructor */

static const HashTableValue JSSVGPathSegCurvetoCubicSmoothRelConstructorTableValues[] =
{
    { 0, 0, 0, 0, NoIntrinsic }
};

static const HashTable JSSVGPathSegCurvetoCubicSmoothRelConstructorTable = { 1, 0, JSSVGPathSegCurvetoCubicSmoothRelConstructorTableValues, 0 };
const ClassInfo JSSVGPathSegCurvetoCubicSmoothRelConstructor::s_info = { "SVGPathSegCurvetoCubicSmoothRelConstructor", &Base::s_info, &JSSVGPathSegCurvetoCubicSmoothRelConstructorTable, 0, CREATE_METHOD_TABLE(JSSVGPathSegCurvetoCubicSmoothRelConstructor) };

JSSVGPathSegCurvetoCubicSmoothRelConstructor::JSSVGPathSegCurvetoCubicSmoothRelConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
    : DOMConstructorObject(structure, globalObject)
{
}

void JSSVGPathSegCurvetoCubicSmoothRelConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
{
    Base::finishCreation(exec->vm());
    ASSERT(inherits(&s_info));
    putDirect(exec->vm(), exec->propertyNames().prototype, JSSVGPathSegCurvetoCubicSmoothRelPrototype::self(exec, globalObject), DontDelete | ReadOnly);
    putDirect(exec->vm(), exec->propertyNames().length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
}

bool JSSVGPathSegCurvetoCubicSmoothRelConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
{
    return getStaticValueSlot<JSSVGPathSegCurvetoCubicSmoothRelConstructor, JSDOMWrapper>(exec, &JSSVGPathSegCurvetoCubicSmoothRelConstructorTable, jsCast<JSSVGPathSegCurvetoCubicSmoothRelConstructor*>(cell), propertyName, slot);
}

bool JSSVGPathSegCurvetoCubicSmoothRelConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, PropertyName propertyName, PropertyDescriptor& descriptor)
{
    return getStaticValueDescriptor<JSSVGPathSegCurvetoCubicSmoothRelConstructor, JSDOMWrapper>(exec, &JSSVGPathSegCurvetoCubicSmoothRelConstructorTable, jsCast<JSSVGPathSegCurvetoCubicSmoothRelConstructor*>(object), propertyName, descriptor);
}

/* Hash table for prototype */

static const HashTableValue JSSVGPathSegCurvetoCubicSmoothRelPrototypeTableValues[] =
{
    { 0, 0, 0, 0, NoIntrinsic }
};

static const HashTable JSSVGPathSegCurvetoCubicSmoothRelPrototypeTable = { 1, 0, JSSVGPathSegCurvetoCubicSmoothRelPrototypeTableValues, 0 };
const ClassInfo JSSVGPathSegCurvetoCubicSmoothRelPrototype::s_info = { "SVGPathSegCurvetoCubicSmoothRelPrototype", &Base::s_info, &JSSVGPathSegCurvetoCubicSmoothRelPrototypeTable, 0, CREATE_METHOD_TABLE(JSSVGPathSegCurvetoCubicSmoothRelPrototype) };

JSObject* JSSVGPathSegCurvetoCubicSmoothRelPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
{
    return getDOMPrototype<JSSVGPathSegCurvetoCubicSmoothRel>(exec, globalObject);
}

const ClassInfo JSSVGPathSegCurvetoCubicSmoothRel::s_info = { "SVGPathSegCurvetoCubicSmoothRel", &Base::s_info, &JSSVGPathSegCurvetoCubicSmoothRelTable, 0 , CREATE_METHOD_TABLE(JSSVGPathSegCurvetoCubicSmoothRel) };

JSSVGPathSegCurvetoCubicSmoothRel::JSSVGPathSegCurvetoCubicSmoothRel(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGPathSegCurvetoCubicSmoothRel> impl)
    : JSSVGPathSeg(structure, globalObject, impl)
{
}

void JSSVGPathSegCurvetoCubicSmoothRel::finishCreation(VM& vm)
{
    Base::finishCreation(vm);
    ASSERT(inherits(&s_info));
}

JSObject* JSSVGPathSegCurvetoCubicSmoothRel::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
{
    return JSSVGPathSegCurvetoCubicSmoothRelPrototype::create(exec->vm(), globalObject, JSSVGPathSegCurvetoCubicSmoothRelPrototype::createStructure(exec->vm(), globalObject, JSSVGPathSegPrototype::self(exec, globalObject)));
}

bool JSSVGPathSegCurvetoCubicSmoothRel::getOwnPropertySlot(JSCell* cell, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
{
    JSSVGPathSegCurvetoCubicSmoothRel* thisObject = jsCast<JSSVGPathSegCurvetoCubicSmoothRel*>(cell);
    ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
    return getStaticValueSlot<JSSVGPathSegCurvetoCubicSmoothRel, Base>(exec, &JSSVGPathSegCurvetoCubicSmoothRelTable, thisObject, propertyName, slot);
}

bool JSSVGPathSegCurvetoCubicSmoothRel::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, PropertyName propertyName, PropertyDescriptor& descriptor)
{
    JSSVGPathSegCurvetoCubicSmoothRel* thisObject = jsCast<JSSVGPathSegCurvetoCubicSmoothRel*>(object);
    ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
    return getStaticValueDescriptor<JSSVGPathSegCurvetoCubicSmoothRel, Base>(exec, &JSSVGPathSegCurvetoCubicSmoothRelTable, thisObject, propertyName, descriptor);
}

JSValue jsSVGPathSegCurvetoCubicSmoothRelX(ExecState* exec, JSValue slotBase, PropertyName)
{
    JSSVGPathSegCurvetoCubicSmoothRel* castedThis = jsCast<JSSVGPathSegCurvetoCubicSmoothRel*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    SVGPathSegCurvetoCubicSmoothRel* impl = static_cast<SVGPathSegCurvetoCubicSmoothRel*>(castedThis->impl());
    JSValue result = jsNumber(impl->x());
    return result;
}


JSValue jsSVGPathSegCurvetoCubicSmoothRelY(ExecState* exec, JSValue slotBase, PropertyName)
{
    JSSVGPathSegCurvetoCubicSmoothRel* castedThis = jsCast<JSSVGPathSegCurvetoCubicSmoothRel*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    SVGPathSegCurvetoCubicSmoothRel* impl = static_cast<SVGPathSegCurvetoCubicSmoothRel*>(castedThis->impl());
    JSValue result = jsNumber(impl->y());
    return result;
}


JSValue jsSVGPathSegCurvetoCubicSmoothRelX2(ExecState* exec, JSValue slotBase, PropertyName)
{
    JSSVGPathSegCurvetoCubicSmoothRel* castedThis = jsCast<JSSVGPathSegCurvetoCubicSmoothRel*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    SVGPathSegCurvetoCubicSmoothRel* impl = static_cast<SVGPathSegCurvetoCubicSmoothRel*>(castedThis->impl());
    JSValue result = jsNumber(impl->x2());
    return result;
}


JSValue jsSVGPathSegCurvetoCubicSmoothRelY2(ExecState* exec, JSValue slotBase, PropertyName)
{
    JSSVGPathSegCurvetoCubicSmoothRel* castedThis = jsCast<JSSVGPathSegCurvetoCubicSmoothRel*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    SVGPathSegCurvetoCubicSmoothRel* impl = static_cast<SVGPathSegCurvetoCubicSmoothRel*>(castedThis->impl());
    JSValue result = jsNumber(impl->y2());
    return result;
}


JSValue jsSVGPathSegCurvetoCubicSmoothRelConstructor(ExecState* exec, JSValue slotBase, PropertyName)
{
    JSSVGPathSegCurvetoCubicSmoothRel* domObject = jsCast<JSSVGPathSegCurvetoCubicSmoothRel*>(asObject(slotBase));
    return JSSVGPathSegCurvetoCubicSmoothRel::getConstructor(exec, domObject->globalObject());
}

void JSSVGPathSegCurvetoCubicSmoothRel::put(JSCell* cell, ExecState* exec, PropertyName propertyName, JSValue value, PutPropertySlot& slot)
{
    JSSVGPathSegCurvetoCubicSmoothRel* thisObject = jsCast<JSSVGPathSegCurvetoCubicSmoothRel*>(cell);
    ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
    lookupPut<JSSVGPathSegCurvetoCubicSmoothRel, Base>(exec, propertyName, value, &JSSVGPathSegCurvetoCubicSmoothRelTable, thisObject, slot);
}

void setJSSVGPathSegCurvetoCubicSmoothRelX(ExecState* exec, JSObject* thisObject, JSValue value)
{
    UNUSED_PARAM(exec);
    JSSVGPathSegCurvetoCubicSmoothRel* castedThis = jsCast<JSSVGPathSegCurvetoCubicSmoothRel*>(thisObject);
    SVGPathSegCurvetoCubicSmoothRel* impl = static_cast<SVGPathSegCurvetoCubicSmoothRel*>(castedThis->impl());
    float nativeValue(value.toFloat(exec));
    if (exec->hadException())
        return;
    impl->setX(nativeValue);
}


void setJSSVGPathSegCurvetoCubicSmoothRelY(ExecState* exec, JSObject* thisObject, JSValue value)
{
    UNUSED_PARAM(exec);
    JSSVGPathSegCurvetoCubicSmoothRel* castedThis = jsCast<JSSVGPathSegCurvetoCubicSmoothRel*>(thisObject);
    SVGPathSegCurvetoCubicSmoothRel* impl = static_cast<SVGPathSegCurvetoCubicSmoothRel*>(castedThis->impl());
    float nativeValue(value.toFloat(exec));
    if (exec->hadException())
        return;
    impl->setY(nativeValue);
}


void setJSSVGPathSegCurvetoCubicSmoothRelX2(ExecState* exec, JSObject* thisObject, JSValue value)
{
    UNUSED_PARAM(exec);
    JSSVGPathSegCurvetoCubicSmoothRel* castedThis = jsCast<JSSVGPathSegCurvetoCubicSmoothRel*>(thisObject);
    SVGPathSegCurvetoCubicSmoothRel* impl = static_cast<SVGPathSegCurvetoCubicSmoothRel*>(castedThis->impl());
    float nativeValue(value.toFloat(exec));
    if (exec->hadException())
        return;
    impl->setX2(nativeValue);
}


void setJSSVGPathSegCurvetoCubicSmoothRelY2(ExecState* exec, JSObject* thisObject, JSValue value)
{
    UNUSED_PARAM(exec);
    JSSVGPathSegCurvetoCubicSmoothRel* castedThis = jsCast<JSSVGPathSegCurvetoCubicSmoothRel*>(thisObject);
    SVGPathSegCurvetoCubicSmoothRel* impl = static_cast<SVGPathSegCurvetoCubicSmoothRel*>(castedThis->impl());
    float nativeValue(value.toFloat(exec));
    if (exec->hadException())
        return;
    impl->setY2(nativeValue);
}


JSValue JSSVGPathSegCurvetoCubicSmoothRel::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
{
    return getDOMConstructor<JSSVGPathSegCurvetoCubicSmoothRelConstructor>(exec, jsCast<JSDOMGlobalObject*>(globalObject));
}


}

#endif // ENABLE(SVG)
