summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-10-12 18:05:17 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2019-10-31 12:00:44 -0300
commit36c14a2a0599d27c56c23bd6667e952e8738ca3f (patch)
tree59be7e4ba9f89dafcbeb247539e4067d94fd3bd7
parent783e566b69b14317b517e5fd85c26b6736202b8b (diff)
eolian-cxx: Rename fields to standard naming
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
-rw-r--r--src/bin/eolian_mono/eolian/mono/blacklist.hh2
-rw-r--r--src/lib/eolian_cxx/grammar/class_definition.hpp8
-rw-r--r--src/lib/eolian_cxx/grammar/klass_def.hpp14
3 files changed, 12 insertions, 12 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/blacklist.hh b/src/bin/eolian_mono/eolian/mono/blacklist.hh
index 80b33addd8..d3b0d494d7 100644
--- a/src/bin/eolian_mono/eolian/mono/blacklist.hh
+++ b/src/bin/eolian_mono/eolian/mono/blacklist.hh
@@ -188,7 +188,7 @@ inline bool is_event_blacklisted(attributes::event_def const& evt, Context const
188{ 188{
189 auto options = efl::eolian::grammar::context_find_tag<options_context>(context); 189 auto options = efl::eolian::grammar::context_find_tag<options_context>(context);
190 190
191 return evt.beta && !options.want_beta; 191 return evt.is_beta && !options.want_beta;
192} 192}
193 193
194} 194}
diff --git a/src/lib/eolian_cxx/grammar/class_definition.hpp b/src/lib/eolian_cxx/grammar/class_definition.hpp
index 8c53316d85..2cea90872a 100644
--- a/src/lib/eolian_cxx/grammar/class_definition.hpp
+++ b/src/lib/eolian_cxx/grammar/class_definition.hpp
@@ -152,7 +152,7 @@ struct class_definition_generator
152 152
153 for (auto&& e : cls.events) 153 for (auto&& e : cls.events)
154 { 154 {
155 if (e.beta) 155 if (e.is_beta)
156 { 156 {
157 suffix = "BETA"; 157 suffix = "BETA";
158 if(!as_generator 158 if(!as_generator
@@ -160,7 +160,7 @@ struct class_definition_generator
160 .generate(sink, std::make_tuple(cls.namespaces, cls.eolian_name, suffix), add_upper_case_context(context))) 160 .generate(sink, std::make_tuple(cls.namespaces, cls.eolian_name, suffix), add_upper_case_context(context)))
161 return false; 161 return false;
162 } 162 }
163 if (e.protect) 163 if (e.is_protected)
164 { 164 {
165 suffix = "PROTECTED"; 165 suffix = "PROTECTED";
166 if(!as_generator 166 if(!as_generator
@@ -208,9 +208,9 @@ struct class_definition_generator
208 if (!as_generator("#endif\n").generate(sink, attributes::unused, context)) 208 if (!as_generator("#endif\n").generate(sink, attributes::unused, context))
209 return false; 209 return false;
210 210
211 if (e.beta && !as_generator("#endif\n").generate(sink, attributes::unused, context)) 211 if (e.is_beta && !as_generator("#endif\n").generate(sink, attributes::unused, context))
212 return false; 212 return false;
213 if (e.protect && !as_generator("#endif\n").generate(sink, attributes::unused, context)) 213 if (e.is_protected && !as_generator("#endif\n").generate(sink, attributes::unused, context))
214 return false; 214 return false;
215 } 215 }
216 216
diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp b/src/lib/eolian_cxx/grammar/klass_def.hpp
index ab9b6f79ff..58b8cbd219 100644
--- a/src/lib/eolian_cxx/grammar/klass_def.hpp
+++ b/src/lib/eolian_cxx/grammar/klass_def.hpp
@@ -1168,7 +1168,7 @@ struct event_def
1168 klass_name klass; 1168 klass_name klass;
1169 eina::optional<type_def> type; 1169 eina::optional<type_def> type;
1170 std::string name, c_name; 1170 std::string name, c_name;
1171 bool beta, protect; 1171 bool is_beta, is_protected;
1172 documentation_def documentation; 1172 documentation_def documentation;
1173 1173
1174 friend inline bool operator==(event_def const& lhs, event_def const& rhs) 1174 friend inline bool operator==(event_def const& lhs, event_def const& rhs)
@@ -1177,8 +1177,8 @@ struct event_def
1177 && lhs.type == rhs.type 1177 && lhs.type == rhs.type
1178 && lhs.name == rhs.name 1178 && lhs.name == rhs.name
1179 && lhs.c_name == rhs.c_name 1179 && lhs.c_name == rhs.c_name
1180 && lhs.beta == rhs.beta 1180 && lhs.is_beta == rhs.is_beta
1181 && lhs.protect == rhs.protect 1181 && lhs.is_protected == rhs.is_protected
1182 && lhs.documentation == rhs.documentation; 1182 && lhs.documentation == rhs.documentation;
1183 } 1183 }
1184 friend inline bool operator!=(event_def const& lhs, event_def const& rhs) 1184 friend inline bool operator!=(event_def const& lhs, event_def const& rhs)
@@ -1187,8 +1187,8 @@ struct event_def
1187 } 1187 }
1188 1188
1189 event_def(klass_name _klass, type_def type, std::string name, std::string c_name, 1189 event_def(klass_name _klass, type_def type, std::string name, std::string c_name,
1190 bool beta, bool protect, documentation_def documentation) 1190 bool is_beta, bool is_protected, documentation_def documentation)
1191 : klass(_klass), type(type), name(name), c_name(c_name), beta(beta), protect(protect) 1191 : klass(_klass), type(type), name(name), c_name(c_name), is_beta(is_beta), is_protected(is_protected)
1192 , documentation(documentation) {} 1192 , documentation(documentation) {}
1193 1193
1194 event_def(Eolian_Event const* event, Eolian_Class const* cls, Eolian_Unit const* unit) 1194 event_def(Eolian_Event const* event, Eolian_Class const* cls, Eolian_Unit const* unit)
@@ -1201,8 +1201,8 @@ struct event_def
1201 } : eina::optional<type_def>{}) 1201 } : eina::optional<type_def>{})
1202 , name( ::eolian_event_name_get(event)) 1202 , name( ::eolian_event_name_get(event))
1203 , c_name( ::eolian_event_c_macro_get(event)) 1203 , c_name( ::eolian_event_c_macro_get(event))
1204 , beta( ::eolian_event_is_beta(event)) 1204 , is_beta( ::eolian_event_is_beta(event))
1205 , protect( ::eolian_event_scope_get(event) == EOLIAN_SCOPE_PROTECTED) 1205 , is_protected( ::eolian_event_scope_get(event) == EOLIAN_SCOPE_PROTECTED)
1206 , documentation( ::eolian_event_documentation_get(event)) {} 1206 , documentation( ::eolian_event_documentation_get(event)) {}
1207}; 1207};
1208 1208