#include <hxcpp.h>

#ifndef INCLUDED_luxe_utils_json_JSONParseError
#include <luxe/utils/json/JSONParseError.h>
#endif
namespace luxe{
namespace utils{
namespace json{

Void JSONParseError_obj::__construct(::String __o_message,hx::Null< int >  __o_location,::String __o_text)
{
HX_STACK_FRAME("luxe.utils.json.JSONParseError","new",0x9f3fe4e0,"luxe.utils.json.JSONParseError.new","luxe/utils/json/JSONParseError.hx",55,0xf1ce5db1)

HX_STACK_ARG(__o_message,"message")

HX_STACK_ARG(__o_location,"location")

HX_STACK_ARG(__o_text,"text")
::String message = __o_message.Default(HX_CSTRING(""));
int location = __o_location.Default(0);
::String text = __o_text.Default(HX_CSTRING(""));
{
	HX_STACK_LINE(57)
	this->name = HX_CSTRING("JSONParseError");
	HX_STACK_LINE(58)
	this->_location = location;
	HX_STACK_LINE(59)
	this->_text = text;
	HX_STACK_LINE(60)
	this->message = message;
}
;
	return null();
}

//JSONParseError_obj::~JSONParseError_obj() { }

Dynamic JSONParseError_obj::__CreateEmpty() { return  new JSONParseError_obj; }
hx::ObjectPtr< JSONParseError_obj > JSONParseError_obj::__new(::String __o_message,hx::Null< int >  __o_location,::String __o_text)
{  hx::ObjectPtr< JSONParseError_obj > result = new JSONParseError_obj();
	result->__construct(__o_message,__o_location,__o_text);
	return result;}

Dynamic JSONParseError_obj::__Create(hx::DynamicArray inArgs)
{  hx::ObjectPtr< JSONParseError_obj > result = new JSONParseError_obj();
	result->__construct(inArgs[0],inArgs[1],inArgs[2]);
	return result;}

int JSONParseError_obj::get_location( ){
	HX_STACK_FRAME("luxe.utils.json.JSONParseError","get_location",0xb48d7dbe,"luxe.utils.json.JSONParseError.get_location","luxe/utils/json/JSONParseError.hx",69,0xf1ce5db1)
	HX_STACK_THIS(this)
	HX_STACK_LINE(69)
	return this->_location;
}


HX_DEFINE_DYNAMIC_FUNC0(JSONParseError_obj,get_location,return )

::String JSONParseError_obj::get_text( ){
	HX_STACK_FRAME("luxe.utils.json.JSONParseError","get_text",0xe72e23b6,"luxe.utils.json.JSONParseError.get_text","luxe/utils/json/JSONParseError.hx",78,0xf1ce5db1)
	HX_STACK_THIS(this)
	HX_STACK_LINE(78)
	return this->_text;
}


HX_DEFINE_DYNAMIC_FUNC0(JSONParseError_obj,get_text,return )

::String JSONParseError_obj::toString( ){
	HX_STACK_FRAME("luxe.utils.json.JSONParseError","toString",0x52e86c2c,"luxe.utils.json.JSONParseError.toString","luxe/utils/json/JSONParseError.hx",82,0xf1ce5db1)
	HX_STACK_THIS(this)
	HX_STACK_LINE(82)
	return (((((((this->name + HX_CSTRING(": ")) + this->message) + HX_CSTRING(" at position: ")) + this->_location) + HX_CSTRING(" near \"")) + this->_text) + HX_CSTRING("\""));
}


HX_DEFINE_DYNAMIC_FUNC0(JSONParseError_obj,toString,return )


JSONParseError_obj::JSONParseError_obj()
{
}

void JSONParseError_obj::__Mark(HX_MARK_PARAMS)
{
	HX_MARK_BEGIN_CLASS(JSONParseError);
	HX_MARK_MEMBER_NAME(_location,"_location");
	HX_MARK_MEMBER_NAME(_text,"_text");
	HX_MARK_MEMBER_NAME(name,"name");
	HX_MARK_MEMBER_NAME(text,"text");
	HX_MARK_MEMBER_NAME(location,"location");
	HX_MARK_MEMBER_NAME(message,"message");
	HX_MARK_END_CLASS();
}

void JSONParseError_obj::__Visit(HX_VISIT_PARAMS)
{
	HX_VISIT_MEMBER_NAME(_location,"_location");
	HX_VISIT_MEMBER_NAME(_text,"_text");
	HX_VISIT_MEMBER_NAME(name,"name");
	HX_VISIT_MEMBER_NAME(text,"text");
	HX_VISIT_MEMBER_NAME(location,"location");
	HX_VISIT_MEMBER_NAME(message,"message");
}

Dynamic JSONParseError_obj::__Field(const ::String &inName,bool inCallProp)
{
	switch(inName.length) {
	case 4:
		if (HX_FIELD_EQ(inName,"name") ) { return name; }
		if (HX_FIELD_EQ(inName,"text") ) { return inCallProp ? get_text() : text; }
		break;
	case 5:
		if (HX_FIELD_EQ(inName,"_text") ) { return _text; }
		break;
	case 7:
		if (HX_FIELD_EQ(inName,"message") ) { return message; }
		break;
	case 8:
		if (HX_FIELD_EQ(inName,"location") ) { return inCallProp ? get_location() : location; }
		if (HX_FIELD_EQ(inName,"get_text") ) { return get_text_dyn(); }
		if (HX_FIELD_EQ(inName,"toString") ) { return toString_dyn(); }
		break;
	case 9:
		if (HX_FIELD_EQ(inName,"_location") ) { return _location; }
		break;
	case 12:
		if (HX_FIELD_EQ(inName,"get_location") ) { return get_location_dyn(); }
	}
	return super::__Field(inName,inCallProp);
}

Dynamic JSONParseError_obj::__SetField(const ::String &inName,const Dynamic &inValue,bool inCallProp)
{
	switch(inName.length) {
	case 4:
		if (HX_FIELD_EQ(inName,"name") ) { name=inValue.Cast< ::String >(); return inValue; }
		if (HX_FIELD_EQ(inName,"text") ) { text=inValue.Cast< ::String >(); return inValue; }
		break;
	case 5:
		if (HX_FIELD_EQ(inName,"_text") ) { _text=inValue.Cast< ::String >(); return inValue; }
		break;
	case 7:
		if (HX_FIELD_EQ(inName,"message") ) { message=inValue.Cast< ::String >(); return inValue; }
		break;
	case 8:
		if (HX_FIELD_EQ(inName,"location") ) { location=inValue.Cast< int >(); return inValue; }
		break;
	case 9:
		if (HX_FIELD_EQ(inName,"_location") ) { _location=inValue.Cast< int >(); return inValue; }
	}
	return super::__SetField(inName,inValue,inCallProp);
}

void JSONParseError_obj::__GetFields(Array< ::String> &outFields)
{
	outFields->push(HX_CSTRING("_location"));
	outFields->push(HX_CSTRING("_text"));
	outFields->push(HX_CSTRING("name"));
	outFields->push(HX_CSTRING("text"));
	outFields->push(HX_CSTRING("location"));
	outFields->push(HX_CSTRING("message"));
	super::__GetFields(outFields);
};

static ::String sStaticFields[] = {
	String(null()) };

#if HXCPP_SCRIPTABLE
static hx::StorageInfo sMemberStorageInfo[] = {
	{hx::fsInt,(int)offsetof(JSONParseError_obj,_location),HX_CSTRING("_location")},
	{hx::fsString,(int)offsetof(JSONParseError_obj,_text),HX_CSTRING("_text")},
	{hx::fsString,(int)offsetof(JSONParseError_obj,name),HX_CSTRING("name")},
	{hx::fsString,(int)offsetof(JSONParseError_obj,text),HX_CSTRING("text")},
	{hx::fsInt,(int)offsetof(JSONParseError_obj,location),HX_CSTRING("location")},
	{hx::fsString,(int)offsetof(JSONParseError_obj,message),HX_CSTRING("message")},
	{ hx::fsUnknown, 0, null()}
};
#endif

static ::String sMemberFields[] = {
	HX_CSTRING("_location"),
	HX_CSTRING("_text"),
	HX_CSTRING("name"),
	HX_CSTRING("text"),
	HX_CSTRING("location"),
	HX_CSTRING("message"),
	HX_CSTRING("get_location"),
	HX_CSTRING("get_text"),
	HX_CSTRING("toString"),
	String(null()) };

static void sMarkStatics(HX_MARK_PARAMS) {
	HX_MARK_MEMBER_NAME(JSONParseError_obj::__mClass,"__mClass");
};

#ifdef HXCPP_VISIT_ALLOCS
static void sVisitStatics(HX_VISIT_PARAMS) {
	HX_VISIT_MEMBER_NAME(JSONParseError_obj::__mClass,"__mClass");
};

#endif

Class JSONParseError_obj::__mClass;

void JSONParseError_obj::__register()
{
	hx::Static(__mClass) = hx::RegisterClass(HX_CSTRING("luxe.utils.json.JSONParseError"), hx::TCanCast< JSONParseError_obj> ,sStaticFields,sMemberFields,
	&__CreateEmpty, &__Create,
	&super::__SGetClass(), 0, sMarkStatics
#ifdef HXCPP_VISIT_ALLOCS
    , sVisitStatics
#endif
#ifdef HXCPP_SCRIPTABLE
    , sMemberStorageInfo
#endif
);
}

void JSONParseError_obj::__boot()
{
}

} // end namespace luxe
} // end namespace utils
} // end namespace json
