/* this file has been autogenerated by vtkNodeJsWrap */
/* editing this might proof futile */

#define VTK_WRAPPING_CXX
#define VTK_STREAMS_FWD_ONLY
#include <nan.h>

#include "vtkHyperTreeCursorWrap.h"
#include "vtkHyperTreeGridCursorWrap.h"
#include "vtkObjectBaseWrap.h"
#include "vtkHyperTreeGridWrap.h"
#include "vtkHyperTreeWrap.h"
#include "vtkIdListWrap.h"
#include "../../plus/plus.h"

using namespace v8;

extern Nan::Persistent<v8::Object> vtkNodeJsNoWrap;
Nan::Persistent<v8::FunctionTemplate> VtkHyperTreeGridCursorWrap::ptpl;

VtkHyperTreeGridCursorWrap::VtkHyperTreeGridCursorWrap()
{ }

VtkHyperTreeGridCursorWrap::VtkHyperTreeGridCursorWrap(vtkSmartPointer<vtkHyperTreeGridCursor> _native)
{ native = _native; }

VtkHyperTreeGridCursorWrap::~VtkHyperTreeGridCursorWrap()
{ }

void VtkHyperTreeGridCursorWrap::Init(v8::Local<v8::Object> exports)
{
	Nan::SetAccessor(exports, Nan::New("vtkHyperTreeGridCursor").ToLocalChecked(), ConstructorGetter);
	Nan::SetAccessor(exports, Nan::New("HyperTreeGridCursor").ToLocalChecked(), ConstructorGetter);
}

void VtkHyperTreeGridCursorWrap::ConstructorGetter(
	v8::Local<v8::String> property,
	const Nan::PropertyCallbackInfo<v8::Value>& info)
{
	InitPtpl();
	info.GetReturnValue().Set(Nan::New(ptpl)->GetFunction());
}

void VtkHyperTreeGridCursorWrap::InitPtpl()
{
	if (!ptpl.IsEmpty()) return;
	v8::Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTemplate>(New);
	VtkHyperTreeCursorWrap::InitPtpl( );
	tpl->Inherit(Nan::New<FunctionTemplate>(VtkHyperTreeCursorWrap::ptpl));
	tpl->SetClassName(Nan::New("VtkHyperTreeGridCursorWrap").ToLocalChecked());
	tpl->InstanceTemplate()->SetInternalFieldCount(1);

	Nan::SetPrototypeMethod(tpl, "Clone", Clone);
	Nan::SetPrototypeMethod(tpl, "clone", Clone);

	Nan::SetPrototypeMethod(tpl, "GetBounds", GetBounds);
	Nan::SetPrototypeMethod(tpl, "getBounds", GetBounds);

	Nan::SetPrototypeMethod(tpl, "GetChildIndex", GetChildIndex);
	Nan::SetPrototypeMethod(tpl, "getChildIndex", GetChildIndex);

	Nan::SetPrototypeMethod(tpl, "GetCornerCursors", GetCornerCursors);
	Nan::SetPrototypeMethod(tpl, "getCornerCursors", GetCornerCursors);

	Nan::SetPrototypeMethod(tpl, "GetCursor", GetCursor);
	Nan::SetPrototypeMethod(tpl, "getCursor", GetCursor);

	Nan::SetPrototypeMethod(tpl, "GetDimension", GetDimension);
	Nan::SetPrototypeMethod(tpl, "getDimension", GetDimension);

	Nan::SetPrototypeMethod(tpl, "GetGrid", GetGrid);
	Nan::SetPrototypeMethod(tpl, "getGrid", GetGrid);

	Nan::SetPrototypeMethod(tpl, "GetLevel", GetLevel);
	Nan::SetPrototypeMethod(tpl, "getLevel", GetLevel);

	Nan::SetPrototypeMethod(tpl, "GetNumberOfChildren", GetNumberOfChildren);
	Nan::SetPrototypeMethod(tpl, "getNumberOfChildren", GetNumberOfChildren);

	Nan::SetPrototypeMethod(tpl, "GetNumberOfCursors", GetNumberOfCursors);
	Nan::SetPrototypeMethod(tpl, "getNumberOfCursors", GetNumberOfCursors);

	Nan::SetPrototypeMethod(tpl, "GetPoint", GetPoint);
	Nan::SetPrototypeMethod(tpl, "getPoint", GetPoint);

	Nan::SetPrototypeMethod(tpl, "GetTree", GetTree);
	Nan::SetPrototypeMethod(tpl, "getTree", GetTree);

	Nan::SetPrototypeMethod(tpl, "IsEqual", IsEqual);
	Nan::SetPrototypeMethod(tpl, "isEqual", IsEqual);

	Nan::SetPrototypeMethod(tpl, "IsLeaf", IsLeaf);
	Nan::SetPrototypeMethod(tpl, "isLeaf", IsLeaf);

	Nan::SetPrototypeMethod(tpl, "IsRoot", IsRoot);
	Nan::SetPrototypeMethod(tpl, "isRoot", IsRoot);

	Nan::SetPrototypeMethod(tpl, "NewInstance", NewInstance);
	Nan::SetPrototypeMethod(tpl, "newInstance", NewInstance);

	Nan::SetPrototypeMethod(tpl, "SafeDownCast", SafeDownCast);
	Nan::SetPrototypeMethod(tpl, "safeDownCast", SafeDownCast);

	Nan::SetPrototypeMethod(tpl, "SameTree", SameTree);
	Nan::SetPrototypeMethod(tpl, "sameTree", SameTree);

	Nan::SetPrototypeMethod(tpl, "SetGrid", SetGrid);
	Nan::SetPrototypeMethod(tpl, "setGrid", SetGrid);

	Nan::SetPrototypeMethod(tpl, "SetTree", SetTree);
	Nan::SetPrototypeMethod(tpl, "setTree", SetTree);

	Nan::SetPrototypeMethod(tpl, "ToChild", ToChild);
	Nan::SetPrototypeMethod(tpl, "toChild", ToChild);

	Nan::SetPrototypeMethod(tpl, "ToParent", ToParent);
	Nan::SetPrototypeMethod(tpl, "toParent", ToParent);

	Nan::SetPrototypeMethod(tpl, "ToRoot", ToRoot);
	Nan::SetPrototypeMethod(tpl, "toRoot", ToRoot);

	Nan::SetPrototypeMethod(tpl, "ToSameVertex", ToSameVertex);
	Nan::SetPrototypeMethod(tpl, "toSameVertex", ToSameVertex);

#ifdef VTK_NODE_PLUS_VTKHYPERTREEGRIDCURSORWRAP_INITPTPL
	VTK_NODE_PLUS_VTKHYPERTREEGRIDCURSORWRAP_INITPTPL
#endif
	ptpl.Reset( tpl );
}

void VtkHyperTreeGridCursorWrap::New(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	if(!info.IsConstructCall())
	{
		Nan::ThrowError("Constructor not called in a construct call.");
		return;
	}

	if(info.Length() == 0)
	{
		vtkSmartPointer<vtkHyperTreeGridCursor> native = vtkSmartPointer<vtkHyperTreeGridCursor>::New();
		VtkHyperTreeGridCursorWrap* obj = new VtkHyperTreeGridCursorWrap(native);
		obj->Wrap(info.This());
	}
	else
	{
		if(info[0]->ToObject() != vtkNodeJsNoWrap )
		{
			Nan::ThrowError("Parameter Error");
			return;
		}
	}

	info.GetReturnValue().Set(info.This());
}

void VtkHyperTreeGridCursorWrap::Clone(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkHyperTreeGridCursorWrap *wrapper = ObjectWrap::Unwrap<VtkHyperTreeGridCursorWrap>(info.Holder());
	vtkHyperTreeGridCursor *native = (vtkHyperTreeGridCursor *)wrapper->native.GetPointer();
	vtkHyperTreeGridCursor * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->Clone();
	VtkHyperTreeGridCursorWrap::InitPtpl();
	v8::Local<v8::Value> argv[1] =
		{ Nan::New(vtkNodeJsNoWrap) };
	v8::Local<v8::Function> cons =
		Nan::New<v8::FunctionTemplate>(VtkHyperTreeGridCursorWrap::ptpl)->GetFunction();
	v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
	VtkHyperTreeGridCursorWrap *w = new VtkHyperTreeGridCursorWrap();
	w->native = r;
	w->Wrap(wo);
	info.GetReturnValue().Set(wo);
}

void VtkHyperTreeGridCursorWrap::GetBounds(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkHyperTreeGridCursorWrap *wrapper = ObjectWrap::Unwrap<VtkHyperTreeGridCursorWrap>(info.Holder());
	vtkHyperTreeGridCursor *native = (vtkHyperTreeGridCursor *)wrapper->native.GetPointer();
	size_t i;
	if(info.Length() > 0 && info[0]->IsFloat64Array())
	{
		v8::Local<v8::Float64Array>a0(v8::Local<v8::Float64Array>::Cast(info[0]->ToObject()));
		if( a0->Length() < 6 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->GetBounds(
			(double *)(a0->Buffer()->GetContents().Data())
		);
		return;
	}
	else if(info.Length() > 0 && info[0]->IsArray())
	{
		v8::Local<v8::Array>a0(v8::Local<v8::Array>::Cast(info[0]->ToObject()));
		double b0[6];
		if( a0->Length() < 6 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

		for( i = 0; i < 6; i++ )
		{
			if( !a0->Get(i)->IsNumber() )
			{
				Nan::ThrowError("Array contents invalid.");
				return;
			}
			b0[i] = a0->Get(i)->NumberValue();
		}
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->GetBounds(
			b0
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkHyperTreeGridCursorWrap::GetChildIndex(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkHyperTreeGridCursorWrap *wrapper = ObjectWrap::Unwrap<VtkHyperTreeGridCursorWrap>(info.Holder());
	vtkHyperTreeGridCursor *native = (vtkHyperTreeGridCursor *)wrapper->native.GetPointer();
	int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetChildIndex();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkHyperTreeGridCursorWrap::GetCornerCursors(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkHyperTreeGridCursorWrap *wrapper = ObjectWrap::Unwrap<VtkHyperTreeGridCursorWrap>(info.Holder());
	vtkHyperTreeGridCursor *native = (vtkHyperTreeGridCursor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsUint32())
	{
		if(info.Length() > 1 && info[1]->IsUint32())
		{
			if(info.Length() > 2 && info[2]->IsObject() && (Nan::New(VtkIdListWrap::ptpl))->HasInstance(info[2]))
			{
				VtkIdListWrap *a2 = ObjectWrap::Unwrap<VtkIdListWrap>(info[2]->ToObject());
				bool r;
				if(info.Length() != 3)
				{
					Nan::ThrowError("Too many parameters.");
					return;
				}
				r = native->GetCornerCursors(
					info[0]->Uint32Value(),
					info[1]->Uint32Value(),
					(vtkIdList *) a2->native.GetPointer()
				);
				info.GetReturnValue().Set(Nan::New(r));
				return;
			}
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkHyperTreeGridCursorWrap::GetCursor(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkHyperTreeGridCursorWrap *wrapper = ObjectWrap::Unwrap<VtkHyperTreeGridCursorWrap>(info.Holder());
	vtkHyperTreeGridCursor *native = (vtkHyperTreeGridCursor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsUint32())
	{
		vtkHyperTreeGridCursor * r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->GetCursor(
			info[0]->Uint32Value()
		);
		VtkHyperTreeGridCursorWrap::InitPtpl();
		v8::Local<v8::Value> argv[1] =
			{ Nan::New(vtkNodeJsNoWrap) };
		v8::Local<v8::Function> cons =
			Nan::New<v8::FunctionTemplate>(VtkHyperTreeGridCursorWrap::ptpl)->GetFunction();
		v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
		VtkHyperTreeGridCursorWrap *w = new VtkHyperTreeGridCursorWrap();
		w->native = r;
		w->Wrap(wo);
		info.GetReturnValue().Set(wo);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkHyperTreeGridCursorWrap::GetDimension(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkHyperTreeGridCursorWrap *wrapper = ObjectWrap::Unwrap<VtkHyperTreeGridCursorWrap>(info.Holder());
	vtkHyperTreeGridCursor *native = (vtkHyperTreeGridCursor *)wrapper->native.GetPointer();
	int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetDimension();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkHyperTreeGridCursorWrap::GetGrid(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkHyperTreeGridCursorWrap *wrapper = ObjectWrap::Unwrap<VtkHyperTreeGridCursorWrap>(info.Holder());
	vtkHyperTreeGridCursor *native = (vtkHyperTreeGridCursor *)wrapper->native.GetPointer();
	vtkHyperTreeGrid * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetGrid();
	VtkHyperTreeGridWrap::InitPtpl();
	v8::Local<v8::Value> argv[1] =
		{ Nan::New(vtkNodeJsNoWrap) };
	v8::Local<v8::Function> cons =
		Nan::New<v8::FunctionTemplate>(VtkHyperTreeGridWrap::ptpl)->GetFunction();
	v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
	VtkHyperTreeGridWrap *w = new VtkHyperTreeGridWrap();
	w->native = r;
	w->Wrap(wo);
	info.GetReturnValue().Set(wo);
}

void VtkHyperTreeGridCursorWrap::GetLevel(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkHyperTreeGridCursorWrap *wrapper = ObjectWrap::Unwrap<VtkHyperTreeGridCursorWrap>(info.Holder());
	vtkHyperTreeGridCursor *native = (vtkHyperTreeGridCursor *)wrapper->native.GetPointer();
	unsigned int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetLevel();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkHyperTreeGridCursorWrap::GetNumberOfChildren(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkHyperTreeGridCursorWrap *wrapper = ObjectWrap::Unwrap<VtkHyperTreeGridCursorWrap>(info.Holder());
	vtkHyperTreeGridCursor *native = (vtkHyperTreeGridCursor *)wrapper->native.GetPointer();
	int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetNumberOfChildren();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkHyperTreeGridCursorWrap::GetNumberOfCursors(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkHyperTreeGridCursorWrap *wrapper = ObjectWrap::Unwrap<VtkHyperTreeGridCursorWrap>(info.Holder());
	vtkHyperTreeGridCursor *native = (vtkHyperTreeGridCursor *)wrapper->native.GetPointer();
	unsigned int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetNumberOfCursors();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkHyperTreeGridCursorWrap::GetPoint(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkHyperTreeGridCursorWrap *wrapper = ObjectWrap::Unwrap<VtkHyperTreeGridCursorWrap>(info.Holder());
	vtkHyperTreeGridCursor *native = (vtkHyperTreeGridCursor *)wrapper->native.GetPointer();
	size_t i;
	if(info.Length() > 0 && info[0]->IsFloat64Array())
	{
		v8::Local<v8::Float64Array>a0(v8::Local<v8::Float64Array>::Cast(info[0]->ToObject()));
		if( a0->Length() < 3 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->GetPoint(
			(double *)(a0->Buffer()->GetContents().Data())
		);
		return;
	}
	else if(info.Length() > 0 && info[0]->IsArray())
	{
		v8::Local<v8::Array>a0(v8::Local<v8::Array>::Cast(info[0]->ToObject()));
		double b0[3];
		if( a0->Length() < 3 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

		for( i = 0; i < 3; i++ )
		{
			if( !a0->Get(i)->IsNumber() )
			{
				Nan::ThrowError("Array contents invalid.");
				return;
			}
			b0[i] = a0->Get(i)->NumberValue();
		}
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->GetPoint(
			b0
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkHyperTreeGridCursorWrap::GetTree(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkHyperTreeGridCursorWrap *wrapper = ObjectWrap::Unwrap<VtkHyperTreeGridCursorWrap>(info.Holder());
	vtkHyperTreeGridCursor *native = (vtkHyperTreeGridCursor *)wrapper->native.GetPointer();
	vtkHyperTree * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetTree();
	VtkHyperTreeWrap::InitPtpl();
	v8::Local<v8::Value> argv[1] =
		{ Nan::New(vtkNodeJsNoWrap) };
	v8::Local<v8::Function> cons =
		Nan::New<v8::FunctionTemplate>(VtkHyperTreeWrap::ptpl)->GetFunction();
	v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
	VtkHyperTreeWrap *w = new VtkHyperTreeWrap();
	w->native = r;
	w->Wrap(wo);
	info.GetReturnValue().Set(wo);
}

void VtkHyperTreeGridCursorWrap::IsEqual(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkHyperTreeGridCursorWrap *wrapper = ObjectWrap::Unwrap<VtkHyperTreeGridCursorWrap>(info.Holder());
	vtkHyperTreeGridCursor *native = (vtkHyperTreeGridCursor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkHyperTreeCursorWrap::ptpl))->HasInstance(info[0]))
	{
		VtkHyperTreeCursorWrap *a0 = ObjectWrap::Unwrap<VtkHyperTreeCursorWrap>(info[0]->ToObject());
		bool r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->IsEqual(
			(vtkHyperTreeCursor *) a0->native.GetPointer()
		);
		info.GetReturnValue().Set(Nan::New(r));
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkHyperTreeGridCursorWrap::IsLeaf(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkHyperTreeGridCursorWrap *wrapper = ObjectWrap::Unwrap<VtkHyperTreeGridCursorWrap>(info.Holder());
	vtkHyperTreeGridCursor *native = (vtkHyperTreeGridCursor *)wrapper->native.GetPointer();
	bool r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->IsLeaf();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkHyperTreeGridCursorWrap::IsRoot(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkHyperTreeGridCursorWrap *wrapper = ObjectWrap::Unwrap<VtkHyperTreeGridCursorWrap>(info.Holder());
	vtkHyperTreeGridCursor *native = (vtkHyperTreeGridCursor *)wrapper->native.GetPointer();
	bool r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->IsRoot();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkHyperTreeGridCursorWrap::NewInstance(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkHyperTreeGridCursorWrap *wrapper = ObjectWrap::Unwrap<VtkHyperTreeGridCursorWrap>(info.Holder());
	vtkHyperTreeGridCursor *native = (vtkHyperTreeGridCursor *)wrapper->native.GetPointer();
	vtkHyperTreeGridCursor * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->NewInstance();
	VtkHyperTreeGridCursorWrap::InitPtpl();
	v8::Local<v8::Value> argv[1] =
		{ Nan::New(vtkNodeJsNoWrap) };
	v8::Local<v8::Function> cons =
		Nan::New<v8::FunctionTemplate>(VtkHyperTreeGridCursorWrap::ptpl)->GetFunction();
	v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
	VtkHyperTreeGridCursorWrap *w = new VtkHyperTreeGridCursorWrap();
	w->native = r;
	w->Wrap(wo);
	info.GetReturnValue().Set(wo);
}

void VtkHyperTreeGridCursorWrap::SafeDownCast(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkHyperTreeGridCursorWrap *wrapper = ObjectWrap::Unwrap<VtkHyperTreeGridCursorWrap>(info.Holder());
	vtkHyperTreeGridCursor *native = (vtkHyperTreeGridCursor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkObjectBaseWrap::ptpl))->HasInstance(info[0]))
	{
		VtkObjectBaseWrap *a0 = ObjectWrap::Unwrap<VtkObjectBaseWrap>(info[0]->ToObject());
		vtkHyperTreeGridCursor * r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->SafeDownCast(
			(vtkObjectBase *) a0->native.GetPointer()
		);
		VtkHyperTreeGridCursorWrap::InitPtpl();
		v8::Local<v8::Value> argv[1] =
			{ Nan::New(vtkNodeJsNoWrap) };
		v8::Local<v8::Function> cons =
			Nan::New<v8::FunctionTemplate>(VtkHyperTreeGridCursorWrap::ptpl)->GetFunction();
		v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
		VtkHyperTreeGridCursorWrap *w = new VtkHyperTreeGridCursorWrap();
		w->native = r;
		w->Wrap(wo);
		info.GetReturnValue().Set(wo);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkHyperTreeGridCursorWrap::SameTree(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkHyperTreeGridCursorWrap *wrapper = ObjectWrap::Unwrap<VtkHyperTreeGridCursorWrap>(info.Holder());
	vtkHyperTreeGridCursor *native = (vtkHyperTreeGridCursor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkHyperTreeCursorWrap::ptpl))->HasInstance(info[0]))
	{
		VtkHyperTreeCursorWrap *a0 = ObjectWrap::Unwrap<VtkHyperTreeCursorWrap>(info[0]->ToObject());
		int r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->SameTree(
			(vtkHyperTreeCursor *) a0->native.GetPointer()
		);
		info.GetReturnValue().Set(Nan::New(r));
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkHyperTreeGridCursorWrap::SetGrid(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkHyperTreeGridCursorWrap *wrapper = ObjectWrap::Unwrap<VtkHyperTreeGridCursorWrap>(info.Holder());
	vtkHyperTreeGridCursor *native = (vtkHyperTreeGridCursor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkHyperTreeGridWrap::ptpl))->HasInstance(info[0]))
	{
		VtkHyperTreeGridWrap *a0 = ObjectWrap::Unwrap<VtkHyperTreeGridWrap>(info[0]->ToObject());
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetGrid(
			(vtkHyperTreeGrid *) a0->native.GetPointer()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkHyperTreeGridCursorWrap::SetTree(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkHyperTreeGridCursorWrap *wrapper = ObjectWrap::Unwrap<VtkHyperTreeGridCursorWrap>(info.Holder());
	vtkHyperTreeGridCursor *native = (vtkHyperTreeGridCursor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkHyperTreeWrap::ptpl))->HasInstance(info[0]))
	{
		VtkHyperTreeWrap *a0 = ObjectWrap::Unwrap<VtkHyperTreeWrap>(info[0]->ToObject());
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetTree(
			(vtkHyperTree *) a0->native.GetPointer()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkHyperTreeGridCursorWrap::ToChild(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkHyperTreeGridCursorWrap *wrapper = ObjectWrap::Unwrap<VtkHyperTreeGridCursorWrap>(info.Holder());
	vtkHyperTreeGridCursor *native = (vtkHyperTreeGridCursor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsInt32())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->ToChild(
			info[0]->Int32Value()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkHyperTreeGridCursorWrap::ToParent(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkHyperTreeGridCursorWrap *wrapper = ObjectWrap::Unwrap<VtkHyperTreeGridCursorWrap>(info.Holder());
	vtkHyperTreeGridCursor *native = (vtkHyperTreeGridCursor *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->ToParent();
}

void VtkHyperTreeGridCursorWrap::ToRoot(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkHyperTreeGridCursorWrap *wrapper = ObjectWrap::Unwrap<VtkHyperTreeGridCursorWrap>(info.Holder());
	vtkHyperTreeGridCursor *native = (vtkHyperTreeGridCursor *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->ToRoot();
}

void VtkHyperTreeGridCursorWrap::ToSameVertex(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkHyperTreeGridCursorWrap *wrapper = ObjectWrap::Unwrap<VtkHyperTreeGridCursorWrap>(info.Holder());
	vtkHyperTreeGridCursor *native = (vtkHyperTreeGridCursor *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkHyperTreeCursorWrap::ptpl))->HasInstance(info[0]))
	{
		VtkHyperTreeCursorWrap *a0 = ObjectWrap::Unwrap<VtkHyperTreeCursorWrap>(info[0]->ToObject());
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->ToSameVertex(
			(vtkHyperTreeCursor *) a0->native.GetPointer()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

