-
Notifications
You must be signed in to change notification settings - Fork 0
/
EWAHBitMap.h
50 lines (43 loc) · 1.29 KB
/
EWAHBitMap.h
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
#ifndef EWAHBITMAP_H
#define EWAHBITMAP_H
#include <nan.h>
#include <node.h>
#include "src/EWAHBoolArray/headers/ewah.h"
class EWAHBitMap : public Nan::ObjectWrap {
private:
typedef EWAHBoolArray<> ewahboolarray;
typedef ewahboolarray::const_iterator ewahboolarray_const_iterator;
ewahboolarray boolArray;
void set(unsigned i) {
boolArray.set(i);
}
const ewahboolarray& getImmutableArray() {
return boolArray;
}
ewahboolarray& getMutableArray() {
return boolArray;
}
void setArray(ewahboolarray newBoolArray) {
boolArray = newBoolArray;
}
public:
static void Init();
static Nan::Persistent<v8::Function> constructor;
static Nan::Persistent<v8::FunctionTemplate> constructor_template;
static void New(const Nan::FunctionCallbackInfo<v8::Value>& info);
static v8::Local<v8::Object> NewInstance(v8::Local<v8::Value> arg);
static NAN_METHOD(Push);
static NAN_METHOD(Set);
static NAN_METHOD(Unset);
static NAN_METHOD(ToString);
static NAN_METHOD(Length);
static NAN_METHOD(NumberOfOnes);
static NAN_METHOD(Map);
static NAN_METHOD(Or);
static NAN_METHOD(And);
static NAN_METHOD(Xor);
static NAN_METHOD(Not);
static NAN_METHOD(Write);
static NAN_METHOD(Read);
};
#endif