Created
October 27, 2013 00:49
-
-
Save deltaluca/7176515 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace v8interop { namespace noise | |
{ | |
// General node/v8 wrapper of a noise function. | |
template <typename In, typename Out> | |
class Noise : public node::ObjectWrap | |
{ | |
public: | |
::noise::Noise<In, Out> noise; | |
Noise() = delete; | |
template <typename N> | |
Noise(N&& noise): | |
noise(std::forward<::noise::Noise<In, Out>>(noise)) | |
{ | |
} | |
template <typename N> | |
Noise(N&& noise): | |
noise(std::move(noise.noise)), | |
node::ObjectWrap(std::forward<node::ObjectWrap>(noise)) | |
{ | |
} | |
}; | |
}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment