Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use metaclass system to automate generating propertyindex methods for value classes #27

Open
oktal3700 opened this issue Jun 7, 2020 · 0 comments
Labels
enhancement New feature or request refactor Change code structure without affecting behavior simplify Reduce application complexity

Comments

@oktal3700
Copy link
Contributor

For each new value class we must manually write the methods propertyByIndex, setPropertyByIndex, etc. For a long time I wished to automate this task using the metaclass system (previously known as tuple system). As a first step, we would need to add support for getters and setters in the metaclass system, as there are many property indexes that do not correspond directly to individual data members.

Also consider using a pair of ints for each index in CPropertyIndex (one int for the enum, another int for the metaTypeId of the enum type) as this would remove the requirement to avoid collisions of enum values defined by the index enums of different value classes. (Need to think how this would interact with dbus.)

@oktal3700 oktal3700 added enhancement New feature or request refactor Change code structure without affecting behavior simplify Reduce application complexity labels Jun 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor Change code structure without affecting behavior simplify Reduce application complexity
Projects
None yet
Development

No branches or pull requests

1 participant