inline std::string managed_part_name(attributes::part_def const& part)
{
std::vector<std::string> names = utils::split(part.name, '_');
- return utils::to_pascal_case(names);
+ return utils::to_pascal_case(names) + "Part";
}
// Class name translation (interface/concrete/inherit/etc)
private static void do_part_test(Dummy.PartHolder t)
{
- var p1 = t.PartOne;
- var p2 = t.PartTwo;
+ var p1 = t.OnePart;
+ var p2 = t.TwoPart;
Test.Assert(p1 is Dummy.TestObject);
Test.AssertEquals("part_one", p1.GetName());
Test.Assert(p2 is Dummy.TestObject);
class @beta Dummy.Part_Holder extends Dummy.Test_Object implements Efl.Part {
parts {
- part_one: Dummy.Test_Object; [[ Part number one. ]]
- part_two: Dummy.Test_Object; [[ Part number two. ]]
+ one: Dummy.Test_Object; [[ Part number one. ]]
+ two: Dummy.Test_Object; [[ Part number two. ]]
}
implements {
Efl.Part.part_get;
typedef struct Dummy_Part_Holder_Data
{
- Eo *part_one;
- Eo *part_two;
+ Eo *one;
+ Eo *two;
} Dummy_Part_Holder_Data;
typedef struct Dummy_Inherit_Helper_Data
// To avoid an infinite loop calling the same constructor
if (!efl_parent_get(obj))
{
- pd->part_one = efl_add(DUMMY_TEST_OBJECT_CLASS, obj, efl_name_set(efl_added, "part_one"));
- pd->part_two = efl_add(DUMMY_TEST_OBJECT_CLASS, obj, efl_name_set(efl_added, "part_two"));
+ pd->one = efl_add(DUMMY_TEST_OBJECT_CLASS, obj, efl_name_set(efl_added, "part_one"));
+ pd->two = efl_add(DUMMY_TEST_OBJECT_CLASS, obj, efl_name_set(efl_added, "part_two"));
}
return obj;
Efl_Object *_dummy_part_holder_efl_part_part_get(EINA_UNUSED const Eo *obj, Dummy_Part_Holder_Data *pd, const char *name)
{
- if (!strcmp(name, "part_one"))
- return pd->part_one;
- else if (!strcmp(name, "part_two"))
- return pd->part_two;
+ if (!strcmp(name, "one"))
+ return pd->one;
+ else if (!strcmp(name, "two"))
+ return pd->two;
else
return NULL;
}