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

[rosidl_generator_cpp] add <<operator for message classes #259

Closed
mikaelarguedas opened this issue Jan 8, 2018 · 3 comments · Fixed by #523
Closed

[rosidl_generator_cpp] add <<operator for message classes #259

mikaelarguedas opened this issue Jan 8, 2018 · 3 comments · Fixed by #523
Labels
enhancement New feature or request help wanted Extra attention is needed more-information-needed Further information is required

Comments

@mikaelarguedas
Copy link
Member

We should provide a <<operator like in ROS 1 to ease printing to streams. Some places in the codebase print manually message content to stream in the meantime, e.g. https://github.com/ros2/demos/blob/144fb6d80810f149fa2457ae8542b332a6497674/demo_nodes_cpp/src/parameters/parameter_events.cpp#L26

@mikaelarguedas mikaelarguedas added the enhancement New feature or request label Jan 8, 2018
@mikaelarguedas
Copy link
Member Author

this will require a decision on what format (YAML, JSON, something else?) we want for the output.
Other PR related to the formats chosen: ros2/rclcpp#275

@dirk-thomas
Copy link
Member

The decision from the last conversation on this topic was to not create such operators. Instead there should be global functions specialized on the message named to_yaml / to_json / to_whatever_you_like.

@wjwwood
Copy link
Member

wjwwood commented Feb 6, 2018

I didn't think that we ruled out an operator<< which defaulted to one of those, for convenience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed more-information-needed Further information is required
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants