I'm using omniORB and C++.
In my application i get few small CORBA sequences form different modules and then I need to combine them to one big sequence for further processing.
Is there easy way do this? Something like seq2.append(seq1)
or seq2.push_back(seq1)
. Or some operators? (I am really newbie in STL-things).
The only way I found is to manually go through every element of small sequences and add it to large sequence.
//idl
struct Device;
typedef sequence<Device> DevicesList;
//c++
icore::DevicesList full_list;
foreach (const DStatusList &stlist, states_) {
icore::DevicesList list = convertList(stlist);
int newlength = full_list.length() + list.length();
int last_index = full_list.length();
full_list.length(newlength);
int j=0;
for(int i=last_index; i< last_index+list.length(); i++,j++) {
full_list[i] = list[j];
}
}
Thank you.