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

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

mmartell commented on a change in pull request #862:
URL: https://github.com/apache/geode-native/pull/862#discussion_r701168532



##########
File path: clicache/src/CacheableHashSet.hpp
##########
@@ -598,69 +604,11 @@ namespace Apache
         };
       }
 
-#define _GFCLI_CACHEABLEHASHSET_DEF_GENERIC(m, HSTYPE)                         
      \
-       public ref class m : public 
Internal::CacheableHashSetType<static_cast<int8_t>(native::internal::DSCode::m),
 HSTYPE>      \
-            {                                                                  
     \
-      public:                                                                 \
-        /** <summary>
-      *  Allocates a new empty instance.
-      *  </summary>
-      */                                                                   \
-      inline m()                                                            \
-      : 
Internal::CacheableHashSetType<static_cast<int8_t>(native::internal::DSCode::m),
 HSTYPE>() {}                      \
-      \
-      /** <summary>
-       *  Allocates a new instance with the given size.
-       *  </summary>
-       *  <param name="size">the initial size of the new instance</param>
-       */                                                                   \
-       inline m(System::Int32 size)                                            
     \
-       : 
Internal::CacheableHashSetType<static_cast<int8_t>(native::internal::DSCode::m),
 HSTYPE>(size) {}                  \
-       \
-       /** <summary>
-        *  Static function to create a new empty instance.
-        *  </summary>
-        */                                                                   \
-        inline static m^ Create()                                             \
-      {                                                                     \
-      return gcnew m();                                                   \
-      }                                                                     \
-      \
-      /** <summary>
-       *  Static function to create a new instance with the given size.
-       *  </summary>
-       */                                                                   \
-       inline static m^ Create(System::Int32 size)                             
     \
-      {                                                                     \
-      return gcnew m(size);                                               \
-      }                                                                     \
-      \
-      /* <summary>
-       * Factory function to register this class.
-       * </summary>
-       */                                                                   \
-       static ISerializable^ CreateDeserializable()                        \
-      {                                                                     \
-      return gcnew m();                                                   \
-      }                                                                     \
-      \
-            internal:                                                          
     \
-              static ISerializable^ 
Create(std::shared_ptr<apache::geode::client::Serializable> obj)            \
-      {                                                                     \
-      return gcnew m(obj);                                                \
-      }                                                                     \
-      \
-            private:                                                           
     \
-              inline m(std::shared_ptr<apache::geode::client::Serializable> 
nativeptr)                            \
-              : 
Internal::CacheableHashSetType<static_cast<int8_t>(native::internal::DSCode::m),
 HSTYPE>(nativeptr) { }             \
-      };
-
       /// <summary>
       /// A mutable <c>ICacheableKey</c> hash set wrapper that can serve as
       /// a distributable object for caching.
       /// </summary>
-      _GFCLI_CACHEABLEHASHSET_DEF_GENERIC(CacheableHashSet,
-                                          
apache::geode::client::CacheableHashSet);
+      public ref class CacheableHashSet : public 
Internal::CacheableHashSetType<static_cast<int8_t>(native::internal::DSCode::CacheableHashSet),
 apache::geode::client::CacheableHashSet> { public: inline CacheableHashSet() : 
Internal::CacheableHashSetType<static_cast<int8_t>(native::internal::DSCode::CacheableHashSet),
 apache::geode::client::CacheableHashSet>() {} inline 
CacheableHashSet(System::Int32 size) : 
Internal::CacheableHashSetType<static_cast<int8_t>(native::internal::DSCode::CacheableHashSet),
 apache::geode::client::CacheableHashSet>(size) {} inline static 
CacheableHashSet^ Create() { return gcnew CacheableHashSet(); } inline static 
CacheableHashSet^ Create(System::Int32 size) { return gcnew 
CacheableHashSet(size); } static ISerializable^ CreateDeserializable() { return 
gcnew CacheableHashSet(); } internal: static ISerializable^ 
Create(std::shared_ptr<apache::geode::client::Serializable> obj) { return gcnew 
CacheableHashSet(obj); } private: inline 
CacheableHashSet(std::shared_ptr<apache::geode::client::Serializable> 
nativeptr) : 
Internal::CacheableHashSetType<static_cast<int8_t>(native::internal::DSCode::CacheableHashSet),
 apache::geode::client::CacheableHashSet>(nativeptr) { } };;

Review comment:
       Yup




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@geode.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Demacroize clicache 
> --------------------
>
>                 Key: GEODE-9559
>                 URL: https://issues.apache.org/jira/browse/GEODE-9559
>             Project: Geode
>          Issue Type: Improvement
>          Components: native client
>            Reporter: Michael Martell
>            Priority: Major
>              Labels: pull-request-available
>
> Macros in C++ complicate debug efforts and code maintenance and are generally 
> considered old school ([https://stroustrup.com/icsm-2012-demacro.pdf).] This 
> PR is to remove all the complicated macros in the .NET Framework client, e.g. 
> the clicache module.
> In addition to improving the maintainability of the clicache module, removing 
> the macros will greatly assist the creation of the .NET Core client. [dotPeek 
> |http://jetbrains.com/decompiler/] is proving to be a valuable tool in the 
> .NET Core project, but is currently limited by the extensive use of macros in 
> the clicache code.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to