/* 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 "vtkGraphGeodesicPathWrap.h"
#include "vtkDijkstraGraphGeodesicPathWrap.h"
#include "vtkObjectBaseWrap.h"
#include "vtkIdListWrap.h"
#include "vtkPointsWrap.h"
#include "vtkDoubleArrayWrap.h"
#include "../../plus/plus.h"

using namespace v8;

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

VtkDijkstraGraphGeodesicPathWrap::VtkDijkstraGraphGeodesicPathWrap()
{ }

VtkDijkstraGraphGeodesicPathWrap::VtkDijkstraGraphGeodesicPathWrap(vtkSmartPointer<vtkDijkstraGraphGeodesicPath> _native)
{ native = _native; }

VtkDijkstraGraphGeodesicPathWrap::~VtkDijkstraGraphGeodesicPathWrap()
{ }

void VtkDijkstraGraphGeodesicPathWrap::Init(v8::Local<v8::Object> exports)
{
	Nan::SetAccessor(exports, Nan::New("vtkDijkstraGraphGeodesicPath").ToLocalChecked(), ConstructorGetter);
	Nan::SetAccessor(exports, Nan::New("DijkstraGraphGeodesicPath").ToLocalChecked(), ConstructorGetter);
}

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

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

	Nan::SetPrototypeMethod(tpl, "GetCumulativeWeights", GetCumulativeWeights);
	Nan::SetPrototypeMethod(tpl, "getCumulativeWeights", GetCumulativeWeights);

	Nan::SetPrototypeMethod(tpl, "GetIdList", GetIdList);
	Nan::SetPrototypeMethod(tpl, "getIdList", GetIdList);

	Nan::SetPrototypeMethod(tpl, "GetRepelPathFromVertices", GetRepelPathFromVertices);
	Nan::SetPrototypeMethod(tpl, "getRepelPathFromVertices", GetRepelPathFromVertices);

	Nan::SetPrototypeMethod(tpl, "GetRepelVertices", GetRepelVertices);
	Nan::SetPrototypeMethod(tpl, "getRepelVertices", GetRepelVertices);

	Nan::SetPrototypeMethod(tpl, "GetStopWhenEndReached", GetStopWhenEndReached);
	Nan::SetPrototypeMethod(tpl, "getStopWhenEndReached", GetStopWhenEndReached);

	Nan::SetPrototypeMethod(tpl, "GetUseScalarWeights", GetUseScalarWeights);
	Nan::SetPrototypeMethod(tpl, "getUseScalarWeights", GetUseScalarWeights);

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

	Nan::SetPrototypeMethod(tpl, "RepelPathFromVerticesOff", RepelPathFromVerticesOff);
	Nan::SetPrototypeMethod(tpl, "repelPathFromVerticesOff", RepelPathFromVerticesOff);

	Nan::SetPrototypeMethod(tpl, "RepelPathFromVerticesOn", RepelPathFromVerticesOn);
	Nan::SetPrototypeMethod(tpl, "repelPathFromVerticesOn", RepelPathFromVerticesOn);

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

	Nan::SetPrototypeMethod(tpl, "SetRepelPathFromVertices", SetRepelPathFromVertices);
	Nan::SetPrototypeMethod(tpl, "setRepelPathFromVertices", SetRepelPathFromVertices);

	Nan::SetPrototypeMethod(tpl, "SetRepelVertices", SetRepelVertices);
	Nan::SetPrototypeMethod(tpl, "setRepelVertices", SetRepelVertices);

	Nan::SetPrototypeMethod(tpl, "SetStopWhenEndReached", SetStopWhenEndReached);
	Nan::SetPrototypeMethod(tpl, "setStopWhenEndReached", SetStopWhenEndReached);

	Nan::SetPrototypeMethod(tpl, "SetUseScalarWeights", SetUseScalarWeights);
	Nan::SetPrototypeMethod(tpl, "setUseScalarWeights", SetUseScalarWeights);

	Nan::SetPrototypeMethod(tpl, "StopWhenEndReachedOff", StopWhenEndReachedOff);
	Nan::SetPrototypeMethod(tpl, "stopWhenEndReachedOff", StopWhenEndReachedOff);

	Nan::SetPrototypeMethod(tpl, "StopWhenEndReachedOn", StopWhenEndReachedOn);
	Nan::SetPrototypeMethod(tpl, "stopWhenEndReachedOn", StopWhenEndReachedOn);

	Nan::SetPrototypeMethod(tpl, "UseScalarWeightsOff", UseScalarWeightsOff);
	Nan::SetPrototypeMethod(tpl, "useScalarWeightsOff", UseScalarWeightsOff);

	Nan::SetPrototypeMethod(tpl, "UseScalarWeightsOn", UseScalarWeightsOn);
	Nan::SetPrototypeMethod(tpl, "useScalarWeightsOn", UseScalarWeightsOn);

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

void VtkDijkstraGraphGeodesicPathWrap::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<vtkDijkstraGraphGeodesicPath> native = vtkSmartPointer<vtkDijkstraGraphGeodesicPath>::New();
		VtkDijkstraGraphGeodesicPathWrap* obj = new VtkDijkstraGraphGeodesicPathWrap(native);
		obj->Wrap(info.This());
	}
	else
	{
		if(info[0]->ToObject() != vtkNodeJsNoWrap )
		{
			Nan::ThrowError("Parameter Error");
			return;
		}
	}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

