Skip to content

Commit

Permalink
update based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-thomas committed Jun 16, 2015
1 parent 2bf6fdc commit 4d4b712
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions articles/112_generated_interfaces_cpp.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ For ease of use there is a `typedef` with the same name as the message which use

#### Members

The struct has same-named member variables for every field of the message.
The struct has same-named public member variables for every field of the message.
For each field a `typedef` is created which is named after the member with a leading underscore and a trailing `_type`.


Expand All @@ -65,21 +65,16 @@ All other constants are declared as `static const` members in the struct and the

#### Getters

<div class="alert alert-warning" markdown="1">
<b>TODO:</b> const and non-const getters
</div>
For each field two *getter* methods are generated: a const version and a non-const version.
They are named after the fields with a leading `get__`.


#### Setters

Beside the direct access to the member variables for each member a *setter* method is generated.
They are named after the members with a leading `set_`.
For each field a *setter* method is generated.
They are named after the fields with a leading `set__`.
The setter methods have a single argument to pass the value for the member variable.
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
</div>
Each setter method returns the struct itself to enable (method chaining)[https://isocpp.org/wiki/faq/ctors#named-parameter-idiom].


#### Constructors
Expand Down

0 comments on commit 4d4b712

Please sign in to comment.