Sha256: 728478303892ed7da7ebcf8a6a1feeb63cc8916f537d651a7e35d74ce500e2b7
Contents?: true
Size: 914 Bytes
Versions: 3
Compression:
Stored size: 914 Bytes
Contents
#include "point.hpp" namespace filegdb { VALUE point::_klass = Qnil; VALUE point::klass() { return point::_klass; } VALUE point::set_x(VALUE self, VALUE x) { unwrap(self)->value->x = NUM2DBL(x); return x; } VALUE point::get_x(VALUE self) { return rb_float_new(unwrap(self)->value->x); } VALUE point::set_y(VALUE self, VALUE y) { unwrap(self)->value->y = NUM2DBL(y); return y; } VALUE point::get_y(VALUE self) { return rb_float_new(unwrap(self)->value->y); } void point::define(VALUE module) { point::_klass = rb_define_class_under(module, "Point", rb_cObject); base::define(point::_klass, false); rb_define_method(point::_klass, "x=", FGDB_METHOD(point::set_x), 1); rb_define_method(point::_klass, "x", FGDB_METHOD(point::get_x), 0); rb_define_method(point::_klass, "y=", FGDB_METHOD(point::set_y), 1); rb_define_method(point::_klass, "y", FGDB_METHOD(point::get_y), 0); } }
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
filegdb-1.1.1 | ext/filegdb/point.cpp |
filegdb-1.1.0 | ext/filegdb/point.cpp |
filegdb-1.0.0 | ext/filegdb/point.cpp |