Browse Source

[3793] Missing method added in MapElement

Tomek Mrugalski 10 years ago
parent
commit
e2f7dfcb35
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/lib/cc/data.h

+ 8 - 0
src/lib/cc/data.h

@@ -675,6 +675,14 @@ public:
     // a MapElement)
     bool find(const std::string& id, ConstElementPtr& t) const;
 
+    /// @brief Returns number of stored elements
+    ///
+    /// @note: this is costly operation for a map!
+    /// @return number of elements.
+    size_t size() const {
+        return (m.size());
+    }
+
     bool equals(const Element& other) const;
 };