#ifndef GITOID_H
#define GITOID_H
// generated from class_header.h
#include <nan.h>
#include <string>

extern "C" {
#include <git2.h>
}

#include "../include/oid.h"

using namespace node;
using namespace v8;

class GitOid : public ObjectWrap {
public:

  static Persistent<Function> constructor_template;
  static void InitializeComponent (Handle<v8::Object> target);

  git_oid *GetValue();
  git_oid **GetRefValue();

  static Handle<Value> New(void *raw, bool selfFreeing);
  bool selfFreeing;

private:
  GitOid(git_oid *raw, bool selfFreeing);
  ~GitOid();

  static NAN_METHOD(JSNewFunction);


  static NAN_METHOD(Allocfmt);

  static NAN_METHOD(Cmp);

  static NAN_METHOD(Equal);

  static NAN_METHOD(Fromstr);

  static NAN_METHOD(Iszero);

  static NAN_METHOD(Ncmp);

  static NAN_METHOD(Strcmp);

  static NAN_METHOD(Streq);
  git_oid *raw;
};

#endif
