xatavian / cpp-can-parser

C++ library for parsing CAN databases (currently only with the DBC format)
GNU Lesser General Public License v3.0
85 stars 21 forks source link

Make the API coherant again #2

Closed xatavian closed 4 years ago

xatavian commented 4 years ago

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:.

More work on the API could be done, but i'll stop here for now.