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

Method SetValueHelp

cpp/src/Localization.cpp:589–614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

587}
588
589bool Localization::SetValueHelp
590(
591 uint8 ccID,
592 uint16 indexId,
593 uint32 pos,
594 string help,
595 string lang
596)
597{
598 uint64 key = GetValueKey(ccID, indexId, pos);
599 if (m_valueLocalizationMap.find(key) == m_valueLocalizationMap.end()) {
600 m_valueLocalizationMap[key] = new ValueLocalizationEntry(ccID, indexId, pos);
601 } else if (m_valueLocalizationMap[key]->HasHelp(lang)) {
602 Log::Write( LogLevel_Warning, "Localization::SetValueHelp: Duplicate Entry for CommandClass %d, ValueID: %d (%d): %s (Lang: %s)", ccID, indexId, pos, help.c_str(), lang.c_str() );
603 }
604
605 if( lang.empty() )
606 {
607 m_valueLocalizationMap[key]->AddHelp(help);
608 }
609 else
610 {
611 m_valueLocalizationMap[key]->AddHelp(help, lang);
612 }
613 return true;
614}
615bool Localization::SetValueLabel
616(
617 uint8 ccID,

Callers

nothing calls this directly

Calls 7

WriteFunction · 0.85
findMethod · 0.80
HasHelpMethod · 0.80
AddHelpMethod · 0.80
endMethod · 0.45
c_strMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected