I'm creating a C++ gui client with FLTK and I need a little help with lists. I have a container that is supposed to host multiple widgets. The idea is to have a widget/container that hosts different gauge widgets. I have made two widgets a dialgauge and a bargauge. There inherit an abstract class that has common stuff. They also inherit the FLTK widget class.
So, because the user can choose which type of gauges they want I need a list that can store these. I'm a Java developer so in that world I would make an interface that the gauges implement and use that as a type in the list:
I know C++ does not have interfaces, but is there a way to accomplish this kind of behaviour? I could make a list for every gauge type, but seems a bit silly...
Does boost library have something I could use for this?
any help appreciated! You probably get lots of annoyances from us Java people ;). Thanks!