mirror of https://github.com/Icinga/icinga2.git
Renamed DictionaryIterator to Dictionary::Iterator.
This commit is contained in:
parent
b576bb5ecc
commit
6ce38b1ad2
|
@ -22,6 +22,11 @@
|
|||
|
||||
namespace icinga {
|
||||
|
||||
/**
|
||||
* Log severity.
|
||||
*
|
||||
* @ingroup base
|
||||
*/
|
||||
enum LogSeverity
|
||||
{
|
||||
LogDebug,
|
||||
|
|
|
@ -75,7 +75,6 @@ bool ConfigObject::IsLocal(void) const
|
|||
return value;
|
||||
}
|
||||
|
||||
|
||||
void ConfigObject::SetTemporary(bool value)
|
||||
{
|
||||
GetProperties()->SetProperty("__temporary", value ? 1 : 0);
|
||||
|
|
|
@ -23,6 +23,11 @@
|
|||
namespace icinga
|
||||
{
|
||||
|
||||
/**
|
||||
* A configuration object.
|
||||
*
|
||||
* @ingroup base
|
||||
*/
|
||||
class I2_BASE_API ConfigObject : public Object
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -26,7 +26,7 @@ using namespace icinga;
|
|||
*
|
||||
* @returns An iterator.
|
||||
*/
|
||||
DictionaryIterator Dictionary::Begin(void)
|
||||
Dictionary::Iterator Dictionary::Begin(void)
|
||||
{
|
||||
return m_Data.begin();
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ DictionaryIterator Dictionary::Begin(void)
|
|||
*
|
||||
* @returns An iterator.
|
||||
*/
|
||||
DictionaryIterator Dictionary::End(void)
|
||||
Dictionary::Iterator Dictionary::End(void)
|
||||
{
|
||||
return m_Data.end();
|
||||
}
|
||||
|
|
|
@ -23,9 +23,6 @@
|
|||
namespace icinga
|
||||
{
|
||||
|
||||
typedef map<string, Variant>::const_iterator ConstDictionaryIterator;
|
||||
typedef map<string, Variant>::iterator DictionaryIterator;
|
||||
|
||||
/**
|
||||
* A container that holds key-value pairs.
|
||||
*
|
||||
|
@ -37,6 +34,9 @@ public:
|
|||
typedef shared_ptr<Dictionary> Ptr;
|
||||
typedef weak_ptr<Dictionary> WeakPtr;
|
||||
|
||||
typedef map<string, Variant>::const_iterator ConstIterator;
|
||||
typedef map<string, Variant>::iterator Iterator;
|
||||
|
||||
/**
|
||||
* Retrieves a value from the dictionary.
|
||||
*
|
||||
|
@ -47,7 +47,7 @@ public:
|
|||
template<typename T>
|
||||
bool GetProperty(const string& key, T *value) const
|
||||
{
|
||||
ConstDictionaryIterator i = m_Data.find(key);
|
||||
ConstIterator i = m_Data.find(key);
|
||||
|
||||
if (i == m_Data.end())
|
||||
return false;
|
||||
|
@ -101,7 +101,7 @@ public:
|
|||
template<typename T>
|
||||
void AddUnnamedProperty(const T& value)
|
||||
{
|
||||
DictionaryIterator it;
|
||||
Iterator it;
|
||||
string key;
|
||||
long index = GetLength();
|
||||
do {
|
||||
|
@ -118,8 +118,8 @@ public:
|
|||
|
||||
bool Contains(const string& key) const;
|
||||
|
||||
DictionaryIterator Begin(void);
|
||||
DictionaryIterator End(void);
|
||||
Iterator Begin(void);
|
||||
Iterator End(void);
|
||||
|
||||
long GetLength(void) const;
|
||||
|
||||
|
|
|
@ -217,7 +217,7 @@ void CompatComponent::StatusTimerHandler(void)
|
|||
Host host = it->second;
|
||||
|
||||
Dictionary::Ptr dict;
|
||||
DictionaryIterator dt;
|
||||
Dictionary::Iterator dt;
|
||||
|
||||
dict = host.GetGroups();
|
||||
|
||||
|
@ -258,7 +258,7 @@ void CompatComponent::StatusTimerHandler(void)
|
|||
Service service = it->second;
|
||||
|
||||
Dictionary::Ptr dict;
|
||||
DictionaryIterator dt;
|
||||
Dictionary::Iterator dt;
|
||||
|
||||
dict = service.GetGroups();
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ json_t *MessagePart::GetJsonFromDictionary(const Dictionary::Ptr& dictionary)
|
|||
|
||||
json = cJSON_CreateObject();
|
||||
|
||||
for (DictionaryIterator i = dictionary->Begin(); i != dictionary->End(); i++) {
|
||||
for (Dictionary::Iterator i = dictionary->Begin(); i != dictionary->End(); i++) {
|
||||
switch (i->second.GetType()) {
|
||||
case VariantInteger:
|
||||
cJSON_AddNumberToObject(json, i->first.c_str(), i->second.GetInteger());
|
||||
|
@ -217,7 +217,7 @@ void MessagePart::AddUnnamedProperty(const MessagePart& value)
|
|||
*
|
||||
* @returns An iterator.
|
||||
*/
|
||||
DictionaryIterator MessagePart::Begin(void)
|
||||
Dictionary::Iterator MessagePart::Begin(void)
|
||||
{
|
||||
return GetDictionary()->Begin();
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ DictionaryIterator MessagePart::Begin(void)
|
|||
*
|
||||
* @returns An iterator.
|
||||
*/
|
||||
DictionaryIterator MessagePart::End(void)
|
||||
Dictionary::Iterator MessagePart::End(void)
|
||||
{
|
||||
return GetDictionary()->End();
|
||||
}
|
||||
|
|
|
@ -87,8 +87,8 @@ public:
|
|||
|
||||
bool Contains(const string& key) const;
|
||||
|
||||
DictionaryIterator Begin(void);
|
||||
DictionaryIterator End(void);
|
||||
Dictionary::Iterator Begin(void);
|
||||
Dictionary::Iterator End(void);
|
||||
|
||||
private:
|
||||
Dictionary::Ptr m_Dictionary;
|
||||
|
|
Loading…
Reference in New Issue