#include <hxcpp.h>

#ifndef INCLUDED_luxe_utils_json_JSONToken
#include <luxe/utils/json/JSONToken.h>
#endif
#ifndef INCLUDED_luxe_utils_json_JSONTokenType
#include <luxe/utils/json/JSONTokenType.h>
#endif
namespace luxe{
namespace utils{
namespace json{

Void JSONToken_obj::__construct(::luxe::utils::json::JSONTokenType type,Dynamic value)
{
HX_STACK_FRAME("luxe.utils.json.JSONToken","new",0xc72bc032,"luxe.utils.json.JSONToken.new","luxe/utils/json/JSONToken.hx",54,0x3eac17fd)

HX_STACK_ARG(type,"type")

HX_STACK_ARG(value,"value")
{
	HX_STACK_LINE(55)
	if (((type == null()))){
		HX_STACK_LINE(55)
		this->type = ::luxe::utils::json::JSONTokenType_obj::tUNKNOWN;
	}
	else{
		HX_STACK_LINE(55)
		this->type = type;
	}
	HX_STACK_LINE(56)
	this->value = value;
}
;
	return null();
}

//JSONToken_obj::~JSONToken_obj() { }

Dynamic JSONToken_obj::__CreateEmpty() { return  new JSONToken_obj; }
hx::ObjectPtr< JSONToken_obj > JSONToken_obj::__new(::luxe::utils::json::JSONTokenType type,Dynamic value)
{  hx::ObjectPtr< JSONToken_obj > result = new JSONToken_obj();
	result->__construct(type,value);
	return result;}

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


JSONToken_obj::JSONToken_obj()
{
}

void JSONToken_obj::__Mark(HX_MARK_PARAMS)
{
	HX_MARK_BEGIN_CLASS(JSONToken);
	HX_MARK_MEMBER_NAME(type,"type");
	HX_MARK_MEMBER_NAME(value,"value");
	HX_MARK_END_CLASS();
}

void JSONToken_obj::__Visit(HX_VISIT_PARAMS)
{
	HX_VISIT_MEMBER_NAME(type,"type");
	HX_VISIT_MEMBER_NAME(value,"value");
}

Dynamic JSONToken_obj::__Field(const ::String &inName,bool inCallProp)
{
	switch(inName.length) {
	case 4:
		if (HX_FIELD_EQ(inName,"type") ) { return type; }
		break;
	case 5:
		if (HX_FIELD_EQ(inName,"value") ) { return value; }
	}
	return super::__Field(inName,inCallProp);
}

Dynamic JSONToken_obj::__SetField(const ::String &inName,const Dynamic &inValue,bool inCallProp)
{
	switch(inName.length) {
	case 4:
		if (HX_FIELD_EQ(inName,"type") ) { type=inValue.Cast< ::luxe::utils::json::JSONTokenType >(); return inValue; }
		break;
	case 5:
		if (HX_FIELD_EQ(inName,"value") ) { value=inValue.Cast< Dynamic >(); return inValue; }
	}
	return super::__SetField(inName,inValue,inCallProp);
}

void JSONToken_obj::__GetFields(Array< ::String> &outFields)
{
	outFields->push(HX_CSTRING("type"));
	outFields->push(HX_CSTRING("value"));
	super::__GetFields(outFields);
};

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

#if HXCPP_SCRIPTABLE
static hx::StorageInfo sMemberStorageInfo[] = {
	{hx::fsObject /*::luxe::utils::json::JSONTokenType*/ ,(int)offsetof(JSONToken_obj,type),HX_CSTRING("type")},
	{hx::fsObject /*Dynamic*/ ,(int)offsetof(JSONToken_obj,value),HX_CSTRING("value")},
	{ hx::fsUnknown, 0, null()}
};
#endif

static ::String sMemberFields[] = {
	HX_CSTRING("type"),
	HX_CSTRING("value"),
	String(null()) };

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

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

#endif

Class JSONToken_obj::__mClass;

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

void JSONToken_obj::__boot()
{
}

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