MCPcopy Create free account
hub / github.com/OpenZWave/open-zwave / SetValueItemLabel

Method SetValueItemLabel

cpp/src/Localization.cpp:689–707  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

687}
688
689bool Localization::SetValueItemLabel
690(
691 uint8 ccID,
692 uint16 indexId,
693 int32 pos,
694 int32 itemIndex,
695 string label,
696 string lang
697)
698{
699 uint64 key = GetValueKey(ccID, indexId, pos);
700 if (m_valueLocalizationMap.find(key) == m_valueLocalizationMap.end()) {
701 m_valueLocalizationMap[key] = new ValueLocalizationEntry(ccID, indexId, pos);
702 } else if (m_valueLocalizationMap[key]->HasItemLabel(itemIndex, lang)) {
703 Log::Write( LogLevel_Warning, "Localization::SetValueItemLabel: Duplicate Item Entry for CommandClass %d, ValueID: %d (%d) itemIndex %d: %s (Lang: %s)", ccID, indexId, pos, itemIndex, label.c_str(), lang.c_str() );
704 }
705 m_valueLocalizationMap[key]->AddItemLabel(label, itemIndex, lang);
706 return true;
707}
708
709string const Localization::GetValueItemHelp
710(

Callers 4

ReadXMLMethod · 0.80
SetBitLabelMethod · 0.80
ValueListMethod · 0.80
ReadXMLMethod · 0.80

Calls 6

WriteFunction · 0.85
findMethod · 0.80
HasItemLabelMethod · 0.80
AddItemLabelMethod · 0.80
endMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected