As an exercise, I tried to use std::shared_ptr everywhere to see how it would work out. It was actually relevant in the CANDatabase instances because I wanted to give two indexes for the CANFrame (the frame name and frame's CAN ID).
Well, I felt like it wasn't working after all (iterating through the frames and the signals): the user was having more work to do while gaining no benefit. So I removed the std::shared_ptr :wink:.
Keys for the frames: name and CAN ID
Keys for the signals: name
More work on the API could be done, but i'll stop here for now.
As an exercise, I tried to use
std::shared_ptr
everywhere to see how it would work out. It was actually relevant in theCANDatabase
instances because I wanted to give two indexes for theCANFrame
(the frame name and frame's CAN ID).Well, I felt like it wasn't working after all (iterating through the frames and the signals): the user was having more work to do while gaining no benefit. So I removed the
std::shared_ptr
:wink:.More work on the API could be done, but i'll stop here for now.