1
#LyX 1.5.1 created this file. For more info see http://www.lyx.org/
8
%% multi column support
11
%% 25 points separation between columns
12
\setlength{\columnsep}{25pt}
14
%% 7 mm space before grammar rules
15
\def\ruleind{\hspace{14pt}}
17
%% special footnote symbols
18
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
20
%% space between description lines halved
22
\renewenvironment{description}
24
\labelwidth\z@ \itemindent-\leftmargin
25
\addtolength\itemindent{\myskip}
26
\let\makelabel\descriptionlabel}
27
\itemsep=-4pt\leftskip-\myskip}%
30
%% horizontal line over section name
31
\renewcommand\section{%
32
{\vspace*{\medskipamount}\hrule height 2pt}%
34
\@startsection {section}{1}{\z@}%
35
{-3.5ex \@plus -1ex \@minus -.2ex}%
37
{\normalfont\Large\bfseries}}
39
%% less vertical space before subsubsections
40
\renewcommand\subsubsection{%
42
\@startsection{subsubsection}{3}{\z@}%
43
{-3.25ex\@plus -1ex \@minus -.2ex}%
45
{\normalfont\normalsize\bfseries}}
51
\font_typewriter courier
52
\font_default_family default
66
\paperorientation landscape
73
\paragraph_separation indent
75
\quotes_language english
79
\tracking_changes false
86
\begin_layout Standard
91
\begin_layout Standard
103
\begin_layout Standard
109
AspectC++ Quick Reference
112
\begin_layout Section*
118
\begin_layout Description
129
Aspects in AspectC++ implement in a modular way crosscutting concerns and
130
are an extension to the class concept of C++.
131
Additionally to attributes and methods, aspects may also contain
138
\begin_layout Description
149
An advice declaration is used either to specify code that should run when
158
are reached or to introduce a new method, attribute, or type to all
169
\begin_layout Description
180
A slice is a fragment of a C++ element like a class.
181
It may be used by introduction advice to implemented static extensions
185
\begin_layout Description
197
In AspectC++ join points are defined as points in the component code where
198
aspects can interfere.
199
A join point refers to a method, an attribute, a type (class, struct, or
200
union), an object, or a point from which a join point is accessed.
203
\begin_layout Description
214
A pointcut is a set of join points described by a
221
\begin_layout Description
226
pointcut\InsetSpace ~
233
Pointcut expressions are composed from
237
used to find a set of join points, from pointcut functions used to filter
238
or map specific join points from a pointcut, and from algebraic operators
239
used to combine pointcuts.
242
\begin_layout Description
254
Match expressions are strings containing a search pattern.
257
\begin_layout Description
285
can be used to define the order of advice code execution.
288
\begin_layout Section*
294
\begin_layout Standard
298
Writing aspects works very similar to writing C++ class definitions.
299
Aspects may define ordinary class members as well as advice.
302
\begin_layout Description
326
\begin_layout Description
358
inherits from class or aspect
364
\begin_layout Standard
376
\begin_layout Section*
382
\begin_layout Description
406
the advice code is executed before the join points in the pointcut
409
\begin_layout Description
433
the advice code is executed after the join points in the pointcut
436
\begin_layout Description
464
the advice code is executed in place of the join points in the pointcut
467
\begin_layout Description
512
are pointcuts, which describe sets of aspects.
513
Aspects on the left side of the argument list always have a higher precedence
514
than aspects on the right hand side at the join points, where the order
515
declaration is applied.
518
\begin_layout Description
562
introduces a new base class
566
and members into the target classes matched by
573
\begin_layout Description
606
into the target classes matched by
613
\begin_layout Section*
619
\begin_layout Standard
620
\begin_inset VSpace 15pt*
626
\begin_layout Subsubsection*
633
\begin_layout Description
644
matches the C++ built-in scalar type
649
\begin_layout Description
661
matches any pointer type
664
\begin_layout Subsubsection*
668
Namespace and Class Matching
671
\begin_layout Description
682
matches the class, struct or union
687
\begin_layout Description
698
matches any class, struct or union whose name starts with
699
\begin_inset Quotes eld
703
\begin_inset Quotes erd
709
\begin_layout Subsubsection*
716
\begin_layout Description
735
having no parameters and returning
740
\begin_layout Description
759
having any number of parameters and returning any type
762
\begin_layout Description
777
matches any function, operator function, or type conversion function (in
778
any class or namespace)
781
\begin_layout Description
791
...::Service::%(...) const"
796
matches any const member-function of the class
803
\begin_layout Description
813
...::operator %(...)"
818
matches any type conversion function
821
\begin_layout Description
836
matches any virtual member function of
841
\begin_layout Subsubsection*
853
\begin_layout Standard
867
\begin_layout Description
878
matches all template instances of the class
883
\begin_layout Description
894
matches only the template instance
901
\begin_layout Description
916
matches any member function from any template class instance in any scope
919
\begin_layout Section*
922
Predefined Pointcut Functions
925
\begin_layout Standard
926
\begin_inset VSpace 15pt*
932
\begin_layout Subsubsection*
939
\begin_layout Description
956
\begin_layout Standard
968
\begin_inset Formula $\rightarrow$
972
\begin_inset Formula $_{C}$
981
\begin_layout Standard
992
provides all join points where a named entity in the
999
\begin_layout Description
1016
\begin_layout Standard
1028
\begin_inset Formula $\rightarrow$
1032
\begin_inset Formula $_{E}$
1039
provides all join points referring to the implementation of a named entity
1047
\begin_layout Description
1064
\begin_layout Standard
1076
\begin_inset Formula $\rightarrow$
1080
\begin_inset Formula $_{Cons}$
1087
all join points where an instance of the given class(es) is constructed.
1090
\begin_layout Description
1107
\begin_layout Standard
1119
\begin_inset Formula $\rightarrow$
1123
\begin_inset Formula $_{Des}$
1130
all join points where an instance of the given class(es) is destructed.
1133
\begin_layout Standard
1139
may contain function names or class names.
1140
A class name is equivalent to the names of all functions defined within
1141
its scope combined with the
1145
operator (see below).
1146
\begin_inset VSpace 8pt
1152
\begin_layout Subsubsection*
1159
\begin_layout Description
1176
\begin_layout Standard
1188
\begin_inset Formula $\rightarrow$
1195
captures join points occuring in the dynamic execution context of join points
1201
The argument pointcut is forbidden to contain context variables or join
1202
points with runtime conditions (currently cflow, that, or target).
1205
\begin_layout Subsubsection*
1212
\begin_layout Description
1229
\begin_layout Standard
1241
\begin_inset Formula $\rightarrow$
1245
\begin_inset Formula $_{C,F}$
1252
returns all base classes resp.\InsetSpace ~
1253
redefined functions of classes in the
1260
\begin_layout Description
1277
\begin_layout Standard
1289
\begin_inset Formula $\rightarrow$
1293
\begin_inset Formula $_{C,F}$
1300
returns all classes in the
1304
and all classes derived from them resp.\InsetSpace ~
1305
all redefined functions of derived
1309
\begin_layout Subsubsection*
1316
\begin_layout Description
1333
\begin_layout Standard
1345
\begin_inset Formula $\rightarrow$
1352
filters all join points that are within the functions or classes in the
1358
\begin_layout Subsubsection*
1365
\begin_layout Description
1383
\begin_layout Standard
1395
\begin_inset Formula $\rightarrow$
1402
returns all join points where the current C++
1406
pointer refers to an object which is an instance of a type that is compatible
1407
to the type described by the
1412
\begin_layout Description
1430
\begin_layout Standard
1442
\begin_inset Formula $\rightarrow$
1449
returns all join points where the target object of a call is an instance
1450
of a type that is compatible to the type described by the
1455
\begin_layout Description
1473
\begin_layout Standard
1485
\begin_inset Formula $\rightarrow$
1492
returns all join points where the result object of a call/execution is an
1493
instance of a type described by the
1498
\begin_layout Description
1517
\begin_layout Standard
1529
\begin_inset Formula $\rightarrow$
1540
is used to provide all joinpoints with matching argument signatures
1543
\begin_layout Standard
1550
it is possible here to pass the name of a
1554
to which the context information is bound.
1555
In this case the type of the variable is used for the type matching.
1558
\begin_layout Standard
1559
\begin_inset VSpace 15pt*
1565
\begin_layout Subsubsection*
1572
\begin_layout Description
1594
\begin_layout Standard
1606
\begin_inset Formula $\rightarrow$
1610
\begin_inset Formula $\rightarrow$
1617
intersection of the join points in the
1622
\begin_layout Description
1644
\begin_layout Standard
1656
\begin_inset Formula $\rightarrow$
1660
\begin_inset Formula $\rightarrow$
1667
union of the join points in the
1672
\begin_layout Description
1688
\begin_layout Standard
1700
\begin_inset Formula $\rightarrow$
1704
\begin_inset Formula $\rightarrow$
1711
exclusion of the join points in the
1716
\begin_layout Section*
1722
\begin_layout Standard
1725
The JoinPoint-API is provided within every advice code body by the built-in
1735
\begin_inset VSpace 15pt
1741
\begin_layout Subsubsection*
1745
Compile-time Types and Constants
1748
\begin_layout Description
1769
\begin_layout Standard
1786
object type (object initiating a call)
1789
\begin_layout Description
1810
\begin_layout Standard
1827
target object type (target object of a call)
1830
\begin_layout Description
1851
\begin_layout Standard
1868
type of the object, which is used to
1874
the result of the affected function
1877
\begin_layout Description
1904
\begin_layout Standard
1921
result type of the affected function
1924
\begin_layout Description
1937
Arg<i>::ReferredType
1951
\begin_layout Standard
1972
\begin_layout Standard
1981
argument of the affected
1987
\begin_layout Standard
1999
\begin_layout Description
2020
\begin_layout Standard
2040
\begin_layout Description
2061
\begin_layout Standard
2078
unique numeric identifier for this join point
2081
\begin_layout Description
2102
\begin_layout Standard
2119
numeric identifier describing the type of this join point (
2140
\begin_layout Standard
2141
\begin_inset VSpace 6pt*
2147
\begin_layout Subsubsection*
2151
Runtime Functions and State
2154
\begin_layout Description
2182
gives a textual description of the join point (function name, class name,
2186
\begin_layout Description
2210
returns a pointer to the object initiating a call or 0 if it is a static
2211
method or a global function
2214
\begin_layout Description
2238
returns a pointer to the object that is the target of a call or 0 if it
2239
is a static method or a global function
2242
\begin_layout Description
2270
returns a typed pointer to the result value or 0 if the function has no
2274
\begin_layout Description
2280
Arg<i>::ReferredType\InsetSpace ~
2301
returns a typed pointer to the
2305
\begin_layout Standard
2314
argument value (with
2318
\begin_layout Standard
2330
\begin_layout Description
2362
returns a pointer to the memory position holding the argument value with
2368
\begin_layout Description
2392
executes the original code in an around advice (should be called at most
2393
once in around advice)
2396
\begin_layout Description
2402
AC::Action\InsetSpace ~
2420
returns the runtime action object containing the execution environment to
2425
) the original code encapsulated by an around advice
2428
\begin_layout Standard
2429
\begin_inset VSpace 6pt*
2435
\begin_layout Subsubsection*
2439
Runtime Type Information
2442
\begin_layout Description
2449
AC::Type\InsetSpace ~
2458
\begin_layout Description
2465
AC::Type\InsetSpace ~
2489
return a C++ ABI V3 conforming string representation of the result type
2490
/ argument type of the affected function
2493
\begin_layout Section*
2499
\begin_layout Standard
2502
A reusable tracing aspect.
2506
\begin_layout Standard
2507
\begin_inset VSpace medskip*
2513
\begin_layout Standard
2518
\begin_layout Standard
2528
\begin_inset Box Frameless
2537
height_special "totalheight"
2540
\begin_layout LyX-Code
2553
\begin_layout LyX-Code
2560
\begin_layout Standard
2571
virtual functions() = 0;
2574
\begin_layout LyX-Code
2581
\begin_layout Standard
2603
\begin_layout LyX-Code
2610
\begin_layout Standard
2625
\begin_layout Standard
2638
\begin_layout Standard
2659
\begin_layout Standard
2671
\begin_layout LyX-Code
2678
\begin_layout Standard
2689
for (unsigned i = 0; i <
2700
\begin_layout LyX-Code
2707
\begin_layout Standard
2722
\begin_layout Standard
2735
\begin_layout Standard
2755
\begin_layout LyX-Code
2762
\begin_layout Standard
2777
\begin_layout Standard
2790
\begin_layout Standard
2802
\begin_layout LyX-Code
2809
\begin_layout Standard
2827
\begin_layout LyX-Code
2834
\begin_layout Standard
2849
\begin_layout Standard
2862
\begin_layout Standard
2874
\begin_layout LyX-Code
2881
\begin_layout Standard
2895
\begin_layout LyX-Code
2906
\begin_layout Standard
2907
\begin_inset VSpace bigskip*
2913
\begin_layout Standard
2917
In a derived aspect the pointcut
2921
may be redefined to apply the aspect to the desired set of functions.
2924
\begin_layout Standard
2925
\begin_inset VSpace medskip
2931
\begin_layout Standard
2936
\begin_layout Standard
2946
\begin_inset Box Frameless
2955
height_special "totalheight"
2958
\begin_layout LyX-Code
2968
TraceMain : public Trace {
2971
\begin_layout LyX-Code
2978
\begin_layout Standard
2989
functions() = "% main(...)";
2992
\begin_layout LyX-Code
3003
\begin_layout Standard
3007
\begin_layout Standard
3025
\begin_layout Standard
3029
This is a reference sheet corresponding to AspectC++ 1.0pre3.
3036
\begin_layout Standard
3048
\begin_layout Standard
3054
(c) Copyright 2006 pure-systems GmbH, Olaf Spinczyk and Daniel Lohmann.
3055
All rights reserved.
3058
\begin_layout Standard
3059
\begin_inset VSpace bigskip
3066
\begin_layout Standard
3078
\begin_layout Standard
3079
\begin_inset VSpace 2pt*
3085
\begin_layout Standard
3092
\begin_layout Standard
3104
support for template instance matching is an experimental feature
3107
\begin_layout Standard
3108
\begin_inset VSpace -1pt*
3114
\begin_layout Standard
3121
\begin_layout Standard
3134
\begin_inset LatexCommand url
3135
target "http://www.codesourcery.com/cxx-abi/abi.html#mangling"
3142
\begin_layout Standard
3143
\begin_inset VSpace -1pt*
3149
\begin_layout Standard
3156
\begin_layout Standard
3169
\begin_inset Formula $_{\textrm{C}}$
3173
\begin_inset Formula $_{\textrm{E}}$
3177
\begin_inset Formula $_{Cons}$
3181
\begin_inset Formula $_{Des}$
3213
\begin_inset Formula $_{N}$
3217
\begin_inset Formula $_{C}$
3221
\begin_inset Formula $_{F}$
3225
\begin_inset Formula $_{T}$
3259
\begin_layout Standard
3260
\begin_inset VSpace -32pt*
3267
\begin_layout Standard