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

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

using namespace JSC;

namespace WebCore {

/* Hash table */

static const HashTableValue JSSVGPathSegCurvetoCubicSmoothAbsTableValues[] =
{
    { "x", DontDelete, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicSmoothAbsX), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicSmoothAbsX) },
    { "y", DontDelete, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicSmoothAbsY), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicSmoothAbsY) },
    { "x2", DontDelete, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicSmoothAbsX2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicSmoothAbsX2) },
    { "y2", DontDelete, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicSmoothAbsY2), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSSVGPathSegCurvetoCubicSmoothAbsY2) },
    { "constructor", DontEnum | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGPathSegCurvetoCubicSmoothAbsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    { 0, 0, NoIntrinsic, 0, 0 }
};

static const HashTable JSSVGPathSegCurvetoCubicSmoothAbsTable = { 16, 15, true, JSSVGPathSegCurvetoCubicSmoothAbsTableValues, 0 };
/* Hash table for constructor */

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

static const HashTable JSSVGPathSegCurvetoCubicSmoothAbsConstructorTable = { 1, 0, false, JSSVGPathSegCurvetoCubicSmoothAbsConstructorTableValues, 0 };
const ClassInfo JSSVGPathSegCurvetoCubicSmoothAbsConstructor::s_info = { "SVGPathSegCurvetoCubicSmoothAbsConstructor", &Base::s_info, &JSSVGPathSegCurvetoCubicSmoothAbsConstructorTable, 0, CREATE_METHOD_TABLE(JSSVGPathSegCurvetoCubicSmoothAbsConstructor) };

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

void JSSVGPathSegCurvetoCubicSmoothAbsConstructor::finishCreation(VM& vm, JSDOMGlobalObject* globalObject)
{
    Base::finishCreation(vm);
    ASSERT(inherits(info()));
    putDirect(vm, vm.propertyNames->prototype, JSSVGPathSegCurvetoCubicSmoothAbsPrototype::self(vm, globalObject), DontDelete | ReadOnly);
    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
}

bool JSSVGPathSegCurvetoCubicSmoothAbsConstructor::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
{
    return getStaticValueSlot<JSSVGPathSegCurvetoCubicSmoothAbsConstructor, JSDOMWrapper>(exec, JSSVGPathSegCurvetoCubicSmoothAbsConstructorTable, jsCast<JSSVGPathSegCurvetoCubicSmoothAbsConstructor*>(object), propertyName, slot);
}

/* Hash table for prototype */

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

static const HashTable JSSVGPathSegCurvetoCubicSmoothAbsPrototypeTable = { 1, 0, false, JSSVGPathSegCurvetoCubicSmoothAbsPrototypeTableValues, 0 };
const ClassInfo JSSVGPathSegCurvetoCubicSmoothAbsPrototype::s_info = { "SVGPathSegCurvetoCubicSmoothAbsPrototype", &Base::s_info, &JSSVGPathSegCurvetoCubicSmoothAbsPrototypeTable, 0, CREATE_METHOD_TABLE(JSSVGPathSegCurvetoCubicSmoothAbsPrototype) };

JSObject* JSSVGPathSegCurvetoCubicSmoothAbsPrototype::self(VM& vm, JSGlobalObject* globalObject)
{
    return getDOMPrototype<JSSVGPathSegCurvetoCubicSmoothAbs>(vm, globalObject);
}

const ClassInfo JSSVGPathSegCurvetoCubicSmoothAbs::s_info = { "SVGPathSegCurvetoCubicSmoothAbs", &Base::s_info, &JSSVGPathSegCurvetoCubicSmoothAbsTable, 0 , CREATE_METHOD_TABLE(JSSVGPathSegCurvetoCubicSmoothAbs) };

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

void JSSVGPathSegCurvetoCubicSmoothAbs::finishCreation(VM& vm)
{
    Base::finishCreation(vm);
    ASSERT(inherits(info()));
}

JSObject* JSSVGPathSegCurvetoCubicSmoothAbs::createPrototype(VM& vm, JSGlobalObject* globalObject)
{
    return JSSVGPathSegCurvetoCubicSmoothAbsPrototype::create(vm, globalObject, JSSVGPathSegCurvetoCubicSmoothAbsPrototype::createStructure(vm, globalObject, JSSVGPathSegPrototype::self(vm, globalObject)));
}

bool JSSVGPathSegCurvetoCubicSmoothAbs::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
{
    JSSVGPathSegCurvetoCubicSmoothAbs* thisObject = jsCast<JSSVGPathSegCurvetoCubicSmoothAbs*>(object);
    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    return getStaticValueSlot<JSSVGPathSegCurvetoCubicSmoothAbs, Base>(exec, JSSVGPathSegCurvetoCubicSmoothAbsTable, thisObject, propertyName, slot);
}

EncodedJSValue jsSVGPathSegCurvetoCubicSmoothAbsX(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSSVGPathSegCurvetoCubicSmoothAbs* castedThis = jsDynamicCast<JSSVGPathSegCurvetoCubicSmoothAbs*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis)
        return throwVMTypeError(exec);
    UNUSED_PARAM(exec);
    SVGPathSegCurvetoCubicSmoothAbs& impl = castedThis->impl();
    JSValue result = jsNumber(impl.x());
    return JSValue::encode(result);
}


EncodedJSValue jsSVGPathSegCurvetoCubicSmoothAbsY(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSSVGPathSegCurvetoCubicSmoothAbs* castedThis = jsDynamicCast<JSSVGPathSegCurvetoCubicSmoothAbs*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis)
        return throwVMTypeError(exec);
    UNUSED_PARAM(exec);
    SVGPathSegCurvetoCubicSmoothAbs& impl = castedThis->impl();
    JSValue result = jsNumber(impl.y());
    return JSValue::encode(result);
}


EncodedJSValue jsSVGPathSegCurvetoCubicSmoothAbsX2(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSSVGPathSegCurvetoCubicSmoothAbs* castedThis = jsDynamicCast<JSSVGPathSegCurvetoCubicSmoothAbs*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis)
        return throwVMTypeError(exec);
    UNUSED_PARAM(exec);
    SVGPathSegCurvetoCubicSmoothAbs& impl = castedThis->impl();
    JSValue result = jsNumber(impl.x2());
    return JSValue::encode(result);
}


EncodedJSValue jsSVGPathSegCurvetoCubicSmoothAbsY2(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSSVGPathSegCurvetoCubicSmoothAbs* castedThis = jsDynamicCast<JSSVGPathSegCurvetoCubicSmoothAbs*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis)
        return throwVMTypeError(exec);
    UNUSED_PARAM(exec);
    SVGPathSegCurvetoCubicSmoothAbs& impl = castedThis->impl();
    JSValue result = jsNumber(impl.y2());
    return JSValue::encode(result);
}


EncodedJSValue jsSVGPathSegCurvetoCubicSmoothAbsConstructor(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue, PropertyName)
{
    JSSVGPathSegCurvetoCubicSmoothAbs* domObject = jsDynamicCast<JSSVGPathSegCurvetoCubicSmoothAbs*>(JSValue::decode(thisValue));
    if (!domObject)
        return throwVMTypeError(exec);
    if (!domObject)
        return throwVMTypeError(exec);
    return JSValue::encode(JSSVGPathSegCurvetoCubicSmoothAbs::getConstructor(exec->vm(), domObject->globalObject()));
}

void setJSSVGPathSegCurvetoCubicSmoothAbsX(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
    JSValue value = JSValue::decode(encodedValue);
    UNUSED_PARAM(exec);
    JSSVGPathSegCurvetoCubicSmoothAbs* castedThis = jsDynamicCast<JSSVGPathSegCurvetoCubicSmoothAbs*>(JSValue::decode(thisValue));
    if (!castedThis) {
        throwVMTypeError(exec);
        return;
    }
    SVGPathSegCurvetoCubicSmoothAbs& impl = castedThis->impl();
    float nativeValue(value.toFloat(exec));
    if (exec->hadException())
        return;
    impl.setX(nativeValue);
}


void setJSSVGPathSegCurvetoCubicSmoothAbsY(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
    JSValue value = JSValue::decode(encodedValue);
    UNUSED_PARAM(exec);
    JSSVGPathSegCurvetoCubicSmoothAbs* castedThis = jsDynamicCast<JSSVGPathSegCurvetoCubicSmoothAbs*>(JSValue::decode(thisValue));
    if (!castedThis) {
        throwVMTypeError(exec);
        return;
    }
    SVGPathSegCurvetoCubicSmoothAbs& impl = castedThis->impl();
    float nativeValue(value.toFloat(exec));
    if (exec->hadException())
        return;
    impl.setY(nativeValue);
}


void setJSSVGPathSegCurvetoCubicSmoothAbsX2(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
    JSValue value = JSValue::decode(encodedValue);
    UNUSED_PARAM(exec);
    JSSVGPathSegCurvetoCubicSmoothAbs* castedThis = jsDynamicCast<JSSVGPathSegCurvetoCubicSmoothAbs*>(JSValue::decode(thisValue));
    if (!castedThis) {
        throwVMTypeError(exec);
        return;
    }
    SVGPathSegCurvetoCubicSmoothAbs& impl = castedThis->impl();
    float nativeValue(value.toFloat(exec));
    if (exec->hadException())
        return;
    impl.setX2(nativeValue);
}


void setJSSVGPathSegCurvetoCubicSmoothAbsY2(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
    JSValue value = JSValue::decode(encodedValue);
    UNUSED_PARAM(exec);
    JSSVGPathSegCurvetoCubicSmoothAbs* castedThis = jsDynamicCast<JSSVGPathSegCurvetoCubicSmoothAbs*>(JSValue::decode(thisValue));
    if (!castedThis) {
        throwVMTypeError(exec);
        return;
    }
    SVGPathSegCurvetoCubicSmoothAbs& impl = castedThis->impl();
    float nativeValue(value.toFloat(exec));
    if (exec->hadException())
        return;
    impl.setY2(nativeValue);
}


JSValue JSSVGPathSegCurvetoCubicSmoothAbs::getConstructor(VM& vm, JSGlobalObject* globalObject)
{
    return getDOMConstructor<JSSVGPathSegCurvetoCubicSmoothAbsConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));
}


}

#endif // ENABLE(SVG)
