I have two questions one is kind of a newbie question and the other one is a little more advanced. I have been coding C++ off and on for the past couple of years as a hobby and a little for my EE classes. I usually in my class reference all my class members with the keyword "this->" when using them internally in my methods. I always wondered if this was a good practice or not OR os does it only apply to certain situation.
For my advanced question, I have some hardware that I would like it to send me information instead of my polling it. Right now I have it structured to be polled for data using a thread. This data is placed in a circular buffer awaiting further processing by the main thread. I was thinking that I could derive my Hardware class as a Event Source from the gtkmm gui library. When the hardware object thread detects that the hardware has just sent a packet of data over the serial RS-232 connection it will trigger the onEvent callback and then place the data into the circular queue. Should I adjust my hardware interface code to be an event based model or should I leave as the thread deticated polling main loop. I currently use libSerial for my comms.