]> granicus.if.org Git - icinga2/commitdiff
Renamed DictionaryIterator to Dictionary::Iterator.
authorGunnar Beutner <gunnar@beutner.name>
Sat, 30 Jun 2012 13:22:51 +0000 (15:22 +0200)
committerGunnar Beutner <gunnar@beutner.name>
Sun, 1 Jul 2012 10:59:05 +0000 (12:59 +0200)
base/application.h
base/configobject.cpp
base/configobject.h
base/dictionary.cpp
base/dictionary.h
components/compat/compatcomponent.cpp
jsonrpc/messagepart.cpp
jsonrpc/messagepart.h

index 520cd35732cf3686b936730970e97e155cf06437..4371542daafa2b33fc297012d122717c0d15743f 100644 (file)
 
 namespace icinga {
 
+/**
+ * Log severity.
+ *
+ * @ingroup base
+ */
 enum LogSeverity
 {
        LogDebug,
index 79388201977fe2871c0d6bc7f612e50d7e67c25c..d4dcfe79c0875d9f234f10e41b04c2319eb61581 100644 (file)
@@ -75,7 +75,6 @@ bool ConfigObject::IsLocal(void) const
        return value;
 }
 
-
 void ConfigObject::SetTemporary(bool value)
 {
        GetProperties()->SetProperty("__temporary", value ? 1 : 0);
index cbd2fc4cddae0375fe428048e7f461dfa6f62e1c..d11e6e4e8ee0910e385ed94556ddb7e1d64e0dd5 100644 (file)
 namespace icinga
 {
 
+/**
+ * A configuration object.
+ *
+ * @ingroup base
+ */
 class I2_BASE_API ConfigObject : public Object
 {
 public:
index c61fa72b9de4554f18a893115ddea8dbfd06b05b..e7a6b25fe908314d8fc39259e18c1201c284211c 100644 (file)
@@ -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();
 }
index 3515b2f4e2681c68ba4ad14599d101f1f8bdbdf5..05687bffb8cf92a83fa68893e37474b12dadc8f8 100644 (file)
@@ -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;
 
index 414026b9f8dc36a7f5422eee2925040410e1902d..16ab3860798095a7a8be5bee35cd5c8749e95150 100644 (file)
@@ -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();
 
index 0f1cf1f11c0d8cf061c54e3209722fa59fc95c09..d2cb6881ef133562cd37cbd8395c1eaf5e17ef6f 100644 (file)
@@ -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();
 }
index 82d76d330a26dc4f627c7e24ced2c039f1c68190..80554cabfb87d1fa1432948a6edce525ced84bc1 100644 (file)
@@ -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;