// This is a generated file, modify: generate/templates/templates/class_header.h

#ifndef GITCOMMITARRAY_H
#define GITCOMMITARRAY_H
#include <nan.h>
#include <string>
#include <utility>
#include <algorithm>
#include <set>
#include <unordered_set>
#include <sstream>

#include "async_baton.h"
#include "async_worker.h"
#include "cleanup_handle.h"
#include "context.h"
#include "lock_master.h"
#include "nodegit_wrapper.h"
#include "promise_completion.h"
#include "reference_counter.h"
#include "worker_pool.h"

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

#include "../include/typedefs.h"


using namespace node;
using namespace v8;

class GitCommitarray;
 
struct GitCommitarrayTraits {
  typedef GitCommitarray cppClass;
  typedef git_commitarray cType;
 
  static const bool isDuplicable = false;
  static void duplicate(git_commitarray **dest, git_commitarray *src) {
     Nan::ThrowError("duplicate called on GitCommitarray which cannot be duplicated");
   }

  static std::string className() { return "GitCommitarray"; };
  static const bool isSingleton = false;
  static const bool isFreeable = true;
  static void free(git_commitarray *raw) {
    unsigned long referenceCount = 0;
     if (referenceCount == 0) {
      ::free(raw); // :: to avoid calling this free recursively
    }
   }
};

class GitCommitarray : public
  NodeGitWrapper<GitCommitarrayTraits>
{
    // grant full access to base class
    friend class NodeGitWrapper<GitCommitarrayTraits>;
   public:
    GitCommitarray(const GitCommitarray &) = delete;
    GitCommitarray(GitCommitarray &&) = delete;
    GitCommitarray &operator=(const GitCommitarray &) = delete;
    GitCommitarray &operator=(GitCommitarray &&) = delete;

    static void InitializeComponent (v8::Local<v8::Object> target, nodegit::Context *nodegitContext);

    

  private:
    GitCommitarray()
      : NodeGitWrapper<GitCommitarrayTraits>(
           "A new GitCommitarray cannot be instantiated."
       )
    {}
    GitCommitarray(git_commitarray *raw, bool selfFreeing, v8::Local<v8::Object> owner = v8::Local<v8::Object>())
      : NodeGitWrapper<GitCommitarrayTraits>(raw, selfFreeing, owner)
    {}
    ~GitCommitarray();

    static NAN_METHOD(Dispose);
};

#endif
