I have gone through some tutorials on CList, which seems to be much more feature rich than std::list
of C++ STL. Especially what caught my attention was that I could search a CList by a value and it would return a position (assuming all values are unique, which is always true in my case). I am trying to use a list of boost smart pointers. Querying a list with the value of the pointer or quickly changing the position value to jump to an element would be really handy to me. Is there any specialized list library that allows me to do that?
Thanks in advance!
I wouldn't necessary call MFC more feature rich over STL but it certainly favors the design of member methods and inheritance over free functions and template interfaces.
You can search elements using the functions in algorithm such as
std::find
,std::find_if
, etc which work generically on STL containers likevector
as well.For your specific case you might want to do something like this:
Now as far as getting MFC like behavior on Linux I would recommend Qt. It's a massive cross-platform framework which has lots of useful stuff. Better yet it's open source and free and comes with it's own IDE called QtCreator which isn't half bad either.