[aspectc-user] Order advice

Marko Bozikovic bozho at kset.org
Wed Dec 1 23:13:36 CET 2004


Hi!

I need some help with the order advice... How do I use it? :)

(Olaf, I'm using samples from your AOSD 2004 tutorial)
I have a Queue class and two aspects (ElementCounter and QueueException) Each 
of them defines (among others) an after advice for Queue::Dequeue function.

By default, QueueException advice is executed first, and ElementCounter advice 
second. This is ok, but I wanted to try order advice, so I defined the Order 
aspect like this:

aspect Order {

public:
   advice "% Queue::Enqueue(...)" || "% Queue::Dequeue(...)" :
     order("ElementCounter", "QueueException");
};

Everything compiles ok, but QueueException after advice still gets executed 
before ElementCounter after advice in Queue::Dequeue function.

I've tried swapping aspects in the order advice, and resulting .acc file is 
identical to the original one.

What am I doing wrong?

TIA,
-- 
Marko
ICQ: 5990814

I'm not under the alkafluence of inkahol
that some thinkle peep I am.
It's just the drunker I sit here the longer I get.



More information about the aspectc-user mailing list