-
Notifications
You must be signed in to change notification settings - Fork 163
/
mapnik_grid.hpp
45 lines (37 loc) · 1.39 KB
/
mapnik_grid.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef __NODE_MAPNIK_GRID_H__
#define __NODE_MAPNIK_GRID_H__
#include <v8.h>
#include <node.h>
#include <node_object_wrap.h>
#include <mapnik/grid/grid.hpp>
#include <boost/shared_ptr.hpp>
using namespace v8;
using namespace node;
typedef boost::shared_ptr<mapnik::grid> grid_ptr;
class Grid: public node::ObjectWrap {
public:
static Persistent<FunctionTemplate> constructor;
static void Initialize(Handle<Object> target);
static Handle<Value> New(const Arguments &args);
static Handle<Value> encodeSync(const Arguments &args);
static Handle<Value> encode(const Arguments &args);
static Handle<Value> fields(const Arguments &args);
static Handle<Value> view(const Arguments &args);
static Handle<Value> width(const Arguments &args);
static Handle<Value> height(const Arguments &args);
static Handle<Value> painted(const Arguments &args);
static Handle<Value> get_prop(Local<String> property,
const AccessorInfo& info);
static void set_prop(Local<String> property,
Local<Value> value,
const AccessorInfo& info);
void _ref() { Ref(); }
void _unref() { Unref(); }
Grid(unsigned int width, unsigned int height, std::string const& key, unsigned int resolution);
Grid(grid_ptr this_);
inline grid_ptr get() { return this_; }
private:
~Grid();
grid_ptr this_;
};
#endif