N
nilavya
Hi,
A question regarding inheritance.
I hope i am asking in the right group
I have an eVC++ application. In that I have a class for GUI, which does
the changes related to GUI. Now due to specific requirement, I want to
seperate out the functions and code which are exclusive for GUI display
only so that in future if I want to go with different GUI display then
I can easily change. In this class I also have two state machines, but
I dont want to include the state machine in the GUI specific Class. So
I have changed my design which is as follows:
I have made a class which is CommonGUI, from this I have derived a
class named CGUIOne, which is exclusive for GUI display only.
class CommonGUI
{
function1();
function2();
variable 1;
variable 2;
}
Class CGUIOne: public CommonGUI
{
function3();
};
Now I have inherited from CommonGUI.
So when the function3() of CGUIOne gets called due to user action, I
want to update the state machine and then display proper contents on
the GUI. So I have shifted the logic to change state machine, in
CommonGUI. The function3() also sets some display on GUI.
The problem is that I am able to call the parent class function1/2()
from child class. But my function3() and function1() are too big. So it
causes to freeze the GUI. So what am i doing wrong over here..
Any help ,??? please
Thanks
With Best Regards,
Bhagat Nirav K
A question regarding inheritance.
I hope i am asking in the right group
I have an eVC++ application. In that I have a class for GUI, which does
the changes related to GUI. Now due to specific requirement, I want to
seperate out the functions and code which are exclusive for GUI display
only so that in future if I want to go with different GUI display then
I can easily change. In this class I also have two state machines, but
I dont want to include the state machine in the GUI specific Class. So
I have changed my design which is as follows:
I have made a class which is CommonGUI, from this I have derived a
class named CGUIOne, which is exclusive for GUI display only.
class CommonGUI
{
function1();
function2();
variable 1;
variable 2;
}
Class CGUIOne: public CommonGUI
{
function3();
};
Now I have inherited from CommonGUI.
So when the function3() of CGUIOne gets called due to user action, I
want to update the state machine and then display proper contents on
the GUI. So I have shifted the logic to change state machine, in
CommonGUI. The function3() also sets some display on GUI.
The problem is that I am able to call the parent class function1/2()
from child class. But my function3() and function1() are too big. So it
causes to freeze the GUI. So what am i doing wrong over here..
Any help ,??? please
Thanks
With Best Regards,
Bhagat Nirav K