#LyX 1.5.1 created this file. For more info see http://www.lyx.org/
\lyxformat 276
\begin_document
\begin_header
\textclass article
\begin_preamble

%%  multi column support 
\usepackage{multicol}

%%  25 points separation between columns
\setlength{\columnsep}{25pt}

%%  7 mm space before grammar rules
\def\ruleind{\hspace{14pt}}

%%  special footnote symbols  
\renewcommand{\thefootnote}{\fnsymbol{footnote}}

%%  space between description lines halved
\def\myskip{10pt}
\renewenvironment{description}
  {\list{}{
     \labelwidth\z@ \itemindent-\leftmargin     
     \addtolength\itemindent{\myskip}
     \let\makelabel\descriptionlabel}
   \itemsep=-4pt\leftskip-\myskip}% 
  {\endlist}

%%  horizontal line over section name
\renewcommand\section{% 
  {\vspace*{\medskipamount}\hrule height 2pt}%
  {\vspace*{-10pt}}%
  \@startsection {section}{1}{\z@}% 
  {-3.5ex \@plus -1ex \@minus -.2ex}% 
  {2.3ex \@plus.2ex}% 
  {\normalfont\Large\bfseries}}

%%  less vertical space before subsubsections
\renewcommand\subsubsection{% 
  {\vspace*{-15pt}}% 
  \@startsection{subsubsection}{3}{\z@}% 
  {-3.25ex\@plus -1ex \@minus -.2ex}% 
  {1.5ex \@plus .2ex}% 
  {\normalfont\normalsize\bfseries}}
\end_preamble
\language english
\inputencoding auto
\font_roman times
\font_sans helvet
\font_typewriter courier
\font_default_family default
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100
\graphics default
\paperfontsize 10
\spacing other 0.90
\papersize a4paper
\use_geometry true
\use_amsmath 1
\use_esint 0
\cite_engine basic
\use_bibtopic false
\paperorientation landscape
\leftmargin 1cm
\topmargin 0.7cm
\rightmargin 2.5cm
\bottommargin 0.7cm
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\papercolumns 1
\papersides 2
\paperpagestyle empty
\tracking_changes false
\output_changes false
\author "" 
\end_header

\begin_body

\begin_layout Standard
\noindent
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
begin{multicols*}{3}
\end_layout

\end_inset


\end_layout

\begin_layout Standard
\noindent

\series bold
\size largest
\emph on
AspectC++ Quick Reference
\end_layout

\begin_layout Section*

\family sans
Concepts
\end_layout

\begin_layout Description

\series medium
\size small
\emph on
aspect
\series default
\emph default
 \InsetSpace ~

\newline
Aspects in AspectC++ implement in a modular way crosscutting concerns and
 are an extension to the class concept of C++.
 Additionally to attributes and methods, aspects may also contain 
\emph on
advice declarations
\emph default
.
\end_layout

\begin_layout Description

\series medium
\size small
\emph on
advice
\series default
\emph default
 \InsetSpace ~

\newline
An advice declaration is used either to specify code that should run when
 the 
\emph on
join points
\emph default
 specified by a 
\emph on
pointcut expression
\emph default
 are reached or to introduce a new method, attribute, or type to all 
\emph on
join points
\emph default
 specified by a 
\emph on
pointcut expression
\emph default
.
\end_layout

\begin_layout Description

\series medium
\size small
\emph on
slice
\series default
\emph default
 \InsetSpace ~

\newline
A slice is a fragment of a C++ element like a class.
 It may be used by introduction advice to implemented static extensions
 of the program.
\end_layout

\begin_layout Description

\series medium
\size small
\emph on
join\InsetSpace ~
point
\series default
\emph default
 \InsetSpace ~

\newline
In AspectC++ join points are defined as points in the component code where
 aspects can interfere.
 A join point refers to a method, an attribute, a type (class, struct, or
 union), an object, or a point from which a join point is accessed.
\end_layout

\begin_layout Description

\series medium
\size small
\emph on
pointcut
\series default
\emph default
 \InsetSpace ~

\newline
A pointcut is a set of join points described by a 
\emph on
pointcut expression
\emph default
.
\end_layout

\begin_layout Description

\series medium
\size small
\emph on
pointcut\InsetSpace ~
expression
\series default
\emph default
 \InsetSpace ~

\newline
Pointcut expressions are composed from 
\emph on
match expressions
\emph default
 used to find a set of join points, from pointcut functions used to filter
 or map specific join points from a pointcut, and from algebraic operators
 used to combine pointcuts.
\end_layout

\begin_layout Description

\series medium
\size small
\emph on
match\InsetSpace ~
expression
\series default
\emph default
 \InsetSpace ~

\newline
Match expressions are strings containing a search pattern.
\end_layout

\begin_layout Description

\series medium
\size small
\emph on
order
\series default
\InsetSpace ~

\series medium
declaration
\series default
\emph default
 \InsetSpace ~

\newline
If more than one 
\emph on
aspect
\emph default
 affects the same 
\emph on
join point
\emph default
 an 
\emph on
order declaration
\emph default
 can be used to define the order of advice code execution.
\end_layout

\begin_layout Section*

\family sans
Aspects
\end_layout

\begin_layout Standard
\noindent

\size small
Writing aspects works very similar to writing C++ class definitions.
 Aspects may define ordinary class members as well as advice.
\end_layout

\begin_layout Description

\family sans
\size small
aspect\InsetSpace ~

\series medium
\emph on
A
\series default
\emph default
\InsetSpace ~
{\InsetSpace ~
...\InsetSpace ~
}; \InsetSpace ~

\family default

\newline
defines the aspect 
\emph on
A
\end_layout

\begin_layout Description

\family sans
\size small
aspect\InsetSpace ~

\series medium
\emph on
A
\series default
\emph default
\InsetSpace ~
:\InsetSpace ~

\series medium
\emph on
public\InsetSpace ~
B
\series default
\emph default
\InsetSpace ~
{\InsetSpace ~
...\InsetSpace ~
};
\family default
 \InsetSpace ~

\newline

\emph on
A
\emph default
 inherits from class or aspect 
\emph on
B
\begin_inset ERT
status open

\begin_layout Standard


\backslash
columnbreak
\end_layout

\end_inset


\end_layout

\begin_layout Section*

\family sans
Advice Declarations
\end_layout

\begin_layout Description

\family sans
\size small
advice
\series medium
\InsetSpace ~

\emph on
pointcut
\emph default
\InsetSpace ~
:\InsetSpace ~

\series default
before
\series medium
(...)\InsetSpace ~
{...}
\family default
\series default
 \InsetSpace ~

\newline
the advice code is executed before the join points in the pointcut
\end_layout

\begin_layout Description

\family sans
\size small
advice
\series medium
\InsetSpace ~

\emph on
pointcut
\emph default
\InsetSpace ~
:\InsetSpace ~

\series default
after
\series medium
(...)\InsetSpace ~
{...}
\family default
\series default
 \InsetSpace ~

\newline
the advice code is executed after the join points in the pointcut
\end_layout

\begin_layout Description

\family sans
\size small
advice
\series medium
\InsetSpace ~

\emph on
pointcut
\emph default
\InsetSpace ~
:\InsetSpace ~

\series default
around
\series medium
(...)\InsetSpace ~
{...}
\family default
\series default
 
\family sans
\InsetSpace ~

\family default

\newline
the advice code is executed in place of the join points in the pointcut
\end_layout

\begin_layout Description

\family sans
\size small
advice
\series medium
\InsetSpace ~

\emph on
pointcut
\emph default
\InsetSpace ~
:\InsetSpace ~

\series default
order
\series medium
(
\emph on
high
\emph default
,
\family default
\series default
 
\family sans
...
\emph on
low
\emph default
)
\series bold
;
\family default
\series default

\newline

\emph on
high
\emph default
 and 
\emph on
low
\emph default
 are pointcuts, which describe sets of aspects.
 Aspects on the left side of the argument list always have a higher precedence
 than aspects on the right hand side at the join points, where the order
 declaration is applied.
\end_layout

\begin_layout Description

\family sans
\size small
advice
\series medium
\InsetSpace ~

\emph on
pointcut
\emph default
\InsetSpace ~
:\InsetSpace ~

\series default
slice
\series medium
\InsetSpace ~

\series default
class
\series medium
\InsetSpace ~
:\InsetSpace ~

\series default
public
\series medium
\InsetSpace ~

\emph on
Base
\emph default
\InsetSpace ~
{...}
\family default
\series default
 
\family sans
\InsetSpace ~

\family default

\newline
introduces a new base class 
\emph on
Base
\emph default
 and members into the target classes matched by 
\emph on
pointcut
\emph default
.
\end_layout

\begin_layout Description

\family sans
\size small
advice
\series medium
\InsetSpace ~

\emph on
pointcut
\emph default
\InsetSpace ~
:\InsetSpace ~

\series default
slice
\series medium
\InsetSpace ~

\emph on
ASlice\InsetSpace ~

\series default
\emph default
; \InsetSpace ~

\family default

\newline
introduces the slice 
\emph on
ASlice
\emph default
 into the target classes matched by 
\emph on
pointcut
\emph default
.
\end_layout

\begin_layout Section*

\family sans
Pointcut Expressions
\end_layout

\begin_layout Standard
\begin_inset VSpace 15pt*
\end_inset


\end_layout

\begin_layout Subsubsection*

\family sans
\emph on
Type Matching
\end_layout

\begin_layout Description

\family typewriter
\series medium
\size small
"int"
\family default
\series default
 \InsetSpace ~

\newline
matches the C++ built-in scalar type 
\family typewriter
int
\end_layout

\begin_layout Description

\family typewriter
\series medium
\size small
"%\InsetSpace ~
*"
\family default
\series default
 \InsetSpace ~

\newline
matches any pointer type
\end_layout

\begin_layout Subsubsection*

\family sans
\emph on
Namespace and Class Matching
\end_layout

\begin_layout Description

\family typewriter
\series medium
\size small
"Chain"
\family default
\series default
 \InsetSpace ~

\newline
matches the class, struct or union 
\emph on
Chain
\end_layout

\begin_layout Description

\family typewriter
\series medium
\size small
"Memory%"
\family default
\series default
 \InsetSpace ~

\newline
matches any class, struct or union whose name starts with 
\begin_inset Quotes eld
\end_inset

Memory
\begin_inset Quotes erd
\end_inset


\end_layout

\begin_layout Subsubsection*

\family sans
\emph on
Function Matching
\end_layout

\begin_layout Description

\family typewriter
\series medium
\size small
"void
\family default
\series default
 
\family typewriter
reset()"
\family default
 \InsetSpace ~

\newline
matches the function 
\emph on
reset
\emph default
 having no parameters and returning 
\family typewriter
void
\end_layout

\begin_layout Description

\family typewriter
\series medium
\size small
"%
\family default
\series default
 
\family typewriter
printf(...)"
\family default
 \InsetSpace ~

\newline
matches the function 
\emph on
printf
\emph default
 having any number of parameters and returning any type
\end_layout

\begin_layout Description

\family typewriter
\series medium
\size small
"%
\family default
\series default
 
\family typewriter
...::%(...)"
\family default
 \InsetSpace ~

\newline
matches any function, operator function, or type conversion function (in
 any class or namespace) 
\end_layout

\begin_layout Description

\family typewriter
\series medium
\size small
"%
\family default
\series default
 
\family typewriter
...::Service::%(...) const"
\family default
 \InsetSpace ~

\newline
matches any const member-function of the class 
\family typewriter
Service
\family default
 defined in any scope
\end_layout

\begin_layout Description

\family typewriter
\series medium
\size small
"%
\family default
\series default
 
\family typewriter
...::operator %(...)"
\family default
 \InsetSpace ~

\newline
matches any type conversion function
\end_layout

\begin_layout Description

\family typewriter
\series medium
\size small
"virtual %
\family default
\series default
 
\family typewriter
C::%(...)"
\family default
 \InsetSpace ~

\newline
matches any virtual member function of 
\family typewriter
C
\end_layout

\begin_layout Subsubsection*

\family sans
\emph on
Template Matching
\family default
\series medium
\emph default

\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
footnotemark[2]
\end_layout

\end_inset


\series default
 
\end_layout

\begin_layout Description

\family typewriter
\series medium
\size small
"std::set<...>"
\family default
\series default
 \InsetSpace ~

\newline
matches all template instances of the class 
\emph on
std::set
\end_layout

\begin_layout Description

\family typewriter
\series medium
\size small
"std::set<int>"
\family default
\series default
 \InsetSpace ~

\newline
matches only the template instance 
\emph on
std::set<int>
\emph default
 
\end_layout

\begin_layout Description

\family typewriter
\series medium
\size small
"%
\family default
\series default
 
\family typewriter
...::%<...>::%(...)"
\family default
 \InsetSpace ~

\newline
matches any member function from any template class instance in any scope
\end_layout

\begin_layout Section*

\family sans
Predefined Pointcut Functions
\end_layout

\begin_layout Standard
\begin_inset VSpace 15pt*
\end_inset


\end_layout

\begin_layout Subsubsection*

\family sans
\emph on
Functions
\end_layout

\begin_layout Description

\family sans
\size small
call
\series medium
(
\emph on
pointcut
\emph default
)
\family default
\series default
 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hfill 
\end_layout

\end_inset


\size scriptsize
N
\begin_inset Formula $\rightarrow$
\end_inset

C
\begin_inset Formula $_{C}$
\end_inset


\size small

\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
footnotemark[9]
\end_layout

\end_inset


\newline
provides all join points where a named entity in the 
\emph on
pointcut
\emph default
 is called.
\end_layout

\begin_layout Description

\family sans
\size small
execution
\series medium
(
\emph on
pointcut
\emph default
)
\family default
\series default
 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hfill 
\end_layout

\end_inset


\size scriptsize
N
\begin_inset Formula $\rightarrow$
\end_inset

C
\begin_inset Formula $_{E}$
\end_inset


\size small

\newline
provides all join points referring to the implementation of a named entity
 in the 
\emph on
pointcut
\emph default
.
\end_layout

\begin_layout Description

\family sans
\size small
construction
\series medium
(
\emph on
pointcut
\emph default
)
\family default
\series default
 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hfill 
\end_layout

\end_inset


\size scriptsize
N
\begin_inset Formula $\rightarrow$
\end_inset

C
\begin_inset Formula $_{Cons}$
\end_inset


\size small

\newline
all join points where an instance of the given class(es) is constructed.
\end_layout

\begin_layout Description

\family sans
\size small
destruction
\series medium
(
\emph on
pointcut
\emph default
)
\family default
\series default
 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hfill 
\end_layout

\end_inset


\size scriptsize
N
\begin_inset Formula $\rightarrow$
\end_inset

C
\begin_inset Formula $_{Des}$
\end_inset


\size small

\newline
all join points where an instance of the given class(es) is destructed.
\end_layout

\begin_layout Standard

\size small
\emph on
pointcut
\emph default
 may contain function names or class names.
 A class name is equivalent to the names of all functions defined within
 its scope combined with the 
\series bold
||
\series default
 operator (see below).
\begin_inset VSpace 8pt
\end_inset


\end_layout

\begin_layout Subsubsection*

\family sans
\emph on
Control Flow
\end_layout

\begin_layout Description

\family sans
\size small
cflow
\series medium
(
\emph on
pointcut
\emph default
)
\family default
\series default
 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hfill 
\end_layout

\end_inset


\size scriptsize
C
\begin_inset Formula $\rightarrow$
\end_inset

C
\size small

\newline
captures join points occuring in the dynamic execution context of join points
 in the 
\emph on
pointcut
\emph default
.
 The argument pointcut is forbidden to contain context variables or join
 points with runtime conditions (currently cflow, that, or target).
\end_layout

\begin_layout Subsubsection*

\family sans
\emph on
Types
\end_layout

\begin_layout Description

\family sans
\size small
base
\series medium
(
\emph on
pointcut
\emph default
)
\family default
\series default
 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hfill 
\end_layout

\end_inset


\size scriptsize
N
\begin_inset Formula $\rightarrow$
\end_inset

N
\begin_inset Formula $_{C,F}$
\end_inset


\size small

\newline
returns all base classes resp.\InsetSpace ~
redefined functions of classes in the 
\emph on
pointcut
\emph default
 
\end_layout

\begin_layout Description

\family sans
\size small
derived
\series medium
(
\emph on
pointcut
\emph default
)
\family default
\series default
 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hfill 
\end_layout

\end_inset


\size scriptsize
N
\begin_inset Formula $\rightarrow$
\end_inset

N
\begin_inset Formula $_{C,F}$
\end_inset


\size small

\newline
returns all classes in the 
\emph on
pointcut
\emph default
 and all classes derived from them resp.\InsetSpace ~
all redefined functions of derived
 classes
\end_layout

\begin_layout Subsubsection*

\family sans
\emph on
Scope
\end_layout

\begin_layout Description

\family sans
\size small
within
\series medium
(
\emph on
pointcut
\emph default
)
\family default
\series default
 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hfill 
\end_layout

\end_inset


\size scriptsize
N
\begin_inset Formula $\rightarrow$
\end_inset

C
\size small

\newline
filters all join points that are within the functions or classes in the
 
\emph on
pointcut
\end_layout

\begin_layout Subsubsection*

\family sans
\emph on
Context
\end_layout

\begin_layout Description

\family sans
\size small
that
\series medium
(
\emph on
type\InsetSpace ~
pattern
\emph default
)
\family default
\series default
 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hfill 
\end_layout

\end_inset


\size scriptsize
N
\begin_inset Formula $\rightarrow$
\end_inset

C
\size small

\newline
returns all join points where the current C++ 
\family typewriter
this
\family default
 pointer refers to an object which is an instance of a type that is compatible
 to the type described by the 
\emph on
type pattern
\end_layout

\begin_layout Description

\family sans
\size small
target
\series medium
(
\emph on
type\InsetSpace ~
pattern
\emph default
)
\family default
\series default
 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hfill 
\end_layout

\end_inset


\size scriptsize
N
\begin_inset Formula $\rightarrow$
\end_inset

C
\size small

\newline
returns all join points where the target object of a call is an instance
 of a type that is compatible to the type described by the 
\emph on
type pattern
\end_layout

\begin_layout Description

\family sans
\size small
result
\series medium
(
\emph on
type\InsetSpace ~
pattern
\emph default
)
\family default
\series default
 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hfill 
\end_layout

\end_inset


\size scriptsize
N
\begin_inset Formula $\rightarrow$
\end_inset

C
\size small

\newline
returns all join points where the result object of a call/execution is an
 instance of a type described by the 
\emph on
type pattern
\end_layout

\begin_layout Description

\family sans
\size small
args
\series medium
(
\emph on
type\InsetSpace ~
pattern
\emph default
,\InsetSpace ~
...)
\family default
\series default
 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hfill 
\end_layout

\end_inset


\size scriptsize
(N,...)
\begin_inset Formula $\rightarrow$
\end_inset

C
\size small

\newline
a list of 
\emph on
type patterns
\emph default
 is used to provide all joinpoints with matching argument signatures
\end_layout

\begin_layout Standard

\size small
Instead of the 
\emph on
type pattern
\emph default
 it is possible here to pass the name of a 
\series bold
context variable
\series default
 to which the context information is bound.
 In this case the type of the variable is used for the type matching.
\end_layout

\begin_layout Standard
\begin_inset VSpace 15pt*
\end_inset


\end_layout

\begin_layout Subsubsection*

\family sans
\emph on
Algebraic Operators
\end_layout

\begin_layout Description

\family sans
\series medium
\size small
\emph on
pointcut
\series default
\emph default
\InsetSpace ~
&&
\series medium
\emph on
\InsetSpace ~
pointcut
\family default
\series default
\emph default
 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hfill 
\end_layout

\end_inset


\size scriptsize
(N,N)
\begin_inset Formula $\rightarrow$
\end_inset

N, (C,C)
\begin_inset Formula $\rightarrow$
\end_inset

C
\size small

\newline
intersection of the join points in the 
\emph on
pointcuts
\end_layout

\begin_layout Description

\family sans
\series medium
\size small
\emph on
pointcut
\series default
\emph default
\InsetSpace ~
||
\series medium
\emph on
\InsetSpace ~
pointcut
\family default
\series default
\emph default
 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hfill 
\end_layout

\end_inset


\size scriptsize
(N,N)
\begin_inset Formula $\rightarrow$
\end_inset

N, (C,C)
\begin_inset Formula $\rightarrow$
\end_inset

C
\size small

\newline
union of the join points in the 
\emph on
pointcuts
\end_layout

\begin_layout Description

\family sans
\size small
!
\series medium
\emph on
\InsetSpace ~
pointcut
\family default
\series default
\emph default
 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hfill 
\end_layout

\end_inset


\size scriptsize
N
\begin_inset Formula $\rightarrow$
\end_inset

N, C
\begin_inset Formula $\rightarrow$
\end_inset

C
\size small

\newline
exclusion of the join points in the 
\emph on
pointcut
\end_layout

\begin_layout Section*

\family sans
JoinPoint-API
\end_layout

\begin_layout Standard

\size small
The JoinPoint-API is provided within every advice code body by the built-in
 object 
\series bold
tjp
\series default
 of class 
\series bold
JoinPoint
\series default
.
\begin_inset VSpace 15pt
\end_inset


\end_layout

\begin_layout Subsubsection*

\family sans
\emph on
Compile-time Types and Constants
\end_layout

\begin_layout Description

\family sans
\series medium
\size small
\emph on
That
\family default
\series default
\emph default
 
\family sans
\size scriptsize
\InsetSpace ~

\family default
\size small

\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hfill 
\end_layout

\end_inset


\family sans
\size scriptsize
[type]
\family default
\size small

\newline
object type (object initiating a call)
\end_layout

\begin_layout Description

\family sans
\series medium
\size small
\emph on
Target
\family default
\series default
\emph default
 
\family sans
\size scriptsize
\InsetSpace ~

\family default
\size small

\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hfill 
\end_layout

\end_inset


\family sans
\size scriptsize
[type]
\family default
\size small

\newline
target object type (target object of a call)
\end_layout

\begin_layout Description

\family sans
\series medium
\size small
\emph on
Result
\family default
\series default
\emph default
 
\family sans
\size scriptsize
\InsetSpace ~

\family default
\size small

\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hfill 
\end_layout

\end_inset


\family sans
\size scriptsize
[type]
\family default
\size small

\newline
type of the object, which is used to 
\emph on
store
\emph default

\newline
the result of the affected function
\end_layout

\begin_layout Description

\family sans
\series medium
\size small
\emph on
Res::Type,
\family default
\series default
\emph default
 
\family sans
\emph on
Res::ReferredType
\family default
\emph default
 
\family sans
\size scriptsize
\InsetSpace ~

\family default
\size small

\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hfill 
\end_layout

\end_inset


\family sans
\size scriptsize
[type]
\family default
\size small

\newline
result type of the affected function
\end_layout

\begin_layout Description

\family sans
\series medium
\size small
\emph on
Arg<i>::Type,
\family default
\series default
\emph default
 
\family sans
\emph on
Arg<i>::ReferredType
\family default
\emph default
 
\family sans
\size scriptsize
\InsetSpace ~

\family default
\size small

\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hfill 
\end_layout

\end_inset


\family sans
\size scriptsize
[type]
\family default
\size small

\newline
type of the 
\begin_inset ERT
status inlined

\begin_layout Standard

$i^{
\backslash
,th}$
\end_layout

\end_inset

 argument of the affected
\newline
function (with 
\begin_inset ERT
status inlined

\begin_layout Standard

$0 
\backslash
leq i < ARGS$
\end_layout

\end_inset

)
\end_layout

\begin_layout Description

\family sans
\series medium
\size small
\emph on
ARGS
\family default
\series default
\emph default
 
\family sans
\size scriptsize
\InsetSpace ~

\family default
\size small

\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hfill 
\end_layout

\end_inset


\family sans
\size scriptsize
[const]
\family default
\size small

\newline
number of arguments
\end_layout

\begin_layout Description

\family sans
\series medium
\size small
\emph on
JPID
\family default
\series default
\emph default
 
\family sans
\size scriptsize
\InsetSpace ~

\family default
\size small

\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hfill 
\end_layout

\end_inset


\family sans
\size scriptsize
[const]
\family default
\size small

\newline
unique numeric identifier for this join point
\end_layout

\begin_layout Description

\family sans
\series medium
\size small
\emph on
JPTYPE
\family default
\series default
\emph default
 
\family sans
\size scriptsize
\InsetSpace ~

\family default
\size small

\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hfill 
\end_layout

\end_inset


\family sans
\size scriptsize
[const]
\family default
\size small

\newline
numeric identifier describing the type of this join point (
\family sans
\emph on
AC::CALL
\family default
, 
\family sans
AC::EXECUTION
\family default
\emph default
, 
\family sans
AC::CONSTRUCTION
\family default
, or 
\family sans
AC::DESTRUCTION
\family default
) 
\end_layout

\begin_layout Standard
\begin_inset VSpace 6pt*
\end_inset


\end_layout

\begin_layout Subsubsection*

\family sans
\emph on
Runtime Functions and State
\end_layout

\begin_layout Description

\family sans
\series medium
\size small
\emph on
static\InsetSpace ~
const\InsetSpace ~
char
\series default
\InsetSpace ~

\series medium
*
\series default
\emph default
signature
\series medium
()
\family default
\series default
 
\size scriptsize
\InsetSpace ~

\size small

\newline
gives a textual description of the join point (function name, class name,
 ...)
\end_layout

\begin_layout Description

\family sans
\series medium
\size small
\emph on
That\InsetSpace ~
*
\series default
\emph default
that
\series medium
()
\family default
\series default
 
\family sans
\size scriptsize
\InsetSpace ~

\family default
\size small

\newline
returns a pointer to the object initiating a call or 0 if it is a static
 method or a global function
\end_layout

\begin_layout Description

\family sans
\series medium
\size small
\emph on
Target\InsetSpace ~
*
\series default
\emph default
target
\series medium
()
\family default
\series default
 
\family sans
\size scriptsize
\InsetSpace ~

\family default
\size small

\newline
returns a pointer to the object that is the target of a call or 0 if it
 is a static method or a global function
\end_layout

\begin_layout Description

\family sans
\series medium
\size small
\emph on
Result
\emph default
\InsetSpace ~

\emph on
*
\series default
\emph default
result
\series medium
()
\family default
\series default
 
\family sans
\size scriptsize
\InsetSpace ~

\family default
\size small

\newline
returns a typed pointer to the result value or 0 if the function has no
 result value
\end_layout

\begin_layout Description

\family sans
\series medium
\size small
\emph on
Arg<i>::ReferredType\InsetSpace ~
*
\series default
\emph default
arg
\series medium
\emph on
<i>
\emph default
()
\family default
\series default
 
\family sans
\size scriptsize
\InsetSpace ~

\family default
\size small

\newline
returns a typed pointer to the 
\begin_inset ERT
status inlined

\begin_layout Standard

$i^{
\backslash
,th}$
\end_layout

\end_inset

 argument value (with 
\begin_inset ERT
status inlined

\begin_layout Standard

$0 
\backslash
leq i < ARGS$
\end_layout

\end_inset

)
\end_layout

\begin_layout Description

\family sans
\series medium
\size small
\emph on
void\InsetSpace ~
*
\series default
\emph default
arg
\series medium
(
\emph on
int
\series default
\InsetSpace ~

\series medium
\emph default
i)
\family default
\series default
 
\family sans
\size scriptsize
\InsetSpace ~

\family default
\size small

\newline
returns a pointer to the memory position holding the argument value with
 index 
\emph on
i
\end_layout

\begin_layout Description

\family sans
\series medium
\size small
\emph on
void\InsetSpace ~

\series default
\emph default
proceed
\series medium
()
\family default
\series default
 
\family sans
\size scriptsize
\InsetSpace ~

\family default
\size small

\newline
executes the original code in an around advice (should be called at most
 once in around advice)
\end_layout

\begin_layout Description

\family sans
\series medium
\size small
\emph on
AC::Action\InsetSpace ~
&
\series default
\emph default
action
\series medium
()
\family default
\series default
 
\family sans
\size scriptsize
\InsetSpace ~

\family default
\size small

\newline
returns the runtime action object containing the execution environment to
 execute ( 
\emph on
trigger()
\emph default
 ) the original code encapsulated by an around advice
\end_layout

\begin_layout Standard
\begin_inset VSpace 6pt*
\end_inset


\end_layout

\begin_layout Subsubsection*

\family sans
\emph on
Runtime Type Information
\end_layout

\begin_layout Description

\family sans
\series medium
\size small
\emph on
static\InsetSpace ~
AC::Type\InsetSpace ~

\series default
\emph default
resulttype
\series medium
()
\end_layout

\begin_layout Description

\family sans
\series medium
\size small
\emph on
static\InsetSpace ~
AC::Type\InsetSpace ~

\series default
\emph default
argtype
\series medium
(
\emph on
int
\series default
\InsetSpace ~

\series medium
\emph default
i)
\family default
\series default
 
\size scriptsize
\InsetSpace ~

\size small

\newline
return a C++ ABI V3 conforming string representation of the result type
 / argument type of the affected function
\end_layout

\begin_layout Section*

\family sans
Example
\end_layout

\begin_layout Standard

\size small
A reusable tracing aspect.
 
\end_layout

\begin_layout Standard
\begin_inset VSpace medskip*
\end_inset


\end_layout

\begin_layout Standard
\noindent
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hspace{-24pt}
\end_layout

\end_inset


\begin_inset Box Frameless
position "t"
hor_pos "c"
has_inner_box 1
inner_pos "t"
use_parbox 0
width "100text%"
special "none"
height "1pt"
height_special "totalheight"
status open

\begin_layout LyX-Code
\noindent

\family sans
\series bold
aspect
\family default
\series default
 
\family sans
Trace {
\end_layout

\begin_layout LyX-Code

\family sans
\series bold
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hspace{10pt} 
\end_layout

\end_inset

pointcut
\series default
 virtual functions() = 0;
\end_layout

\begin_layout LyX-Code

\family sans
\series bold
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hspace{10pt} 
\end_layout

\end_inset

advice
\series default
 
\series bold
execution
\series default
(functions()) : 
\series bold
around
\series default
() {
\end_layout

\begin_layout LyX-Code

\family sans
\series bold
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hspace{20pt} 
\end_layout

\end_inset


\series default
cout <
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hspace{-1pt}
\end_layout

\end_inset

< "before " <
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hspace{-1pt}
\end_layout

\end_inset

< 
\series bold
JoinPoint
\series default
::
\series bold
signature
\series default
() <
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hspace{-1pt}
\end_layout

\end_inset

< "(";
\end_layout

\begin_layout LyX-Code

\family sans
\series bold
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hspace{20pt} 
\end_layout

\end_inset


\series default
for (unsigned i = 0; i < 
\series bold
JoinPoint
\series default
::
\series bold
ARGS
\series default
; i++)
\end_layout

\begin_layout LyX-Code

\family sans
\series bold
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hspace{30pt} 
\end_layout

\end_inset


\series default
cout <
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hspace{-1pt}
\end_layout

\end_inset

< (i ? ", " : "") <
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hspace{-1pt}
\end_layout

\end_inset

< 
\series bold
JoinPoint
\series default
::
\series bold
argtype
\series default
(i);
\end_layout

\begin_layout LyX-Code

\family sans
\series bold
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hspace{20pt} 
\end_layout

\end_inset


\series default
cout <
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hspace{-1pt}
\end_layout

\end_inset

< ")" <
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hspace{-1pt}
\end_layout

\end_inset

< endl;
\end_layout

\begin_layout LyX-Code

\family sans
\series bold
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hspace{20pt} 
\end_layout

\end_inset

tjp
\series default
->
\series bold
proceed
\series default
();
\end_layout

\begin_layout LyX-Code

\family sans
\series bold
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hspace{20pt} 
\end_layout

\end_inset


\series default
cout <
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hspace{-1pt}
\end_layout

\end_inset

< "after" <
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hspace{-1pt}
\end_layout

\end_inset

< endl;
\end_layout

\begin_layout LyX-Code

\family sans
\series bold
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hspace{10pt} 
\end_layout

\end_inset


\series default
} 
\end_layout

\begin_layout LyX-Code

\family sans
};
\end_layout

\end_inset


\end_layout

\begin_layout Standard
\begin_inset VSpace bigskip*
\end_inset


\end_layout

\begin_layout Standard
\noindent

\size small
In a derived aspect the pointcut 
\emph on
functions
\emph default
 may be redefined to apply the aspect to the desired set of functions.
\end_layout

\begin_layout Standard
\begin_inset VSpace medskip
\end_inset


\end_layout

\begin_layout Standard
\noindent
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hspace{-24pt}
\end_layout

\end_inset


\begin_inset Box Frameless
position "t"
hor_pos "c"
has_inner_box 1
inner_pos "t"
use_parbox 0
width "100text%"
special "none"
height "1pt"
height_special "totalheight"
status open

\begin_layout LyX-Code
\noindent

\family sans
\series bold
aspect
\family default
\series default
 
\family sans
TraceMain : public Trace {
\end_layout

\begin_layout LyX-Code

\family sans
\series bold
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hspace{10pt} 
\end_layout

\end_inset

pointcut
\series default
 functions() = "% main(...)";
\end_layout

\begin_layout LyX-Code

\family sans
};
\end_layout

\end_inset


\end_layout

\begin_layout Standard
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
vfill
\backslash
vfill
\backslash
vfill
\backslash
vfill
\end_layout

\end_inset


\end_layout

\begin_layout Standard
\noindent

\size small
This is a reference sheet corresponding to AspectC++ 1.0pre3.
\newline
 Version 1.11,
 
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
today
\end_layout

\end_inset

.
\end_layout

\begin_layout Standard

\size small
\InsetSpace ~

\newline
(c) Copyright 2006 pure-systems GmbH, Olaf Spinczyk and Daniel Lohmann.
 All rights reserved.
\end_layout

\begin_layout Standard
\begin_inset VSpace bigskip
\end_inset


\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
hrule width 4.6cm
\end_layout

\end_inset


\end_layout

\begin_layout Standard
\begin_inset VSpace 2pt*
\end_inset


\end_layout

\begin_layout Standard
\noindent

\series medium
\begin_inset ERT
status open

\begin_layout Standard


\backslash
footnotemark[2]
\end_layout

\end_inset


\series default
\size scriptsize
support for template instance matching is an experimental feature
\end_layout

\begin_layout Standard
\begin_inset VSpace -1pt*
\end_inset


\end_layout

\begin_layout Standard
\noindent

\series medium
\begin_inset ERT
status open

\begin_layout Standard


\backslash
footnotemark[8]
\end_layout

\end_inset


\series default
\size scriptsize

\begin_inset LatexCommand url
target "http://www.codesourcery.com/cxx-abi/abi.html#mangling"

\end_inset


\end_layout

\begin_layout Standard
\begin_inset VSpace -1pt*
\end_inset


\end_layout

\begin_layout Standard
\noindent

\series medium
\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
footnotemark[9]
\end_layout

\end_inset


\series default
\size scriptsize
C, C
\begin_inset Formula $_{\textrm{C}}$
\end_inset

, C
\begin_inset Formula $_{\textrm{E}}$
\end_inset

, C
\begin_inset Formula $_{Cons}$
\end_inset

, C
\begin_inset Formula $_{Des}$
\end_inset

: Code (any, only 
\emph on
\bar under
C
\bar default
all
\emph default
, only 
\emph on
\bar under
E
\bar default
xecution
\emph default
, only object 
\emph on
\bar under
Cons
\bar default
truction
\emph default
, only object 
\emph on
\bar under
Des
\bar default
truction
\emph default
); N, N
\begin_inset Formula $_{N}$
\end_inset

, N
\begin_inset Formula $_{C}$
\end_inset

, N
\begin_inset Formula $_{F}$
\end_inset

, N
\begin_inset Formula $_{T}$
\end_inset

: Names (any, only 
\emph on
\bar under
N
\bar default
amespace
\emph default
, only 
\emph on
\bar under
C
\bar default
lass
\emph default
, only 
\emph on
\bar under
F
\bar default
unction
\emph default
, only 
\emph on
\bar under
T
\bar default
ype
\emph default
)
\end_layout

\begin_layout Standard
\begin_inset VSpace -32pt*
\end_inset


\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
end{multicols*}
\end_layout

\end_inset


\end_layout

\end_body
\end_document
