Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ > calling "after ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 6 Topic 45758 of 45888
Post > Topic >>

calling "after return"...?

by ".rhavin grobert" <clqrq@[EMAIL PROTECTED] > May 5, 2008 at 06:03 AM

[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;)




 6 Posts in Topic:
calling "after return"...?
".rhavin grobert&quo  2008-05-05 06:03:07 
Re: calling "after return"...?
Branimir Maksimovic <b  2008-05-05 07:28:40 
Re: calling "after return"...?
gw7rib@[EMAIL PROTECTED]   2008-05-05 07:31:11 
Re: calling "after return"...?
Ben Bacarisse <ben.use  2008-05-05 15:42:18 
Re: calling "after return"...?
pjb@[EMAIL PROTECTED] (P  2008-05-05 16:53:12 
Re: calling "after return"...?
"Eric.Malenfant@[EMA  2008-05-05 07:56:21 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon May 12 19:35:24 CDT 2008.