MCPcopy Create free account
hub / github.com/apple/foundationdb / GetAllKeys

Method GetAllKeys

fdbclient/include/fdbclient/SimpleIni.h:2077–2101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2075
2076template <class SI_CHAR, class SI_STRLESS, class SI_CONVERTER>
2077bool CSimpleIniTempl<SI_CHAR, SI_STRLESS, SI_CONVERTER>::GetAllKeys(const SI_CHAR* a_pSection,
2078 TNamesDepend& a_names) const {
2079 a_names.clear();
2080
2081 if (!a_pSection) {
2082 return false;
2083 }
2084
2085 typename TSection::const_iterator iSection = m_data.find(a_pSection);
2086 if (iSection == m_data.end()) {
2087 return false;
2088 }
2089
2090 const TKeyVal& section = iSection->second;
2091 const SI_CHAR* pLastKey = NULL;
2092 typename TKeyVal::const_iterator iKeyVal = section.begin();
2093 for (int n = 0; iKeyVal != section.end(); ++iKeyVal, ++n) {
2094 if (!pLastKey || IsLess(pLastKey, iKeyVal->first.pItem)) {
2095 a_names.push_back(iKeyVal->first);
2096 pLastKey = iKeyVal->first.pItem;
2097 }
2098 }
2099
2100 return true;
2101}
2102
2103template <class SI_CHAR, class SI_STRLESS, class SI_CONVERTER>
2104SI_Error CSimpleIniTempl<SI_CHAR, SI_STRLESS, SI_CONVERTER>::SaveFile(const char* a_pszFile,

Callers 2

CommandMethod · 0.80
makeCommandMethod · 0.80

Calls 5

clearMethod · 0.65
findMethod · 0.45
endMethod · 0.45
beginMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected