#include <hxcpp.h>

#ifndef INCLUDED_cpp_vm_Thread
#include <cpp/vm/Thread.h>
#endif
namespace cpp{
namespace vm{

Void Thread_obj::__construct(Dynamic h)
{
HX_STACK_FRAME("cpp.vm.Thread","new",0x66262c28,"cpp.vm.Thread.new","C:\\HaxeToolkit\\haxe\\std/cpp/vm/Thread.hx",31,0xd8d7e381)

HX_STACK_ARG(h,"h")
{
	HX_STACK_LINE(31)
	this->handle = h;
}
;
	return null();
}

//Thread_obj::~Thread_obj() { }

Dynamic Thread_obj::__CreateEmpty() { return  new Thread_obj; }
hx::ObjectPtr< Thread_obj > Thread_obj::__new(Dynamic h)
{  hx::ObjectPtr< Thread_obj > result = new Thread_obj();
	result->__construct(h);
	return result;}

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

::cpp::vm::Thread Thread_obj::current( ){
	HX_STACK_FRAME("cpp.vm.Thread","current",0x21a37c01,"cpp.vm.Thread.current","C:\\HaxeToolkit\\haxe\\std/cpp/vm/Thread.hx",46,0xd8d7e381)
	HX_STACK_LINE(46)
	return ::cpp::vm::Thread_obj::__new(::__hxcpp_thread_current());
}


STATIC_HX_DEFINE_DYNAMIC_FUNC0(Thread_obj,current,return )

Dynamic Thread_obj::readMessage( bool block){
	HX_STACK_FRAME("cpp.vm.Thread","readMessage",0x11bc2cd9,"cpp.vm.Thread.readMessage","C:\\HaxeToolkit\\haxe\\std/cpp/vm/Thread.hx",62,0xd8d7e381)
	HX_STACK_ARG(block,"block")
	HX_STACK_LINE(62)
	return ::__hxcpp_thread_read_message(block);
}


STATIC_HX_DEFINE_DYNAMIC_FUNC1(Thread_obj,readMessage,return )


Thread_obj::Thread_obj()
{
}

void Thread_obj::__Mark(HX_MARK_PARAMS)
{
	HX_MARK_BEGIN_CLASS(Thread);
	HX_MARK_MEMBER_NAME(handle,"handle");
	HX_MARK_END_CLASS();
}

void Thread_obj::__Visit(HX_VISIT_PARAMS)
{
	HX_VISIT_MEMBER_NAME(handle,"handle");
}

Dynamic Thread_obj::__Field(const ::String &inName,bool inCallProp)
{
	switch(inName.length) {
	case 6:
		if (HX_FIELD_EQ(inName,"handle") ) { return handle; }
		break;
	case 7:
		if (HX_FIELD_EQ(inName,"current") ) { return current_dyn(); }
		break;
	case 11:
		if (HX_FIELD_EQ(inName,"readMessage") ) { return readMessage_dyn(); }
	}
	return super::__Field(inName,inCallProp);
}

Dynamic Thread_obj::__SetField(const ::String &inName,const Dynamic &inValue,bool inCallProp)
{
	switch(inName.length) {
	case 6:
		if (HX_FIELD_EQ(inName,"handle") ) { handle=inValue.Cast< Dynamic >(); return inValue; }
	}
	return super::__SetField(inName,inValue,inCallProp);
}

void Thread_obj::__GetFields(Array< ::String> &outFields)
{
	outFields->push(HX_CSTRING("handle"));
	super::__GetFields(outFields);
};

static ::String sStaticFields[] = {
	HX_CSTRING("current"),
	HX_CSTRING("readMessage"),
	String(null()) };

#if HXCPP_SCRIPTABLE
static hx::StorageInfo sMemberStorageInfo[] = {
	{hx::fsObject /*Dynamic*/ ,(int)offsetof(Thread_obj,handle),HX_CSTRING("handle")},
	{ hx::fsUnknown, 0, null()}
};
#endif

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

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

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

#endif

Class Thread_obj::__mClass;

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

void Thread_obj::__boot()
{
}

} // end namespace cpp
} // end namespace vm
