[aspectc-user] Can "tjp" be used in advice "construction" ?

feng liu liuprayer at gmail.com
Tue Apr 28 09:33:35 CEST 2009

I have the following class A :

 class A {

    class B  *c_b;
    class C  *c_c;

    A() {

      c_b= new B();
      c_c= new C();



And then, I defined an aspect as following:

aspect my_aspect {

advice construction("A"):after(){

tjp->that()->c_b->method1( tjp->that()->c_c->variable1);



there is an error.  So, maybe I can't use "tjp" in advice "construction" ?

but if I want to call a method of c_b using the variables fo c_c when
constructing the class A. And I want to do this job using aspect. What
should i do?

Best regards,
Feng Liu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.aspectc.org/pipermail/aspectc-user/attachments/20090428/fd014bb0/attachment.html>

More information about the aspectc-user mailing list