예제 #1
0
void DatasetBands::Initialize(Handle<Object> target)
{
	HandleScope scope;

	constructor = Persistent<FunctionTemplate>::New(FunctionTemplate::New(DatasetBands::New));
	constructor->InstanceTemplate()->SetInternalFieldCount(1);
	constructor->SetClassName(String::NewSymbol("DatasetBands"));

	NODE_SET_PROTOTYPE_METHOD(constructor, "toString", toString);
	NODE_SET_PROTOTYPE_METHOD(constructor, "count", count);
	//NODE_SET_PROTOTYPE_METHOD(constructor, "create", create);
	NODE_SET_PROTOTYPE_METHOD(constructor, "get", get);

	ATTR_DONT_ENUM(constructor, "ds", dsGetter, READ_ONLY_SETTER);

	target->Set(String::NewSymbol("DatasetBands"), constructor->GetFunction());
}
예제 #2
0
void DatasetLayers::Initialize(Handle<Object> target)
{
	NanScope();

	Local<FunctionTemplate> lcons = NanNew<FunctionTemplate>(DatasetLayers::New);
	lcons->InstanceTemplate()->SetInternalFieldCount(1);
	lcons->SetClassName(NanNew("DatasetLayers"));

	NODE_SET_PROTOTYPE_METHOD(lcons, "toString", toString);
	NODE_SET_PROTOTYPE_METHOD(lcons, "count", count);
	NODE_SET_PROTOTYPE_METHOD(lcons, "create", create);
	NODE_SET_PROTOTYPE_METHOD(lcons, "copy", copy);
	NODE_SET_PROTOTYPE_METHOD(lcons, "get", get);
	NODE_SET_PROTOTYPE_METHOD(lcons, "remove", remove);

	ATTR_DONT_ENUM(lcons, "ds", dsGetter, READ_ONLY_SETTER);

	target->Set(NanNew("DatasetLayers"), lcons->GetFunction());

	NanAssignPersistent(constructor, lcons);
}
예제 #3
0
void LayerFields::Initialize(Handle<Object> target)
{
	HandleScope scope;

	constructor = Persistent<FunctionTemplate>::New(FunctionTemplate::New(LayerFields::New));
	constructor->InstanceTemplate()->SetInternalFieldCount(1);
	constructor->SetClassName(String::NewSymbol("LayerFields"));

	NODE_SET_PROTOTYPE_METHOD(constructor, "toString", toString);
	NODE_SET_PROTOTYPE_METHOD(constructor, "count", count);
	NODE_SET_PROTOTYPE_METHOD(constructor, "get", get);
	NODE_SET_PROTOTYPE_METHOD(constructor, "remove", remove);
	NODE_SET_PROTOTYPE_METHOD(constructor, "getNames", getNames);
	NODE_SET_PROTOTYPE_METHOD(constructor, "indexOf", indexOf);
	NODE_SET_PROTOTYPE_METHOD(constructor, "reorder", reorder);
	NODE_SET_PROTOTYPE_METHOD(constructor, "add", add);
	//NODE_SET_PROTOTYPE_METHOD(constructor, "alter", alter);

	ATTR_DONT_ENUM(constructor, "layer", layerGetter, READ_ONLY_SETTER);

	target->Set(String::NewSymbol("LayerFields"), constructor->GetFunction());
}
예제 #4
0
void FeatureDefnFields::Initialize(Local<Object> target)
{
	Nan::HandleScope scope;

	Local<FunctionTemplate> lcons = Nan::New<FunctionTemplate>(FeatureDefnFields::New);
	lcons->InstanceTemplate()->SetInternalFieldCount(1);
	lcons->SetClassName(Nan::New("FeatureDefnFields").ToLocalChecked());

	Nan::SetPrototypeMethod(lcons, "toString", toString);
	Nan::SetPrototypeMethod(lcons, "count", count);
	Nan::SetPrototypeMethod(lcons, "get", get);
	Nan::SetPrototypeMethod(lcons, "remove", remove);
	Nan::SetPrototypeMethod(lcons, "getNames", getNames);
	Nan::SetPrototypeMethod(lcons, "indexOf", indexOf);
	Nan::SetPrototypeMethod(lcons, "reorder", reorder);
	Nan::SetPrototypeMethod(lcons, "add", add);
	//Nan::SetPrototypeMethod(lcons, "alter", alter);

	ATTR_DONT_ENUM(lcons, "featureDefn", featureDefnGetter, READ_ONLY_SETTER);

	target->Set(Nan::New("FeatureDefnFields").ToLocalChecked(), lcons->GetFunction());

	constructor.Reset(lcons);
}
예제 #5
0
void FeatureDefnFields::Initialize(Handle<Object> target)
{
	NanScope();

	Local<FunctionTemplate> lcons = NanNew<FunctionTemplate>(FeatureDefnFields::New);
	lcons->InstanceTemplate()->SetInternalFieldCount(1);
	lcons->SetClassName(NanNew("FeatureDefnFields"));

	NODE_SET_PROTOTYPE_METHOD(lcons, "toString", toString);
	NODE_SET_PROTOTYPE_METHOD(lcons, "count", count);
	NODE_SET_PROTOTYPE_METHOD(lcons, "get", get);
	NODE_SET_PROTOTYPE_METHOD(lcons, "remove", remove);
	NODE_SET_PROTOTYPE_METHOD(lcons, "getNames", getNames);
	NODE_SET_PROTOTYPE_METHOD(lcons, "indexOf", indexOf);
	NODE_SET_PROTOTYPE_METHOD(lcons, "reorder", reorder);
	NODE_SET_PROTOTYPE_METHOD(lcons, "add", add);
	//NODE_SET_PROTOTYPE_METHOD(lcons, "alter", alter);

	ATTR_DONT_ENUM(lcons, "featureDefn", featureDefnGetter, READ_ONLY_SETTER);

	target->Set(NanNew("FeatureDefnFields"), lcons->GetFunction());

	NanAssignPersistent(constructor, lcons);
}