Created
September 10, 2011 07:16
-
-
Save ethanrublee/1208057 to your computer and use it in GitHub Desktop.
A sample of what spore decl might look like
This file contains 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
struct Add | |
{ | |
static void declare_io(const ecto::tendrils& p, ecto::tendrils& i, ecto::tendrils& o) | |
{ | |
i.declare(&Add::left_,"left"); | |
i.declare(&Add::right_,"right"); | |
o.declare(&Add::out_,"out"); | |
} | |
int process(const tendrils& /*inputs*/, const tendrils& /*outputs*/) | |
{ | |
*out_ = *left_ + *right_; | |
return ecto::OK; | |
} | |
ecto::spore<double> out_, left_, right_; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment