| 2075 | |
| 2076 | template <class SI_CHAR, class SI_STRLESS, class SI_CONVERTER> |
| 2077 | bool 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 | |
| 2103 | template <class SI_CHAR, class SI_STRLESS, class SI_CONVERTER> |
| 2104 | SI_Error CSimpleIniTempl<SI_CHAR, SI_STRLESS, SI_CONVERTER>::SaveFile(const char* a_pszFile, |