// This is a generated file, modify: generate/templates/templates/class_header.h #ifndef GITOID_H #define GITOID_H #include #include #include #include #include #include #include "async_baton.h" #include "nodegit_wrapper.h" #include "promise_completion.h" #include "reference_counter.h" extern "C" { #include } #include "../include/typedefs.h" using namespace node; using namespace v8; class GitOid; struct GitOidTraits { typedef GitOid cppClass; typedef git_oid cType; static const bool isDuplicable = true; static void duplicate(git_oid **dest, git_oid *src) { git_oid *copy = (git_oid *)malloc(sizeof(git_oid)); git_oid_cpy(copy, src); *dest = copy; } static const bool isSingleton = false; static const bool isFreeable = true; static void free(git_oid *raw) { unsigned long referenceCount = 0; if (referenceCount == 0) { ::free(raw); // :: to avoid calling this free recursively } } }; class GitOid : public NodeGitWrapper { // grant full access to base class friend class NodeGitWrapper; public: static void InitializeComponent (v8::Local target); private: GitOid() : NodeGitWrapper( "A new GitOid cannot be instantiated." ) {} GitOid(git_oid *raw, bool selfFreeing, v8::Local owner = v8::Local()) : NodeGitWrapper(raw, selfFreeing, owner) {} ~GitOid(); static NAN_METHOD(Cmp); static NAN_METHOD(Cpy); static NAN_METHOD(Equal); static NAN_METHOD(Fromstrp); static NAN_METHOD(IsZero); static NAN_METHOD(Iszero); static NAN_METHOD(Ncmp); static NAN_METHOD(Strcmp); static NAN_METHOD(Streq); static NAN_METHOD(TostrS); }; #endif