T O P I C R E V I E W |
tomkulaga |
Posted - Jul 15 2015 : 6:55:09 PM Hi do you have any plans to support pushing variables(fields) up and down the inheritance hierarchy?
one exmaple is this
class C : B { C() jump(); }
class B : A { B() }
class A { A() }
when coding class 'C' i realise that I want it to have a "name variable" passed into the constructor, and i realise that the base class A can also have it.
Id like to make a constructor for class C ->
C(std::string name)
and for VA to be able to propagate it through the constructors of B and A and make it a field in the bottom most class?
Another use case is the function jump();
It would be nice for VA to be able to refactor it by either sending the implementation into the base class or sending it to base class, making it virtual and overriding it in class C.
|
2 L A T E S T R E P L I E S (Newest First) |
tomkulaga |
Posted - Jul 15 2015 : 11:22:16 PM Awesome thanks. |
accord |
Posted - Jul 15 2015 : 10:42:09 PM We're planning to add push up/pull down refactoring at some point:
case=1121
I have put in a feature request to create a virtual method in base class:
case=90867
We are considering to add a refactoring that would create class constructor that initializes selected class members:
case=14340
I have added the idea to be able to select variables from base classes as well. I think that also creating the variable would be to specific and we already have a refactoring for that: Add Member. |