[aspectc-user] syntax question
Law, Colin
colin.law at epid.eurotherm.co.uk
Tue Feb 12 10:44:02 CET 2002
Apologies if these questions have already been addressed before I came
along.
I have class A with member function virtual void a(), and derived class B
which overrides a(). I wish to apply a before() operation to each execution
of a(). So the pointcut can be
pointcut c() = execution("void %::a()");
However if a third unrelated class C also has member fn a() then this will
be also be selected by the pointcut. What I want to do is select a() only
where it is a member of a class derived from A. Does the compiler support
this? I have experimented with within() and base() but suspect that these
are not supported yet, or maybe I just have the wrong syntax.
On a separate issue, once into the before() advice I wish to access existing
attributes and methods of A, is this possible?
Colin Law
More information about the aspectc-user
mailing list