From 199d741ca8c1d8c1edea48f1b71acc8dba58a559 Mon Sep 17 00:00:00 2001
From: Florent Lamiraux <florent@laas.fr>
Date: Fri, 23 Mar 2012 08:59:12 +0100
Subject: [PATCH] Provide const access to entity map in the pool.

---
 include/dynamic-graph/pool.h | 3 +++
 src/dgraph/pool.cpp          | 6 ++++++
 2 files changed, 9 insertions(+)

diff --git a/include/dynamic-graph/pool.h b/include/dynamic-graph/pool.h
index 6a9f11c..be10f18 100644
--- a/include/dynamic-graph/pool.h
+++ b/include/dynamic-graph/pool.h
@@ -87,6 +87,9 @@ namespace dynamicgraph
     */
     Entity& getEntity (const std::string& name);
 
+    /// Const access to entity map
+    const Entities& getEntityMap () const;
+
     /*! \brief Test if the entity exists. */
     bool existEntity (const std::string& name);
     /*! \brief Test if the entity exists. If it does, return a pointer on it. */
diff --git a/src/dgraph/pool.cpp b/src/dgraph/pool.cpp
index c2224d3..c407f70 100644
--- a/src/dgraph/pool.cpp
+++ b/src/dgraph/pool.cpp
@@ -131,6 +131,12 @@ getEntity( const std::string& name )
   else return *entPtr->second;
 }
 
+const PoolStorage::Entities& PoolStorage::
+getEntityMap () const
+{
+  return entityMap;
+}
+
 bool PoolStorage::
 existEntity (const std::string& name)
 {
-- 
GitLab