CString GetAreaName(EventVal& e) { //should just call above function Coords3D c; e.EvalW(c); return (GetAreaName(c)); }
CString GetAreaName(EventVal* e) { //some scope for naming the intercept items if near Coords3D c; e->EvalW(c); return (GetAreaName(c)); }
std::wstring MapNameTextTable::GetAreaName(TBLIDX tblidx) { std::wstring wstrText; GetAreaName(tblidx, &wstrText); return wstrText; }
void CContactDetailInfoUtils::MakeContactDetailInfo(const KeyValueMap_t& profileMap, CContactPersonalDetailInfo& detailInfo) { //递归detailinfo的InfoType map,根据key得到profileMap里的值 //这个profileMap里的值可能是code也可能是直接是值 //如果key是area相关的,则特殊处理 //先到contactInfoCollections里去寻找值 //如果找不到值,则就是值 //如果找到,则设置为值 const CContactPersonalDetailInfo::InfoTypeKeyMap_t& infoTypeKeyMap = detailInfo.GetInfoTypeKeyMap(); do { CContactPersonalDetailInfo::InfoTypeKeyMap_t::const_iterator b = infoTypeKeyMap.begin(); CContactPersonalDetailInfo::InfoTypeKeyMap_t::const_iterator e = infoTypeKeyMap.end(); for (; b != e; ++b) { CContactPersonalDetailInfo::EnInfoType infoType = b->first; const std::string& strKey = b->second; std::string strProfileMapValue = GetKeyValue(profileMap, strKey); if (infoType == CContactPersonalDetailInfo::GENDER_INFO && strProfileMapValue.empty()) { strProfileMapValue = "0"; //性别为保密 } std::string strValue = strProfileMapValue; //strProfileMapValue可能就是值(譬如生日字段),也可能是个code(譬如性别字段),如果是code则需要二次查询对应的值 //去contactinfocollections里去查询 if (strKey != COUNTRY_KEYWORD_ID && strKey != PROVINCE_KEYWORD_ID && strKey != CITY_KEYWORD_ID) { std::string strNameByCode = m_contactInfoCollectionUtils.GetNameByCodeInNormalInfoMap(strKey, strProfileMapValue); if (!strNameByCode.empty()) strValue = strNameByCode; //如果非空,则表示strProfileMapValue真的是个code,而不是个值 } detailInfo.SetInfo(infoType, strValue); } std::string strCountryName, strProvinceName, strCityName; GetAreaName(profileMap, strCountryName, strProvinceName, strCityName); detailInfo.SetAreaInfo(strCountryName, strProvinceName, strCityName); } while (0); }
CString GetAreaName(info_waypoint* w) { //some scope for naming the target item if near char buff[20]; int u; if (w->target != GOT_UNDEFINED_VAL) { return(GetTargName((UniqueID)w->target.Evaluate())); } else { return (GetAreaName(&w->World)); } return buff; }
CString GetAreaName(ItemBase* i) { return (GetAreaName(i->World)); }
CString GetAreaName(Coords3D* c) { return (GetAreaName(*c)); }