mirror of https://github.com/Icinga/icinga2.git
parent
aaac957ad5
commit
b4fa556ac6
|
@ -24,6 +24,7 @@
|
|||
#include <boost/range/iterator.hpp>
|
||||
#include <ostream>
|
||||
#include <istream>
|
||||
#include <utility>
|
||||
|
||||
namespace icinga {
|
||||
|
||||
|
@ -155,6 +156,20 @@ struct string_iless : std::binary_function<String, String, bool>
|
|||
}
|
||||
};
|
||||
|
||||
struct pair_string_iless : std::binary_function<std::pair<String, String>, std::pair<String, String>, bool>
|
||||
{
|
||||
bool operator()(const std::pair<String, String>& p1, const std::pair<String, String>& p2) const
|
||||
{
|
||||
if (string_iless()(p1.first, p2.first))
|
||||
return true;
|
||||
|
||||
if (string_iless()(p2.first, p1.first))
|
||||
return false;
|
||||
|
||||
return string_iless()(p1.second, p2.second);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace boost
|
||||
|
|
|
@ -82,9 +82,9 @@ private:
|
|||
int m_Flags;
|
||||
|
||||
std::vector<ConfigItem::Ptr> m_Items;
|
||||
std::map<std::pair<String, String>, ConfigItem::Ptr> m_ItemsMap;
|
||||
std::map<std::pair<String, String>, ConfigItem::Ptr, pair_string_iless> m_ItemsMap;
|
||||
|
||||
std::map<String, shared_ptr<ConfigType> > m_Types;
|
||||
std::map<String, shared_ptr<ConfigType>, string_iless> m_Types;
|
||||
|
||||
std::vector<ConfigCompilerError> m_Errors;
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ private:
|
|||
|
||||
static boost::mutex m_Mutex;
|
||||
|
||||
typedef std::map<std::pair<String, String>, ConfigItem::Ptr> ItemMap;
|
||||
typedef std::map<std::pair<String, String>, ConfigItem::Ptr, pair_string_iless> ItemMap;
|
||||
static ItemMap m_Items; /**< All registered configuration items. */
|
||||
|
||||
static ConfigItem::Ptr GetObjectUnlocked(const String& type,
|
||||
|
|
Loading…
Reference in New Issue