Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using C++ for type-safe, intellisense enabled XML generation #30

Open
eruffaldi opened this issue Apr 8, 2017 · 1 comment
Open

Using C++ for type-safe, intellisense enabled XML generation #30

eruffaldi opened this issue Apr 8, 2017 · 1 comment

Comments

@eruffaldi
Copy link
Member

  1. extract Component signatures
  2. generate stub code
  3. include code into program that binds components (intellisense enabled)
  4. compile and run emitting XML or directly launching CoCo

We implement it in C++ but could be implemented with any typed language

Pros: faster editing, support for arguments
Cons: little slower

We could limit the Cons as follows:

  1. let launcher support this file at command line with -x automatically compiling and executing and passing the correct includes
  2. perform step 1 with some form of caching
@eruffaldi
Copy link
Member Author

Working prototype:

#include "cocoxx.hpp"

int main(int argc, char const *argv[])
{
	coco::CoCoApp h;

	// create objects and assign names (TODO anonymous)
	auto x = coco::vision::OpenNIReaderTask("reader");
	auto y = coco::vision::X264EncoderTask("enc");
	
	// returns Connectionf or customization
	y.image_IN << x.rgb_buffer_OUT;

	// put into container
	h << x << y;

	h.generateXML();
	//h.run();

	return 0;
}

Example with CLion

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant