API-suggestions¶
incomplete documentation: Buffer>get(), Buffer->tryGet() - where is the difference-
- improve naming for factory-methods, e.g. JointAngles::fromRad can be renamed in JointAnlges::createFromRad
- some questions concerning the get() and publish() logic of CCA::Ports:
- get():
- Why do I get a pointer to the buffer's content? Wouldnt it be more correct to - at least - get a pointer to a const object? Because otherwise I am allowed to manipulate the buffer's content.
- Upstream discussion about constness in RSB
- Even if i get a pointer to a const object, there is still the problem, that buffer's content can change while I am using it and I will not be informed about that change
- publish()"
- same for the const correctness: why dont I publish a pointer to a const object
- As a user, I would prefer to not work with pointers
- problems amongst the mentioned ones:
- it forces me to work with shared_pointers even if it's not necessary at all
- it can produce overhead
- print-methods for DTOs: plz do not append a newline() command at the end of printing a DTO (see e.g. JointAngles.print()). this is confusing, because the 'user' himself wants determine a when a new line starts, or he wants to print two of them in one line what is not possible with your current printing style
Loading...