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

add article about generated C++ interfaces #33

Merged
merged 1 commit into from
Jun 17, 2015

Conversation

dirk-thomas
Copy link
Member

No description provided.

@dirk-thomas dirk-thomas added the in progress Actively being worked on (Kanban column) label Jun 16, 2015
@dirk-thomas dirk-thomas self-assigned this Jun 16, 2015
Each setter methods returns the struct itself to enable (method chaining)[https://isocpp.org/wiki/faq/ctors#named-parameter-idiom}.

<div class="alert alert-warning" markdown="1">
<b>TODO:</b> Need non-colliding naming
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a set__ suffix seems like that most readable and non-colliding name to me.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did that already in 4d4b712 but I am not sure I like it.

@dirk-thomas dirk-thomas added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Jun 16, 2015
@dirk-thomas
Copy link
Member Author

I have update the article based on the discussion in the meeting and removed all references to copy / move constructors / assignment operators. Please notice the change of the pointer types.

@ros2/owners Please review.

@esteve
Copy link
Member

esteve commented Jun 16, 2015

+1

1 similar comment
@tfoote
Copy link
Contributor

tfoote commented Jun 17, 2015

+1

* `Ptr` and `ConstPtr`
* `SharedPtr` and `ConstSharedPtr`
* `UniquePtr` and `ConstUniquePtr`
* `WeakPtr` and `ConstWeakPtr`
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also add auto_ptr here? Or should we remove any of the above?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say no; auto_ptr is deprecated in C++11. The others look fine. People might find it weird that Ptr is now a "raw" pointer rather than a shared pointer, as it is in ROS 1. Not sure what else we could do though. Maybe RawPtr and ConstRawPtr, but I don't really like that either.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-1 for RawPtr. The definitions in the document for Ptr types looks fine to me.

@wjwwood
Copy link
Member

wjwwood commented Jun 17, 2015

+1

dirk-thomas added a commit that referenced this pull request Jun 17, 2015
add article about generated C++ interfaces
@dirk-thomas dirk-thomas merged commit ba9fe29 into gh-pages Jun 17, 2015
@dirk-thomas dirk-thomas deleted the generated_cpp_interfaces branch June 17, 2015 16:59
@dirk-thomas dirk-thomas removed the in review Waiting for review (Kanban column) label Jun 17, 2015
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

Successfully merging this pull request may close these issues.

5 participants