[aspectc-user] Pointcut of class constructor

Bartosz Blimke masb at chorwacja.com
Thu Apr 22 11:01:53 CEST 2004


Hello,

I would like to add some code to the constructor
of some class from aspect. Is it possible
to have pointcut which represents constructor ?

for example:

class Person {

public:
    Person(){};
    ~Person(){};
    void sampleMethod(){};
}

pointcut personMethods() =
   execution(% Person::%(...));

advice personMethods() : around {
  tjp->proceed();
  cout << JoinPoint::signature() << endl;
}

shows only

Person::sampleMethod(void)

Is there some way to describe constructor pointcut ?

Greets,

Bartosz Blimke



More information about the aspectc-user mailing list