eolian-cxx: Rename fields to standard naming
authorLauro Moura <lauromoura@expertisesolutions.com.br>
Sat, 12 Oct 2019 21:05:17 +0000 (18:05 -0300)
committerJongmin Lee <jm105.lee@samsung.com>
Sun, 13 Oct 2019 21:38:49 +0000 (06:38 +0900)
Summary: bool fields were missing the `is_` prefix.

Reviewers: felipealmeida, brunobelo, segfaultxavi, woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10380

src/bin/eolian_mono/eolian/mono/blacklist.hh
src/lib/eolian_cxx/grammar/class_definition.hpp
src/lib/eolian_cxx/grammar/klass_def.hpp

index ff8080b..49cded5 100644 (file)
@@ -178,7 +178,7 @@ inline bool is_event_blacklisted(attributes::event_def const& evt, Context const
 {
    auto options = efl::eolian::grammar::context_find_tag<options_context>(context);
 
-   return evt.beta && !options.want_beta;
+   return evt.is_beta && !options.want_beta;
 }
 
 }
index 89455ed..569a62f 100644 (file)
@@ -137,7 +137,7 @@ struct class_definition_generator
 
      for (auto&& e : cls.events)
        {
-          if (e.beta)
+          if (e.is_beta)
             {
                suffix = "BETA";
                if(!as_generator
@@ -145,7 +145,7 @@ struct class_definition_generator
                      .generate(sink, std::make_tuple(cls.namespaces, cls.eolian_name, suffix), add_upper_case_context(context)))
                  return false;
             }
-          if (e.protect)
+          if (e.is_protected)
             {
                suffix = "PROTECTED";
                if(!as_generator
@@ -193,9 +193,9 @@ struct class_definition_generator
           if (!as_generator("#endif\n").generate(sink, attributes::unused, context))
             return false;
 
-          if (e.beta && !as_generator("#endif\n").generate(sink, attributes::unused, context))
+          if (e.is_beta && !as_generator("#endif\n").generate(sink, attributes::unused, context))
             return false;
-          if (e.protect && !as_generator("#endif\n").generate(sink, attributes::unused, context))
+          if (e.is_protected && !as_generator("#endif\n").generate(sink, attributes::unused, context))
             return false;
        }
      
index f38ebeb..5b977a6 100644 (file)
@@ -1155,7 +1155,7 @@ struct event_def
   klass_name klass;
   eina::optional<type_def> type;
   std::string name, c_name;
-  bool beta, protect;
+  bool is_beta, is_protected;
   documentation_def documentation;
 
   friend inline bool operator==(event_def const& lhs, event_def const& rhs)
@@ -1164,8 +1164,8 @@ struct event_def
       && lhs.type == rhs.type
       && lhs.name == rhs.name
       && lhs.c_name == rhs.c_name
-      && lhs.beta == rhs.beta
-      && lhs.protect == rhs.protect
+      && lhs.is_beta == rhs.is_beta
+      && lhs.is_protected == rhs.is_protected
       && lhs.documentation == rhs.documentation;
   }
   friend inline bool operator!=(event_def const& lhs, event_def const& rhs)
@@ -1174,8 +1174,8 @@ struct event_def
   }
 
   event_def(klass_name _klass, type_def type, std::string name, std::string c_name,
-          bool beta, bool protect, documentation_def documentation)
-    : klass(_klass), type(type), name(name), c_name(c_name), beta(beta), protect(protect)
+          bool is_beta, bool is_protected, documentation_def documentation)
+    : klass(_klass), type(type), name(name), c_name(c_name), is_beta(is_beta), is_protected(is_protected)
     , documentation(documentation) {}
 
   event_def(Eolian_Event const* event, Eolian_Class const* cls, Eolian_Unit const* unit)
@@ -1188,8 +1188,8 @@ struct event_def
              } : eina::optional<type_def>{})
     , name( ::eolian_event_name_get(event))
     , c_name( ::eolian_event_c_macro_get(event))
-    , beta( ::eolian_event_is_beta(event))
-    , protect( ::eolian_event_scope_get(event) == EOLIAN_SCOPE_PROTECTED)
+    , is_beta( ::eolian_event_is_beta(event))
+    , is_protected( ::eolian_event_scope_get(event) == EOLIAN_SCOPE_PROTECTED)
     , documentation( ::eolian_event_documentation_get(event)) {}
 };