You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by bb...@apache.org on 2018/12/19 18:04:17 UTC
[geode-native] branch develop updated: GEODE-4841: Changed typedef
to using statement. (#419)
This is an automated email from the ASF dual-hosted git repository.
bbender pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-native.git
The following commit(s) were added to refs/heads/develop by this push:
new fe67eb7 GEODE-4841: Changed typedef to using statement. (#419)
fe67eb7 is described below
commit fe67eb77f49dcb2aed67400f21b7e2a818d08cc1
Author: Matthew Reddington <mr...@pivotal.io>
AuthorDate: Wed Dec 19 10:04:13 2018 -0800
GEODE-4841: Changed typedef to using statement. (#419)
- Moved the definition into its own header to remove
declaration duplication.
- Removed errant header included in CMake file.
---
cppcache/include/geode/HashMapOfPools.hpp | 32 +++++++++++++++++++++++++++++++
cppcache/include/geode/PoolManager.hpp | 3 +--
cppcache/src/PoolManagerImpl.hpp | 2 +-
3 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/cppcache/include/geode/HashMapOfPools.hpp b/cppcache/include/geode/HashMapOfPools.hpp
new file mode 100644
index 0000000..5a2354f
--- /dev/null
+++ b/cppcache/include/geode/HashMapOfPools.hpp
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <unordered_map>
+#include <string>
+#include <memory>
+
+namespace apache {
+ namespace geode {
+ namespace client {
+ class Pool;
+
+ using HashMapOfPools = std::unordered_map <std::string, std::shared_ptr<Pool>>;
+ }
+ }
+}
diff --git a/cppcache/include/geode/PoolManager.hpp b/cppcache/include/geode/PoolManager.hpp
index fe57e04..1fb58d1 100644
--- a/cppcache/include/geode/PoolManager.hpp
+++ b/cppcache/include/geode/PoolManager.hpp
@@ -26,6 +26,7 @@
#include <unordered_map>
#include "Cache.hpp"
+#include "geode/HashMapOfPools.hpp"
#include "Pool.hpp"
#include "PoolFactory.hpp"
#include "Region.hpp"
@@ -46,8 +47,6 @@ class PoolFactory;
class Region;
class RegionFactory;
-typedef std::unordered_map<std::string, std::shared_ptr<Pool>> HashMapOfPools;
-
/**
* Manages creation and access to {@link Pool connection pools} for clients.
* <p>
diff --git a/cppcache/src/PoolManagerImpl.hpp b/cppcache/src/PoolManagerImpl.hpp
index c9f5289..a35eae0 100644
--- a/cppcache/src/PoolManagerImpl.hpp
+++ b/cppcache/src/PoolManagerImpl.hpp
@@ -25,6 +25,7 @@
#include <string>
#include <unordered_map>
+#include <geode/HashMapOfPools.hpp>
#include <geode/Region.hpp>
#include "CacheImpl.hpp"
@@ -35,7 +36,6 @@ namespace client {
class Pool;
class PoolFactory;
-typedef std::unordered_map<std::string, std::shared_ptr<Pool>> HashMapOfPools;
class PoolManagerImpl {
public: