Hello, everyone. Currently I encounter some question on using reuter dictionary. My sample code as follows:
thomsonreuters::ema::rdm::DataDictionary fid_dict_;
map<Int16, const emardm::DictionaryEntry*> map_fid_dict_;
fid_dict_.loadFieldDictionary(dict_file.c_str());
fid_dict_.loadEnumTypeDictionary(enum_file.c_str());
const emaaccess::EmaVector<emardm::DictionaryEntry>& vec_entry = fid_dict_.getEntries();
for(unsigned i = 0; i < vec_entry.size(); i++)
{
const emardm::DictionaryEntry* ptr = &(vec_entry[i]);
map_fid_dict_[ vec_entry[i].getFid() ] = ptr;
LOG_DEBUG("acronym:%s, ddeAcronym:%s, fid:%d, rippleToField:%d, fieldType:%d, length:%d, "
"enumLength:%d, rwfType:%d, rwfLength:%d",
ptr->getAcronym().c_str(), ptr->getDDEAcronym().c_str(), ptr->getFid(),
ptr->getRippleToField(), ptr->getFieldType(), ptr->getLength(),
ptr->getRwfType(), ptr->getRwfLength());
}
The sample code load field dictionary and enum type dictionary from RDMFieldDictionary and enumtype.def which are shipped with EMA SDK. But when using LOG_DEBUG print certain field value, it seems the RwfType and RwfLength is unitialized at this moment, for example I got following output for BIDSIZE field:
Debug: acronym:BIDSIZE, ddeAcronym:BID SIZE, fid:30, rippleToField:0, fieldType:1, length:15, enumLength:8, rwfType:7, rwfLength:30603272
But later when I use map_fid_dict to fetching DictonaryEntry info for adding data into FieldList, I print the entry for BIDSIZE again like this:
Debug: BIDSIZE with type:1, fid:30, rwfType:8, length:7
The latter is right according to RDMFieldDictionary file. But why the previous printed rwf type & length is incorrect at that moment? My code has no further modification to map_fid_dict after load dictionary file. Many thanks.