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

Question about the example #4

Closed
bjadamson opened this issue Aug 30, 2016 · 3 comments
Closed

Question about the example #4

bjadamson opened this issue Aug 30, 2016 · 3 comments

Comments

@bjadamson
Copy link
Contributor

First, thanks for writing this library. It's really interesting to me, it would be nice if this became a solved problem. Anyways, moving onto my question, I'm wondering if you can help me understand what this is for:
https://github.com/SuperV1234/ecst/blob/master/example/pres_code.cpp#L720-L721

when inside the system definition this code is found:
https://github.com/SuperV1234/ecst/blob/master/example/pres_code.cpp#L211-L212

I guess my question is, what does declaring those tags as read/write do? Are they unavailable to the code within the system without first declaring them as read/write?

Thanks !!

@bjadamson
Copy link
Contributor Author

I found the following in your thesis:

Getting a mutable or const reference to a component is statically checked
at compile-time, producing an error in case the component access does not
fulfill what was specified in the system signature;

It seems this is a feature, am I correct in my understanding?

@vittorioromeo
Copy link
Owner

vittorioromeo commented Aug 30, 2016

Thanks for the feedback - I appreciate it.

I'm wondering if you can help me understand what this is for

.read(x0, x1, ...) and .write(x0, x1, ...) specify what component types a system is allowed to read or write. (Write implies read.)

If the component are not explicitly listed in the read/write lists then trying to access them in the system implementation will cause a compile-time error. Similarly, trying to access a component listed in read from a non-const reference will cause a compile-time error as well.

Let me know if that answers your question :)

@bjadamson
Copy link
Contributor Author

Ooops, forgot to leave a comment. This makes perfect sense, it just wasn't obvious when I was reading through the example code until I read your (entire) thesis. Nice work btw!

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

2 participants