R
.rhavin grobert
[insert ya favorite greetin' here;-)]
guess you have the following classes...
___________________________________
class {
//..a couple of methods ...//
};
class A {
public:
//...//
B* GetB() // <- this we'll talk about
private:
B* m_pB;
};
A::GetB() {
//..some code..//
return m_pB;
};
___________________________________
when some does a...
A.GetB()->AMethodOfB();
.... and you want some code be executed before B::AMethodOfB() is
called, you simply pack it into A::GetB()'s body before the return.
But what do yuo do, if you want to execute some code _after_ B's
method is executed, e.g. when the callstack - after completing the
call into B - returns back into A::GetB()?
TIA and AnyHelpGREATLYapreciated and ThanxForTheFish...
lg, -.rhavin
guess you have the following classes...
___________________________________
class {
//..a couple of methods ...//
};
class A {
public:
//...//
B* GetB() // <- this we'll talk about
private:
B* m_pB;
};
A::GetB() {
//..some code..//
return m_pB;
};
___________________________________
when some does a...
A.GetB()->AMethodOfB();
.... and you want some code be executed before B::AMethodOfB() is
called, you simply pack it into A::GetB()'s body before the return.
But what do yuo do, if you want to execute some code _after_ B's
method is executed, e.g. when the callstack - after completing the
call into B - returns back into A::GetB()?
TIA and AnyHelpGREATLYapreciated and ThanxForTheFish...
lg, -.rhavin