/
mapnik_grid.hpp
52 lines (42 loc) · 1.67 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
46
47
48
49
50
51
52
#ifndef __NODE_MAPNIK_GRID_H__
#define __NODE_MAPNIK_GRID_H__
#include <v8.h>
#include <uv.h>
#include <node_object_wrap.h>
#include <mapnik/grid/grid.hpp>
#include <boost/shared_ptr.hpp>
using namespace v8;
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 void EIO_Encode(uv_work_t* req);
static void EIO_AfterEncode(uv_work_t* req);
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> clearSync(const Arguments& args);
static Handle<Value> clear(const Arguments& args);
static void EIO_Clear(uv_work_t* req);
static void EIO_AfterClear(uv_work_t* req);
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);
inline grid_ptr get() { return this_; }
private:
~Grid();
grid_ptr this_;
int estimated_size_;
};
#endif