/* 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 "vtkInteractorObserverWrap.h"
#include "vtkInteractorEventRecorderWrap.h"
#include "vtkObjectWrap.h"
#include "vtkRenderWindowInteractorWrap.h"
#include "../../plus/plus.h"

using namespace v8;

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

VtkInteractorEventRecorderWrap::VtkInteractorEventRecorderWrap()
{ }

VtkInteractorEventRecorderWrap::VtkInteractorEventRecorderWrap(vtkSmartPointer<vtkInteractorEventRecorder> _native)
{ native = _native; }

VtkInteractorEventRecorderWrap::~VtkInteractorEventRecorderWrap()
{ }

void VtkInteractorEventRecorderWrap::Init(v8::Local<v8::Object> exports)
{
	Nan::SetAccessor(exports, Nan::New("vtkInteractorEventRecorder").ToLocalChecked(), ConstructorGetter);
	Nan::SetAccessor(exports, Nan::New("InteractorEventRecorder").ToLocalChecked(), ConstructorGetter);
}

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

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

	Nan::SetPrototypeMethod(tpl, "GetClassName", GetClassName);
	Nan::SetPrototypeMethod(tpl, "getClassName", GetClassName);

	Nan::SetPrototypeMethod(tpl, "GetFileName", GetFileName);
	Nan::SetPrototypeMethod(tpl, "getFileName", GetFileName);

	Nan::SetPrototypeMethod(tpl, "GetInputString", GetInputString);
	Nan::SetPrototypeMethod(tpl, "getInputString", GetInputString);

	Nan::SetPrototypeMethod(tpl, "GetReadFromInputString", GetReadFromInputString);
	Nan::SetPrototypeMethod(tpl, "getReadFromInputString", GetReadFromInputString);

	Nan::SetPrototypeMethod(tpl, "IsA", IsA);
	Nan::SetPrototypeMethod(tpl, "isA", IsA);

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

	Nan::SetPrototypeMethod(tpl, "Play", Play);
	Nan::SetPrototypeMethod(tpl, "play", Play);

	Nan::SetPrototypeMethod(tpl, "ReadFromInputStringOff", ReadFromInputStringOff);
	Nan::SetPrototypeMethod(tpl, "readFromInputStringOff", ReadFromInputStringOff);

	Nan::SetPrototypeMethod(tpl, "ReadFromInputStringOn", ReadFromInputStringOn);
	Nan::SetPrototypeMethod(tpl, "readFromInputStringOn", ReadFromInputStringOn);

	Nan::SetPrototypeMethod(tpl, "Record", Record);
	Nan::SetPrototypeMethod(tpl, "record", Record);

	Nan::SetPrototypeMethod(tpl, "Rewind", Rewind);
	Nan::SetPrototypeMethod(tpl, "rewind", Rewind);

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

	Nan::SetPrototypeMethod(tpl, "SetEnabled", SetEnabled);
	Nan::SetPrototypeMethod(tpl, "setEnabled", SetEnabled);

	Nan::SetPrototypeMethod(tpl, "SetFileName", SetFileName);
	Nan::SetPrototypeMethod(tpl, "setFileName", SetFileName);

	Nan::SetPrototypeMethod(tpl, "SetInputString", SetInputString);
	Nan::SetPrototypeMethod(tpl, "setInputString", SetInputString);

	Nan::SetPrototypeMethod(tpl, "SetInteractor", SetInteractor);
	Nan::SetPrototypeMethod(tpl, "setInteractor", SetInteractor);

	Nan::SetPrototypeMethod(tpl, "SetReadFromInputString", SetReadFromInputString);
	Nan::SetPrototypeMethod(tpl, "setReadFromInputString", SetReadFromInputString);

	Nan::SetPrototypeMethod(tpl, "Stop", Stop);
	Nan::SetPrototypeMethod(tpl, "stop", Stop);

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

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

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

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

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

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

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

void VtkInteractorEventRecorderWrap::IsA(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkInteractorEventRecorderWrap *wrapper = ObjectWrap::Unwrap<VtkInteractorEventRecorderWrap>(info.Holder());
	vtkInteractorEventRecorder *native = (vtkInteractorEventRecorder *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsString())
	{
		Nan::Utf8String a0(info[0]);
		int r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->IsA(
			*a0
		);
		info.GetReturnValue().Set(Nan::New(r));
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

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

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

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

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

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

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

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

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

void VtkInteractorEventRecorderWrap::SetFileName(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkInteractorEventRecorderWrap *wrapper = ObjectWrap::Unwrap<VtkInteractorEventRecorderWrap>(info.Holder());
	vtkInteractorEventRecorder *native = (vtkInteractorEventRecorder *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsString())
	{
		Nan::Utf8String a0(info[0]);
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetFileName(
			*a0
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkInteractorEventRecorderWrap::SetInputString(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkInteractorEventRecorderWrap *wrapper = ObjectWrap::Unwrap<VtkInteractorEventRecorderWrap>(info.Holder());
	vtkInteractorEventRecorder *native = (vtkInteractorEventRecorder *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsString())
	{
		Nan::Utf8String a0(info[0]);
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetInputString(
			*a0
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

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

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

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

