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

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_r701161709



##########
File path: clicache/src/CacheableBuiltins.hpp
##########
@@ -356,129 +356,56 @@ namespace Apache
         }
       };
 
-
-
-
-      //n = native type
-      //m = CacheableInt(managed cacheable)
-      //mt = managed type(bool, int)
-#define _GFCLI_CACHEABLE_KEY_DEF_NEW(n, m, mt)                                 
  \
-      ref class m : public CacheableBuiltinKey<n, mt,        \
-        static_cast<int8_t>(DSCode::m)>                                        
           \
-      {                                                                       \
-      public:                                                                 \
-         /** <summary>
-         *  Allocates a new instance with the given value.
-         *  </summary>
-         *  <param name="value">the value of the new instance</param>
-         */                                                                   \
-         inline m()                                                            
\
-         : CacheableBuiltinKey() { }                                         \
-         /** <summary>
-          *  Allocates a new instance with the given value.
-          *  </summary>
-          *  <param name="value">the value of the new instance</param>
-          */                                                                   
\
-          inline m(mt value)                                                   
 \
-          : CacheableBuiltinKey(value) { }                                    \
-          /** <summary>
-           *  Static function to create a new instance given value.
-           *  </summary>
-           *  <param name="value">the value of the new instance</param>
-           */                                                                  
 \
-           inline static m^ Create(mt value)                                   
  \
-           {                                                                   
  \
-           return gcnew m(value);                                              
\
-           }                                                                   
  \
-           /** <summary>
-            * Explicit conversion operator to contained value type.
-            * </summary>
-            */                                                                 
  \
-            inline static explicit operator mt (m^ value)                      
   \
-           {                                                                   
  \
-           return value->Value;                                                
\
-           }                                                                   
  \
-           \
-           /** <summary>
-            * Factory function to register this class.
-            * </summary>
-            */                                                                 
  \
-            static ISerializable^ CreateDeserializable()                       
 \
-           {                                                                   
  \
-           return gcnew m();                                       \
-           }                                                                   
  \
-           \
-           internal:                                                           
    \
-           static ISerializable^ Create(std::shared_ptr<native::Serializable> 
obj)            \
-           {                                                                   
  \
-           return (obj != nullptr ? gcnew m(obj) : nullptr);                   
\
-           }                                                                   
  \
-           \
-           private:                                                            
    \
-             inline m(std::shared_ptr<native::Serializable> nativeptr)         
                   \
-              : CacheableBuiltinKey(nativeptr) { }                             
   \
-      };
-
-
-
-
       // Built-in CacheableKeys
 
       /// <summary>
       /// An immutable wrapper for booleans that can serve
       /// as a distributable key object for caching.
       /// </summary>
-      _GFCLI_CACHEABLE_KEY_DEF_NEW(native::CacheableBoolean,
-                                   CacheableBoolean, bool);
+      ref class CacheableBoolean : public 
CacheableBuiltinKey<native::CacheableBoolean, bool, 
static_cast<int8_t>(DSCode::CacheableBoolean)> { public: inline 
CacheableBoolean() : CacheableBuiltinKey() { } inline CacheableBoolean(bool 
value) : CacheableBuiltinKey(value) { } inline static CacheableBoolean^ 
Create(bool value) { return gcnew CacheableBoolean(value); } inline static 
explicit operator bool (CacheableBoolean^ value) { return value->Value; } 
static ISerializable^ CreateDeserializable() { return gcnew CacheableBoolean(); 
} internal: static ISerializable^ Create(std::shared_ptr<native::Serializable> 
obj) { return (obj != nullptr ? gcnew CacheableBoolean(obj) : nullptr); } 
private: inline CacheableBoolean(std::shared_ptr<native::Serializable> 
nativeptr) : CacheableBuiltinKey(nativeptr) { } };;

Review comment:
       Yup. Missed this one.




-- 
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