| | |
| | | #include <list> |
| | | #include <algorithm> |
| | | #include <stdio.h> |
| | | #include <functional> |
| | | |
| | | #ifdef SI_SUPPORT_IOSTREAMS |
| | | # include <iostream> |
| | |
| | | }; |
| | | |
| | | #define SI_UTF8_SIGNATURE "\xEF\xBB\xBF" |
| | | |
| | | #include <functional> |
| | | #ifdef _WIN32 |
| | | # define SI_NEWLINE_A "\r\n" |
| | | # define SI_NEWLINE_W L"\r\n" |
| | |
| | | bool operator>(const Entry & rhs) const { return LoadOrder()(rhs, *this); } |
| | | #endif |
| | | |
| | | /** Strict less ordering by name of key only */ |
| | | struct KeyOrder : std::binary_function<Entry, Entry, bool> { |
| | | /** Strict less ordering by name of key only */ |
| | | |
| | | struct KeyOrder /*: std::binary_function<Entry, Entry, bool>*/{ |
| | | bool operator()(const Entry & lhs, const Entry & rhs) const { |
| | | const static SI_STRLESS isLess = SI_STRLESS(); |
| | | return isLess(lhs.pItem, rhs.pItem); |
| | |
| | | }; |
| | | |
| | | /** Strict less ordering by order, and then name of key */ |
| | | struct LoadOrder : std::binary_function<Entry, Entry, bool> { |
| | | struct LoadOrder /*: std::binary_function<Entry, Entry, bool>*/ |
| | | { |
| | | |
| | | bool operator()(const Entry & lhs, const Entry & rhs) const { |
| | | if (lhs.nOrder != rhs.nOrder) { |
| | | return lhs.nOrder < rhs.nOrder; |