I have in my application on the client side several lists of data, which are compared, merged and so on finally giving the user final list of available values for inserting. All those lists are sequences that supports bidirectional iterators (class list).
What I have in code:
Code:
In header: typedef list<string, allocator<string> > muteList;
In body:
muteList tkn_list;
muteList full_list;
muteList diff_list;
tkn_list = GetTakenList(ActLev);
full_list = FullMutationList(ActLev);
set_difference (full_list.begin(), full_list.end() ,tkn_list.begin(), tkn_list.end(),inserter(diff_list,diff_list.begin()));
tkn_list is one which is getting its values from DB in TclientDataSet. I’m feeding it with data using While EOF loop.
I believe this is not good and I know this is no fast. Could anyone help me by pointing to the more sound way. TclientDataSet has a Data property of OleVariant type. In my case it is filled with a plain list of strings. I wander if there is a way to copy its data to list sequence (or to get its data as a list sequence) in single operator. May be by casting OleVariant to pointer to list or something like that.
Actually I never used class list. It is not my usual level of programming. Additionally question is: how to send data from list to data controls without loop?
All suggestions will be more than appreciated.
Alex