geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEODE-3420) Remove all .inl files
Date Mon, 13 Nov 2017 20:52:00 GMT

    [ https://issues.apache.org/jira/browse/GEODE-3420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16250221#comment-16250221
] 

ASF GitHub Bot commented on GEODE-3420:
---------------------------------------

dgkimura closed pull request #143: GEODE-3420: Remove inline header files
URL: https://github.com/apache/geode-native/pull/143
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/cppcache/include/geode/Cacheable.hpp b/cppcache/include/geode/Cacheable.hpp
index 8833b29c..02c77988 100644
--- a/cppcache/include/geode/Cacheable.hpp
+++ b/cppcache/include/geode/Cacheable.hpp
@@ -35,10 +35,10 @@ typedef SerializablePtr CacheablePtr;
 typedef Serializable Cacheable;
 
 template <typename TVALUE>
-inline CacheablePtr createValue(const std::shared_ptr<TVALUE>& value);
+inline CacheablePtr createValue(const std::shared_ptr<TVALUE>& value) {
+  return std::dynamic_pointer_cast<Cacheable>(value);
+}
 
-template <typename TVALUE>
-inline CacheablePtr createValue(const TVALUE* value);
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/include/geode/Cacheable.inl b/cppcache/include/geode/Cacheable.inl
deleted file mode 100644
index 68108ac6..00000000
--- a/cppcache/include/geode/Cacheable.inl
+++ /dev/null
@@ -1,55 +0,0 @@
-#pragma once
-
-#ifndef GEODE_CACHEABLE_INL_
-#define GEODE_CACHEABLE_INL_
-
-/*
- * 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.
- */
-
-/** 
- * @file
- */
-
-#include "Cacheable.hpp"
-
-namespace apache {
-namespace geode {
-namespace client {
-
-template< class PRIM >
-inline CacheablePtr Cacheable::create( const PRIM value )
-{
-  return createValue( value );
-}
-
-template <typename TVALUE>
-inline CacheablePtr createValue( const std::shared_ptr< TVALUE >& value )
-{
-  return std::dynamic_pointer_cast<Cacheable>(value);
-}
-
-template <typename TVALUE>
-inline CacheablePtr createValue( const TVALUE* value )
-{
-  return createValueArr( value );
-}
-
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif // GEODE_CACHEABLE_INL_
diff --git a/cppcache/include/geode/CacheableBuiltins.hpp b/cppcache/include/geode/CacheableBuiltins.hpp
index f1ed38d7..f7a6a053 100644
--- a/cppcache/include/geode/CacheableBuiltins.hpp
+++ b/cppcache/include/geode/CacheableBuiltins.hpp
@@ -642,6 +642,16 @@ _GF_CACHEABLE_CONTAINER_TYPE_DEF_(HashSetOfCacheableKey,
  */
 _GF_CACHEABLE_CONTAINER_TYPE_(HashSetOfCacheableKey, CacheableLinkedHashSet);
 
+template <>
+inline CacheableKeyPtr CacheableKey::create(int32_t value) {
+  return CacheableInt32::create(value);
+}
+
+template <>
+inline SerializablePtr Serializable::create(int32_t value) {
+  return CacheableInt32::create(value);
+}
+
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/include/geode/CacheableKey.hpp b/cppcache/include/geode/CacheableKey.hpp
index 5369b551..a081c451 100644
--- a/cppcache/include/geode/CacheableKey.hpp
+++ b/cppcache/include/geode/CacheableKey.hpp
@@ -111,11 +111,6 @@ class CPPCACHE_EXPORT CacheableKey : public Cacheable {
   void operator=(const CacheableKey& other);
 };
 
-template <class TKEY>
-inline CacheableKeyPtr createKey(const std::shared_ptr<TKEY>& value);
-
-template <typename TKEY>
-inline CacheableKeyPtr createKey(const TKEY* value);
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/include/geode/CacheableKey.inl b/cppcache/include/geode/CacheableKey.inl
deleted file mode 100644
index 236d528b..00000000
--- a/cppcache/include/geode/CacheableKey.inl
+++ /dev/null
@@ -1,55 +0,0 @@
-#pragma once
-
-#ifndef GEODE_CACHEABLEKEY_INL_
-#define GEODE_CACHEABLEKEY_INL_
-
-/*
- * 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.
- */
-
-#include "CacheableKey.hpp"
-
-/**
- * @file
- */
-
-namespace apache {
-namespace geode {
-namespace client {
-
-template< class PRIM >
-inline CacheableKeyPtr CacheableKey::create( const PRIM value )
-{
-  return createKey( value );
-}
-
-template <class TKEY>
-inline CacheableKeyPtr createKey( const std::shared_ptr< TKEY >& value )
-{
-  return CacheableKeyPtr( value );
-}
-
-template <typename TKEY>
-inline CacheableKeyPtr createKey( const TKEY* value )
-{
-  return createKeyArr( value );
-}
-
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif // GEODE_CACHEABLEKEY_INL_
diff --git a/cppcache/include/geode/CacheableString.hpp b/cppcache/include/geode/CacheableString.hpp
index 7a33e4b2..8ebf0238 100644
--- a/cppcache/include/geode/CacheableString.hpp
+++ b/cppcache/include/geode/CacheableString.hpp
@@ -308,6 +308,31 @@ inline CacheablePtr createValueArr(const wchar_t* value) {
   return CacheableString::create(value);
 }
 
+template <typename TVALUE>
+inline CacheablePtr createValue(const TVALUE* value) {
+  return CacheableString::create(value);
+}
+
+template <class TKEY>
+inline CacheableKeyPtr createKey(const std::shared_ptr<TKEY>& value) {
+  return CacheableKeyPtr(value);
+}
+
+template <typename TKEY>
+inline CacheableKeyPtr createKey(const TKEY* value) {
+  return createKeyArr(value);
+}
+
+template <class PRIM>
+inline CacheableKeyPtr CacheableKey::create(const PRIM value) {
+  return createKey(value);
+}
+
+template <class PRIM>
+inline SerializablePtr Serializable::create(const PRIM value) {
+  return createKey(value);
+}
+
 }  // namespace client
 }  // namespace geode
 }  // namespace apache
diff --git a/cppcache/include/geode/GeodeCppCache.hpp b/cppcache/include/geode/GeodeCppCache.hpp
index 606c5ac4..59fe70df 100644
--- a/cppcache/include/geode/GeodeCppCache.hpp
+++ b/cppcache/include/geode/GeodeCppCache.hpp
@@ -81,6 +81,4 @@
 #include "CqStatusListener.hpp"
 #include "PdxFieldTypes.hpp"
 
-#include "GeodeCppCache.inl"
-
 #endif  // GEODE_GEODECPPCACHE_H_
diff --git a/cppcache/include/geode/GeodeCppCache.inl b/cppcache/include/geode/GeodeCppCache.inl
deleted file mode 100755
index f9f9f814..00000000
--- a/cppcache/include/geode/GeodeCppCache.inl
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef __APACHE_GEODECPPCACHE_INL_
-#define __APACHE_GEODECPPCACHE_INL_
-/*
- * 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.
- */
-
-/**
- * @file
- */
-
-#include "Cacheable.inl"
-#include "CacheableKey.inl"
-
-#endif // define __APACHE_GEODECPPCACHE_INL_


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Remove all .inl files
> ---------------------
>
>                 Key: GEODE-3420
>                 URL: https://issues.apache.org/jira/browse/GEODE-3420
>             Project: Geode
>          Issue Type: Improvement
>          Components: native client
>            Reporter: Addison
>
> Remove all .inc files in favor of a more readable format to describe includes and templates.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message