<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Ah, that was it indeed. Thanks.<br>
<br>
I did try it with wildcards though... I just tested it again and my
problem was that %sc_module does <i>not</i> match the classes while
%::sc_module does. The documentation states that<br>
<br>
"In such a search pattern the special character “%” is interpreted
as a wildcard for names or parts of a signature. The special
character sequence “...” matches any number of parameters in a
function signature or any number of scopes in a qualified name. A
match expression is a quoted string."<br>
<br>
Especially the plural ("names" or "parts" of a signature) made me
think that the % wildcard could be used for more than a single name.
Is there a definition somewhere what exactly is matched by % and
what isn't and what the delta is to the ... wildcard? That'd be very
helpful, thank you in advance.<br>
<br>
Best regards<br>
Jannis<br>
<br>
<i></i>
<div class="moz-cite-prefix">Am 14.07.2014 20:16, schrieb Olaf
Spinczyk:<br>
</div>
<blockquote cite="mid:53C41E95.8020407@aspectc.org" type="cite">Hi!
<br>
<br>
It looks as if the signature of the base class is
"sc_core::sc_module" (and not "sc_module"). Therefore, derived
classes can only be matched by derived("sc_core::sc_module").
<br>
<br>
If you are not sure about how the signatures of your classes and
functions look like, e.g. because macros or fancy templates are
involved, compile your project and generate a project repository
file (-r option). It contains all signatures of all functions and
classes of your project. If you have that file (XML), you can use
the -x option of ac++ 1.2 to match pointcut expressions against
the model elements on the command line without having to compile
the code.
<br>
<br>
BTW, derived("A") also matches "A" itself. If you don't want that,
use derived("A") && !"A".
<br>
<br>
Best regards,
<br>
<br>
Olaf
<br>
<br>
Am 14.07.2014 17:44, schrieb Jannis Stoppe:
<br>
<blockquote type="cite">Hi.
<br>
<br>
The website states "AspectC++ Release 1.1 is available at the
Download
<br>
page. It has a faster and much better parser and supports
weaving in
<br>
macro-generated code." Do I need to enable something to actually
be able
<br>
to accomplish that? This aspect:
<br>
<br>
pointcut module() = derived("sc_module");
<br>
<br>
advice construction(module()) : after()
<br>
{
<br>
std::cout << "instance created: ...\n";
<br>
}
<br>
<br>
Does nothing for instances that are created using the SC_MODULE
macro...
<br>
Which should be defined by SC_MODULE(user_module_name) struct
<br>
user_module_name : ::sc_core::sc_module .
<br>
<br>
Any idea what the problem might be? Thanks in advance.
<br>
_______________________________________________
<br>
aspectc-user mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:aspectc-user@aspectc.org">aspectc-user@aspectc.org</a>
<br>
<a class="moz-txt-link-freetext" href="http://www.aspectc.org/mailman/listinfo/aspectc-user">http://www.aspectc.org/mailman/listinfo/aspectc-user</a>
<br>
<br>
</blockquote>
<br>
_______________________________________________
<br>
aspectc-user mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:aspectc-user@aspectc.org">aspectc-user@aspectc.org</a>
<br>
<a class="moz-txt-link-freetext" href="http://www.aspectc.org/mailman/listinfo/aspectc-user">http://www.aspectc.org/mailman/listinfo/aspectc-user</a>
<br>
<br>
</blockquote>
<br>
</body>
</html>