MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / tagByName

Method tagByName

src/database/WizIndex.cpp:82–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82bool WizIndex::tagByName(const CString& strName, CWizTagDataArray& arrayTag, const CString& strExceptGUID /*= ""*/)
83{
84 CWizTagDataArray arrayAllTag;
85 if (!getAllTags(arrayAllTag)) {
86 TOLOG("Failed to get tags!");
87 return false;
88 }
89
90 CString strFindName = tagDisplayNameToName(strName);
91
92 CWizTagDataArray::const_iterator it;
93 for (it = arrayAllTag.begin(); it != arrayAllTag.end(); it++) {
94 if (0 == it->strName.compareNoCase(strFindName)) {
95 if (0 == strExceptGUID.compareNoCase(it->strGUID))
96 continue;
97
98 arrayTag.push_back(*it);
99 }
100 }
101
102 return !arrayTag.empty();
103}
104
105bool WizIndex::tagByNameEx(const CString& strName, WIZTAGDATA& data)
106{

Calls 5

TOLOGFunction · 0.85
beginMethod · 0.80
endMethod · 0.80
compareNoCaseMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected