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

code action: create getter/setter for variable #45

Open
2 tasks
WebFreak001 opened this issue Sep 13, 2018 · 0 comments
Open
2 tasks

code action: create getter/setter for variable #45

WebFreak001 opened this issue Sep 13, 2018 · 0 comments

Comments

@WebFreak001
Copy link
Member

For code like int _foo;, create the property functions int foo() @property const { return _foo; } int foo(int value) @property { return _foo = value; }

  • check if const can be used
  • need some way to find proper place to put them in code (comments, other properties, convention, etc.)

This makes writing classes easier (snippets already exist, but this is more intuitive) and shows beginners how properties are created. The property should be added where other properties are. It could check the comments for “Getters”, “Setters” and “Properties” if possible, otherwise just put it after a block of members.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant