mapbox / node-cpp-skel

Skeleton for bindings to C++ libraries for Node.js using node-addon-api
Creative Commons Zero v1.0 Universal
72 stars 10 forks source link

Add object-sync example #48

Closed GretaCB closed 7 years ago

GretaCB commented 7 years ago

Per https://github.com/mapbox/node-cpp-skel/pull/44, continuing to expand examples. Super rough right now.

cc @mapbox/core-tech

codecov-io commented 7 years ago

Codecov Report

Merging #48 into master will decrease coverage by 4.76%. The diff coverage is 90%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #48      +/-   ##
==========================================
- Coverage   97.61%   92.85%   -4.77%     
==========================================
  Files           5        5              
  Lines         126       70      -56     
==========================================
- Hits          123       65      -58     
- Misses          3        5       +2
Impacted Files Coverage Δ
src/object_sync/hello.hpp 0% <0%> (ø)
src/module.cpp 100% <100%> (ø) :arrow_up:
src/standalone/hello.cpp 100% <100%> (ø) :arrow_up:
src/object_sync/hello.cpp 92.59% <92.59%> (ø)
src/hello_world.hpp

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7b7e678...e756720. Read the comment docs.

GretaCB commented 7 years ago

Update

Per https://github.com/mapbox/node-cpp-skel/pull/48/files/a55288299aa6393e99257c35556aa38c8ccfdd4d#r123389311, I've started to rethink the design of this object_sync example. I'm running into some issues related to how to access member vars of an instance from within a function, how that plays into the Init function and generally what is happening with the constructor calls.

I've added a few more comments per chat with @flippmoke , but I'm still a little wobbly with the concepts (ex: Singleton). Would love to run the new design by you, @springmeyer , if you have some time on Monday.