#LyX 1.5.2 created this file. For more info see http://www.lyx.org/
\lyxformat 276
\begin_document
\begin_header
\textclass article
\begin_preamble
\usepackage{a4}
%--------------------------------------------------------------------
% PDF related
%--------------------------------------------------------------------
\newif\ifpdf 
\ifx\pdfoutput\undefined 
  \pdffalse                     % we are not running PDFLaTeX 
\else 
  \pdfoutput=1                % we are running PDFLaTeX 
  \pdftrue 
\fi

%--------------------------------------------------------------------
% setup hyperref
%--------------------------------------------------------------------
\ifpdf
  \usepackage{color}
  \pagecolor{white}
  \usepackage{hyperref}  
  \hypersetup{% 
    %
    %% general document information
    pdftitle          = {AC++ Compiler Manual}, 
    pdfsubject     = {Dokumentation}, 
    pdfkeywords  = {AOP, AspectC++, ac++, pure-systems}, 
    pdfauthor      = {\textcopyright\ pure-systems GmbH and Olaf Spinczyk}, 
    pdfcreator     = {\LaTeX\ with package \flqq hyperref\frqq},
    pdfproducer  = {pdfTeX-0.\the\pdftexversion\pdftexrevision},
    %
    %% document style
    colorlinks=true,                  % colored link
    urlcolor=blue,                    % blue URL links
    bookmarks=true,                % generate bookmarks
    bookmarksnumbered=true,  % generate section numbers
    pdfpagemode=None           % don't open bookmarks
  } 
  
  %% set document creation date to 13.03.2006 00:00
  \pdfinfo {/CreationDate (D:20061303000000)}
\fi

%--------------------------------------------------------------------
% create hyperrefs depending on the use of pdflatex
%--------------------------------------------------------------------
\newcommand\depref[2]{%
  \ifpdf
    \href{#1}{#2}
  \else  
    {#2}
  \fi
}

%--------------------------------------------------------------------
% setup pure-systems style
%--------------------------------------------------------------------
\usepackage{floatflt}
\usepackage{../styles/pure-systems}
\doctype{Documentation:}
\credit{
  \noindent\small{(c) 2002-2006 Olaf Spinczyk and pure-systems GmbH\\All rights reserved.}}
\pslogo{
  \resizebox{6cm}{!}{\includegraphics{../images/ps-logo}}}
\otherlogo{
  \resizebox{4cm}{!}{\includegraphics{../images/ac++logo}}}
\sloppy
\remark{
  \small{(c) 2002-2006 Olaf Spinczyk$^1$ and pure-systems GmbH$^2$\\~\\
$^1$os@aspectc.org\\
http://www.aspectc.org\\~\\
$^2$aspectc@pure-systems.com\\
http://www.pure-systems.com\\
Agnetenstr. 14\\
39106 Magdeburg\\
Germany
}}
\version{1.1, \today}

% less than one half space between lines
\setstretch{1.15}
\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 12
\spacing onehalf
\papersize default
\use_geometry false
\use_amsmath 1
\use_esint 0
\cite_engine basic
\use_bibtopic false
\paperorientation portrait
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\papercolumns 1
\papersides 2
\paperpagestyle default
\tracking_changes false
\output_changes false
\author "" 
\end_header

\begin_body

\begin_layout Title

\emph on
AC++ Compiler Manual
\end_layout

\begin_layout Author

\size largest
and Olaf Spinczyk
\end_layout

\begin_layout Standard
\begin_inset LatexCommand tableofcontents

\end_inset


\begin_inset ERT
status collapsed

\begin_layout Standard


\backslash
clearpage
\end_layout

\end_inset


\end_layout

\begin_layout Section

\family sans
\begin_inset LatexCommand label
name "sec:Introduction"

\end_inset


\family default
Introduction
\end_layout

\begin_layout Standard
The program 
\family typewriter
ac++
\family default
 is a compiler for the AspectC++ programming language.
 It is implemented is a preprocessor that transforms AspectC++ code into
 ordinary C++ code.
 During this transformation aspect code, which is defined by aspects, is
 woven statically into the component code.
 Aspects are a special AspectC++ language element, which can be used to
 implement crosscutting concerns in separate modules.
 Aspect definitions have to be implemented in special 
\begin_inset Quotes eld
\end_inset

aspect header files
\begin_inset Quotes erd
\end_inset

, which normally have the filename extension 
\begin_inset Quotes eld
\end_inset

.ah
\begin_inset Quotes erd
\end_inset

.
 After the code transformation the output of 
\family typewriter
ac++
\family default
 can be compiled to executable code with ordinary C++ compilers like GNU
 
\family typewriter
g++
\family default
, or Microsoft VisualC++.
\end_layout

\begin_layout Standard
More details about the features of the AspectC++ can be found in the in
 the quick reference sheet and the publications about the language and its
 application.
 Everything is available on the 
\begin_inset LatexCommand htmlurl
name "AspectC++ homepage"
target "http://www.aspectc.org"

\end_inset

, which is also a source for updates of this manual.
\end_layout

\begin_layout Standard
The compiler's source code is freely available from the project's web site
 and covered by the GPL.
 For your convenience there are also binary versions of the open source
 implementation available.
 Besides the free GPL version, commercial licenses for 
\family typewriter
ac++
\family default
, the underlying parser and code manipulator library and the 
\family typewriter
ac++
\family default
 integration into the MS Visual Studio IDE as well as commercial support
 are available from pure-systems GmbH
\begin_inset Foot
status open

\begin_layout Standard
\begin_inset LatexCommand url
target "http://www.pure-systems.com/"

\end_inset


\end_layout

\end_inset

.
\end_layout

\begin_layout Standard
This document focuses on how the 
\family typewriter
ac++
\family default
 compiler works and how it is used.
 The following sections are structured as follows: Section 
\begin_inset LatexCommand ref
reference "sec:install"

\end_inset

 describes how to get and install the compiler.
 It is followed by section 
\begin_inset LatexCommand ref
reference "sec:Invocation"

\end_inset

, which describes the two transformation modes of 
\family typewriter
ac++
\family default
 and the meaning of the command line arguments.
 Platform-specific notes are given in section 
\begin_inset LatexCommand ref
reference "sec:Platform-Notes"

\end_inset

.
 It describes the specifics of the ac++ ports and which non-standard features
 of the back-end C++ compiler are supported.
 Section 
\begin_inset LatexCommand ref
reference "sec:Problems"

\end_inset

 lists some known problems, common pitfalls, and unimplemented language
 features.
\end_layout

\begin_layout Section
\begin_inset LatexCommand label
name "sec:install"

\end_inset

Download and Installation
\end_layout

\begin_layout Standard
Binaries of 
\family typewriter
ac++
\family default
 for various platforms are available for free download from the AspectC++
 homepage (see section 
\begin_inset LatexCommand ref
reference "sec:Platform-Notes"

\end_inset

 for the list and state of the 
\family typewriter
ac++
\family default
 ports).
 The versioning scheme is shown in table 
\begin_inset LatexCommand vref
reference "tab:versioning"

\end_inset

.
\end_layout

\begin_layout Standard
\begin_inset Float table
placement H
wide false
sideways false
status open

\begin_layout Standard
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="4" columns="3">
<features>
<column alignment="center" valignment="top" leftline="true" width="0in">
<column alignment="center" valignment="top" leftline="true" width="0">
<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\series bold
Scheme
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\series bold
Example
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\series bold
Kind of Release/Meaning
\end_layout

\end_inset
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
<version>.<release>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
0.7
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
A regular release 0.7.
\end_layout

\end_inset
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
<version>.<release>.<fix-no>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
0.7.3
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
Bug fix release number 3 of 0.7
\end_layout

\end_inset
</cell>
</row>
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
<version>.<release>pre<no>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
0.8pre1
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
Pre-Release number 1 for 0.8
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
\begin_inset Caption

\begin_layout Standard
\begin_inset LatexCommand label
name "tab:versioning"

\end_inset

Versioning scheme
\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Standard
Besides the archive file with the compiler there is a README file and a
 CHANGELOG file available for each release.
 The README file explains the necessary steps for the installation, while
 the CHANGELOG documents the changes in the corresponding release as well
 as the history of changes.
\end_layout

\begin_layout Standard
The following subsections explain how the current version of the 
\family typewriter
ac++
\family default
 compiler is unpacked, installed, and configured.
 This process depends on the development platform.
 Skip to the appropriate part from here.
\end_layout

\begin_layout Subsection
\begin_inset LatexCommand label
name "sec:unix_install"

\end_inset

Linux, Solaris, and MacOS X
\end_layout

\begin_layout Standard
The Linux, Solaris, and MacOS X installation procedures are very similar,
 because all of them belong to the UNIX system family.
 The 
\family typewriter
ac++
\family default
 compiler and the example code is provided in a 
\family typewriter
gzip
\family default
-ed 
\family typewriter
tar
\family default
 archive (tgz file).
 Note that on Solaris the GNU tar command 
\family typewriter
gtar
\family default
 must be used instead of the Solaris 
\family typewriter
tar
\family default
 to unpack the archive.
 On Linux and MacOS the archive can be unpacked with the following command
 in any directory:
\end_layout

\begin_layout LyX-Code
tar xzvf <tar-file-name>
\end_layout

\begin_layout Standard
The command creates a directory aspectc++-<version>, which contains the
 
\family typewriter
ac++
\family default
 binary, the 
\family typewriter
ag++
\family default
 front-end, the example code, and everything else that is needed to run
 the examples like a Makefile.
 To transform the examples (in the 
\family typewriter
examples
\family default
 directory) simply execute 
\family typewriter
make
\family default
 in the installation directory.
 Each example is then transformed from AspectC++ code into C++ code by weaving
 aspects and saved in 
\family typewriter
examples/<name>-out
\family default
.
 To run the example, enter the created directory, call 
\family typewriter
make
\family default
 and start the executable.
\end_layout

\begin_layout Standard
The 
\family typewriter
Makefile
\family default
, which is used to compile the examples uses the command 
\family typewriter
ag++
\family default
, which is a wrapper for calling 
\family typewriter
ac++
\family default
, 
\family typewriter
g++
\family default
, and for the generation of the parser configuration file, which is needed
 for 
\family typewriter
ac++
\family default
.
 A separate manual for 
\family typewriter
ag++
\family default
 is available from the AspectC++ web site.
\end_layout

\begin_layout Subsection
Windows
\end_layout

\begin_layout Standard
The Windows port of 
\family typewriter
ac++
\family default
 supports the freely available Cygwin/GNU 
\family typewriter
g++
\family default
, MinGW 
\family typewriter
g++
\family default
, and MS Visual C++ compiler
\begin_inset Foot
status collapsed

\begin_layout Standard
\begin_inset LatexCommand url
target "http://www.borland.com/"

\end_inset

.
 Note that Borland C++ will probably be discontinued in the near future.
\end_layout

\end_inset

 as back-end compilers.
\end_layout

\begin_layout Standard
The installation of 
\family typewriter
ac++
\family default
 in an environment with GNU 
\family typewriter
g++
\family default
 and 
\family typewriter
make
\family default
 is similar to the UNIX-like installation described in section 
\begin_inset LatexCommand ref
reference "sec:unix_install"

\end_inset

.
 Additionally refer to section 
\begin_inset LatexCommand vref
reference "sec:cygwin_back_end"

\end_inset

, which provides some specific information about path names in the Cygwin
 environment.
\end_layout

\begin_layout Standard
A comfortable integration of 
\family typewriter
ac++
\family default
 into the Visual Studio .NET IDE is available by pure-systems GmbH
\begin_inset Foot
status collapsed

\begin_layout Standard
an evaluation version can be downloaded from 
\begin_inset LatexCommand url
target "http://www.pure-systems.com/"

\end_inset


\end_layout

\end_inset

.
 The following procedure outlines the installation for windows command line
 compilers.
\end_layout

\begin_layout Standard
The 
\family typewriter
ac++
\family default
 compiler and the examples are provided in a ZIP archive.
 Unpack 
\family typewriter
ac++
\family default
 in a directory of your choice, for instance into 
\family typewriter
C:
\backslash
AC
\family default
.
 The next step is to create a parser configuration file that describes predefine
d macros and standard include file paths of you back-end compiler.
 The files 
\family typewriter
pumabc55.cfg
\family default
 and 
\family typewriter
pumavc7.cfg
\family default
 can be taken as examples.
 An automatic generation of the config file as under UNIX systems is not
 available at the moment in the free 
\family typewriter
ac++
\family default
 version.
\end_layout

\begin_layout Standard
The examples directory contains various examples that show how to write
 aspects in AspectC++.
 You can use the 
\family typewriter
examples.bat
\family default
 batch file to weave all the examples at once.
 After this step the transformed example files can compiled.
\end_layout

\begin_layout Section

\family sans
\begin_inset LatexCommand label
name "sec:Invocation"

\end_inset


\family default
Invocation
\end_layout

\begin_layout Subsection
Modes
\end_layout

\begin_layout Standard
The 
\family typewriter
ac++
\family default
 compiler support two major transformation modes:
\end_layout

\begin_layout Subsubsection
Whole ProgramTransformation (WPT) 
\end_layout

\begin_layout Standard
WPT mode was the first transformation mode of 
\family typewriter
ac++
\family default
.
 However, it is not obsolete, because it may be useful in many cases.
 In this mode 
\family typewriter
ac++
\family default
 transforms all files in a project directory tree (or set of directories)
 and saves the result in a different directory tree.
 For each translation unit and header file a new file is generated in the
 target tree with the same name.
 If further transformations of the source code have to be done, either with
 
\family typewriter
ac++
\family default
 or other tools, this is the mode to choose.
 Even comments and whitespace remain untouched.
\end_layout

\begin_layout Standard
The compiler performs a simple dependency check in WPT mode.
 A translation unit is recompiled if either the translation unit itself
 or any header file of the project has been changed.
 This is not very precise but make sure that after changing an aspect header
 file all translation units are recompiled.
\end_layout

\begin_layout Subsubsection
Single Translation Unit (STU)
\end_layout

\begin_layout Standard
The new STU mode was introduced with 
\family typewriter
ac++
\family default
 version 0.7pre1.
 Here 
\family typewriter
ac++
\family default
 must be called once for each translation unit like a normal C++ compiler.
 This makes it easier to integrate 
\family typewriter
ac++
\family default
 into Makefiles or IDEs.
 As 
\family typewriter
ac++
\family default
 can't save manipulated header files in this mode, because the unchanged
 header files are needed for the next translation units, all #include directives
 in the translation unit that refer to header files of the project directory
 tree are expanded and, thus, saved together with the manipulated translation
 unit.
 The resulting files can be fed directly into a C++ compiler.
 They do not depend on any other files of the project anymore.
\end_layout

\begin_layout Standard
In the STU mode the user is responsible for checking the dependencies of
 changed files and for calling the right 
\family typewriter
ac++
\family default
 to transform all translation units that depend on a changed file.
 The general dependency rule is that a translation unit depends on every
 header file that is directly or indirectly include and every aspect header
 that might affect the translation unit (normally all!) and the files they
 depend on.
 If you are using 
\family typewriter
g++
\family default
 and 
\family typewriter
make
\family default
, checking of this rule can be automized:
\end_layout

\begin_layout LyX-Code
g++ -E -I<some-path> -MM <trans-unit> -include "*.ah"
\end_layout

\begin_layout Standard
This call of the 
\family typewriter
g++
\family default
 preprocessor prints a makefile dependency rule, which is suitable to determine
 when 
\family typewriter
ac++
\family default
 must be run to rebuild a tranlsation unit.
\end_layout

\begin_layout Subsection
\begin_inset LatexCommand label
name "sec:library"

\end_inset

Weaving in Library Code
\end_layout

\begin_layout Standard
A C++ library consists of header files that have to be included by the client
 code and an archive file that contains the object code.
 If the library is implemented in AspectC++ and the client code should not
 be compiled with 
\family typewriter
ac++
\family default
 it is necessary to generate manipulated header files.
 In the WPT mode this is done anyway.
 In the STU a directory tree with all manipulated headers can be generated
 with the 
\family typewriter
-i
\family default
 option (see 
\begin_inset LatexCommand vref
reference "sec:option_i"

\end_inset

).
\end_layout

\begin_layout Subsection
Options
\end_layout

\begin_layout Standard
Table 
\begin_inset LatexCommand vref
reference "tab:options"

\end_inset

 summarizes the platform-independent options supported by 
\family typewriter
ac++
\family default
.
 Platform specific options will be explained in section 
\begin_inset LatexCommand ref
reference "sec:Platform-Notes"

\end_inset

.
 All options can either be passed as command line arguments or by the configurat
ion file
\begin_inset Foot
status open

\begin_layout Standard
In the current ac++ version some of these options are not allowed in the
 config file, namely all between 
\family typewriter
-v
\family default
 and 
\family typewriter
--no_problem...
\family default
.
 This problem will be fixed soon.
\end_layout

\end_inset

, which is referenced by the environment variable PUMA_CONFIG (see section
 
\begin_inset LatexCommand ref
reference "sec:install"

\end_inset

).
 '--' in any of the columns WPT or STU means that this option has no meaning
 in the corresponding translation mode.
\end_layout

\begin_layout Standard
The upper part of the table lists 
\family typewriter
ac++
\family default
-specific options, while the options in the lower part are widely-known
 from other compilers like 
\family typewriter
g++
\family default
.
\end_layout

\begin_layout Standard
\begin_inset Float table
wide false
sideways false
status open

\begin_layout Standard
\align center
\begin_inset Tabular
<lyxtabular version="3" rows="22" columns="4">
<features>
<column alignment="center" valignment="top" leftline="true" width="0">
<column alignment="center" valignment="top" leftline="true" width="0">
<column alignment="center" valignment="top" leftline="true" width="0">
<column alignment="block" valignment="top" leftline="true" rightline="true" width="6.5cm">
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\series bold
Option
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\series bold
WPT
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\series bold
STU
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\series bold
Description
\end_layout

\end_inset
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\family typewriter
-p|--path\InsetSpace ~
<arg>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
Defines a project directory
\end_layout

\end_inset
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\family typewriter
-e|--extension <arg>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
--
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
Filename extension of translation units
\end_layout

\end_inset
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\family typewriter
-v|--verbose <arg>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
Level of verbosity (
\family typewriter
0
\family default
-
\family typewriter
9
\family default
)
\end_layout

\end_inset
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\family typewriter
-c|--compile <arg>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
--
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
Name of the input file
\end_layout

\end_inset
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\family typewriter
-o|--output <arg>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
--
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
Name of the output file
\end_layout

\end_inset
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\family typewriter
-g|--generate
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
--
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
Generate link-once code
\end_layout

\end_inset
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\family typewriter
-i|--include_files
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
--
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
Generate manipulated header files
\end_layout

\end_inset
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\family typewriter
-a|--aspect_header <arg>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\family roman
\series medium
\shape up
\size normal
\emph off
\bar no
\noun off
\color none
Name of aspect header file or
\family default
\series default
\shape default
\emph default
\bar default
 
\family typewriter
\size default
\noun default
0
\end_layout

\end_inset
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\family typewriter
-r|--repository <arg>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
Name of the project repository
\end_layout

\end_inset
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\family typewriter
--config <arg>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
Parser configuration file
\end_layout

\end_inset
</cell>
</row>
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\family typewriter
-k|--keywords
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
Allow AspectC++ keywords in normal project files
\end_layout

\end_inset
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\family typewriter
--no_line
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
Disable generation of 
\family typewriter
#line
\family default
 directives
\end_layout

\end_inset
</cell>
</row>
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\family typewriter
--gen_size_type <arg>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
use a specific string as size_t
\end_layout

\end_inset
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\family typewriter
--warn...
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
enable a weaver warning that is suppressed by default
\end_layout

\end_inset
</cell>
</row>
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\family typewriter
--no_warn...
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
suppress a specific weaver warning
\end_layout

\end_inset
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\family typewriter
--problem...
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
enable back-end compiler problem workaround (see 
\begin_inset LatexCommand ref
reference "sec:back-end"

\end_inset

)
\end_layout

\end_inset
</cell>
</row>
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\family typewriter
--no_problem...
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
disable back-end compiler problem workaround
\end_layout

\end_inset
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\family typewriter
-I <arg>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
Include file search path
\end_layout

\end_inset
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\family typewriter
-D <name>[=<value>]
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
Macro definitions
\end_layout

\end_inset
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\family typewriter
-U <name>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
Undefine a macro
\end_layout

\end_inset
</cell>
</row>
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\family typewriter
--include <arg>
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
X
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
Forced include
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
\begin_inset Caption

\begin_layout Standard
\begin_inset LatexCommand label
name "tab:options"

\end_inset


\family typewriter
ac++
\family default
 Compiler Option Summary
\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Subsubsection

\family typewriter
-p|--path\InsetSpace ~
<arg>
\end_layout

\begin_layout Standard
This option defines the name of a project directory tree 
\family typewriter
<arg>
\family default
.
 The option can be used more than once if several directories belong to
 the project.
 At least one 
\family typewriter
-p
\family default
 options is always need when 
\family typewriter
ac++
\family default
 has to transform code, even in STU mode.
\end_layout

\begin_layout Subsubsection

\family typewriter
-d|--dest <arg>
\end_layout

\begin_layout Standard
With 
\family typewriter
-d
\family default
 a target directory for saving is selected.
 It corresponds to the last 
\family typewriter
-p
\family default
 option.
 For example, if two directories belong to a project they would be described
 in WPT mode with
\end_layout

\begin_layout LyX-Code
-p dir1 -p dir2
\end_layout

\begin_layout Standard
and in WPT with two source/target pairs:
\end_layout

\begin_layout LyX-Code
-p source1 -d target1 -p source2 -d target2
\end_layout

\begin_layout Standard
In STU mode 
\family typewriter
-d
\family default
 makes only sense in combination with 
\family typewriter
-i
\family default
 to generate header files for a library (see 
\begin_inset LatexCommand vref
reference "sec:option_i"

\end_inset

).
\end_layout

\begin_layout Subsubsection

\family typewriter
-e|--extension <arg>
\end_layout

\begin_layout Standard
In WPT mode 
\family typewriter
ac++
\family default
 searches in all project directories for translation units to transform.
 Translation units are identified by their filename extension.
 The default is 
\begin_inset Quotes eld
\end_inset

cc
\begin_inset Quotes erd
\end_inset

, which means that all files ending with 
\begin_inset Quotes eld
\end_inset

.cc
\begin_inset Quotes erd
\end_inset

 are handled.
 By using the option 
\family typewriter
-e cpp
\family default
 or 
\family typewriter
-e cxx
\family default
 you can select other frequently used filename extensions.
 The option can be used more than once, but only the last one is effective.
\end_layout

\begin_layout Standard
In WPT mode 
\family typewriter
ac++
\family default
 generates a file called 
\family typewriter
ac_gen.<extension>
\family default
.
 This extension is also taken from the 
\family typewriter
-e
\family default
 option, if one is provided.
\end_layout

\begin_layout Subsubsection

\family typewriter
-v|--verbose [<arg>]
\end_layout

\begin_layout Standard
The compiler can print message on the standard output device, which describe
 what it is currently doing.
 These message can be printed with different levels of datails.
 You can select this level with the parameter 
\family typewriter
<arg>
\family default
.
 The range is from 
\family typewriter
0
\family default
, which means no output, to 
\family typewriter
9
\family default
, which means all details.
 The option 
\family typewriter
-v0
\family default
 is the same as having no 
\family typewriter
-v
\family default
 option at all.
 
\family typewriter
-v
\family default
 without 
\family typewriter
<arg>
\family default
 is the same as 
\family typewriter
-v3
\family default
.
\end_layout

\begin_layout Standard
The 
\family typewriter
-v
\family default
 option can be used more than once but only the last one is effective.
\end_layout

\begin_layout Subsubsection

\family typewriter
-c|--compile <arg>
\end_layout

\begin_layout Standard
The 
\family typewriter
-c
\family default
 option is used to select an input file for 
\family typewriter
ac++
\family default
 in the STU mode.
 Using it more than once is possible, but only one is effective.
 There are no restrictions on the filename extension.
 
\family typewriter
ac++
\family default
 expects that the file contains AspectC++ source code.
\end_layout

\begin_layout Subsubsection

\family typewriter
-o|--output <arg>
\end_layout

\begin_layout Standard
With the -o option one can select the name of the output file, i.e.
 the name of the target of the code transformation, in STU mode.
 If this option is not used, the default output filename is 
\family typewriter
ac.out
\family default
.
 Note that the output filename is 
\emph on
not
\emph default
 derived from the input file name as it is done by other compilers.
\end_layout

\begin_layout Subsubsection

\family typewriter
\begin_inset LatexCommand label
name "sec:option_i"

\end_inset

-i|--include_files
\end_layout

\begin_layout Standard
The 
\family typewriter
-i
\family default
 option has to be used if the source code of the project should be compiled
 into a library and 
\family typewriter
ac++
\family default
 should run in STU mode (see 
\begin_inset LatexCommand vref
reference "sec:library"

\end_inset

).
 When a translation unit is transformed by using 
\family typewriter
-c
\family default
 and 
\family typewriter
-o
\family default
 in STU mode no manipulated header files are generated.
 All include files are expanded within the generated source code.
 This is fully sufficient if the translation units will then be compiled
 and linked directly.
 However, if a library should be provided the client needs a library file
 (an archive) 
\emph on
and
\emph default
 manipulated header files.
 These can be generated with 
\family typewriter
-i
\family default
.
 The generation results in a directory tree with the same structure as the
 input directory tree specified by 
\family typewriter
-p
\family default
 exhibits.
 Use the 
\family typewriter
-d
\family default
 option the select the target directory name(s).
\end_layout

\begin_layout Standard
Note that at the moment only and all files with the extension 
\family typewriter
.h
\family default
 are considered to be include files.
 This is rather inflexible and will be improved in future releases.
\end_layout

\begin_layout Subsubsection

\family typewriter
-a|--aspect_header <arg>
\end_layout

\begin_layout Standard
By default 
\family typewriter
ac++
\family default
 searches all files with the filename extension 
\family typewriter
.ah
\family default
 in the project directory tree(s) and allows all aspects defined in these
 files to affect the current translation unit.
 If one looks for a simple mechanism to deactivate aspects at compile-time,
 if 
\family typewriter
.ah
\family default
 does not conform to your local conventions, or if not all aspects should
 affect all translation units (be careful! See 
\begin_inset LatexCommand vref
reference "sec:pitfalls"

\end_inset

), the 
\family typewriter
-a
\family default
 option might help.
\end_layout

\begin_layout Standard
The option may be used more than once and each of them selects one aspect
 header that has to be considered for the current translation unit in STU
 mode or all translation units in WPT mode.
 If no aspect header should be considered use 
\family typewriter
-a0
\family default
.
\end_layout

\begin_layout Subsubsection

\family typewriter
-r|--repository <arg>
\end_layout

\begin_layout Standard
The 
\begin_inset Quotes eld
\end_inset

project repository
\begin_inset Quotes erd
\end_inset

 is an XML-based description of global information about an AspectC++ developmen
t project that is compiled with 
\family typewriter
ac++
\family default
.
 It fulfills two purposes:
\end_layout

\begin_layout Enumerate
It is a vehicle to transport information from one compiler run to another
\end_layout

\begin_layout Enumerate
It might be used be integrated development environments to visualize the
 join points where aspects affect the component code.
\begin_inset Foot
status open

\begin_layout Standard
In fact, the AspectC++ Development Tools for Eclipse (ACDT) already use
 the repository to visualize matched join points.
 See 
\begin_inset LatexCommand url
name "the ACDT homepage"
target "http://acdt.aspectc.org/"

\end_inset

 for information on the ACDT project.
\end_layout

\end_inset


\end_layout

\begin_layout Standard
The 
\family typewriter
-r
\family default
 option is used to define the name of the project repository file.
 However, this is an experimental feature.
 The file format is volatile.
 The uniqueness of join point IDs is only guaranteed if the project is compiled
 with a project repository.
 If a file with the given name does not exist, 
\family typewriter
ac++
\family default
 will create a new repository file.
 If the file exists, but is empty or does not contain valid data, 
\family typewriter
ac++
\family default
 terminates with an error message.
 A warning messages will be printed if the version of the weaver, which
 created the project repository, differs from the current 
\family typewriter
ac++
\family default
 version.
\end_layout

\begin_layout Subsubsection

\family typewriter
--config <arg>
\end_layout

\begin_layout Standard
Besides setting the environment variable 
\family typewriter
PUMA_CONFIG
\family default
 this options can be used to set the path to the parser configuration file.
\end_layout

\begin_layout Subsubsection

\family typewriter
-k|--keywords
\end_layout

\begin_layout Standard
By default the AspectC++ keywords 
\family typewriter
aspect
\family default
, 
\family typewriter
pointcut
\family default
, 
\family typewriter
advice
\family default
, and 
\family typewriter
slice
\family default
 are only treated as keywords in aspect header files.
 If they are used in normal project files, 
\family typewriter
ac++
\family default
 interprets them as normal identifiers.
 By this design decision aspects can be woven into legacy code even if the
 code uses the AspectC++ keywords as normal identifiers.
\end_layout

\begin_layout Standard
If the AspectC++ keywords should be interpreted as keywords in normal project
 files as well, the command line option 
\family typewriter
-k
\family default
 or 
\family typewriter
--keywords
\family default
 has to be used.
\end_layout

\begin_layout Standard
In files that do 
\emph on
not
\emph default
 belong to the project, e.g.
 standard library header files, the AspectC++ keywords are always regarded
 as normal identifiers, even if 
\family typewriter
-k
\family default
 or 
\family typewriter
--keywords
\family default
 is used.
\end_layout

\begin_layout Subsubsection

\family typewriter
--no_line
\end_layout

\begin_layout Standard
When 
\family typewriter
ac++
\family default
 manipulates files, e.g.
 by inserting generated code, it also inserts 
\family typewriter
#line
\family default
 directives.
 Inserting these directives can be disabled with the 
\family typewriter
--no_line
\family default
 option.
 Normally, 
\family typewriter
#line
\family default
 directives are only generated by C preprocessors.
 The directives are important for back-end compiler error messages and source
 code debuggers.
 Without the 
\family typewriter
#line
\family default
 generation these numbers correspond to the lines in the generated code,
 while they correspond to the source code written by the programmer otherwise.
\end_layout

\begin_layout Subsubsection

\family typewriter
--gen_size_type <arg>
\end_layout

\begin_layout Standard

\family typewriter
ac++
\family default
 generates a 
\family typewriter
new
\family default
 operator, which has 
\family typewriter
size_t
\family default
 in its argument type list.
 As the generated code shall not include the respective header file (to
 avoid portability problems), the weaver normally generates the name of
 the right type.
 However, in case of cross-compilation the type on the target platform might
 differ.
 Then it is possible to provide a string with this option, which is directly
 used in the constructor's argument list.
\end_layout

\begin_layout Subsubsection

\family typewriter
--problem...
\end_layout

\begin_layout Standard
An option like this is used to enabled a back-end compiler-specific code
 generation workaround.
 This is sometimes needed, because the C++ compilers differ in their degree
 of standard conformance.
 For details about the workarounds needed for each back-end refer to section
 
\begin_inset LatexCommand ref
reference "sec:back-end"

\end_inset

.
\end_layout

\begin_layout Subsubsection

\family typewriter
--no_problem...
\end_layout

\begin_layout Standard
This option can be used to disable a back-end compiler-specific code generation
 workaround which is enabled by default.
\end_layout

\begin_layout Subsubsection

\family typewriter
--warn_...
\end_layout

\begin_layout Standard
With this option the weaver is instructed to print specific warnings that
 are otherwise suppressed.
 Table 
\begin_inset LatexCommand ref
reference "tab:warnings"

\end_inset

 lists the names of warnings currently supported by the weaver.
\end_layout

\begin_layout Subsubsection

\family typewriter
--no_warn_...
\end_layout

\begin_layout Standard
The warnings listed in table 
\begin_inset LatexCommand ref
reference "tab:warnings"

\end_inset

 can be suppressed with 
\family typewriter
--no_warn_
\family default
<
\emph on
Name
\emph default
>.
\end_layout

\begin_layout Standard
\begin_inset Float table
wide false
sideways false
status open

\begin_layout Standard
\begin_inset Tabular
<lyxtabular version="3" rows="3" columns="2">
<features>
<column alignment="left" valignment="top" leftline="true" width="0">
<column alignment="left" valignment="top" leftline="true" rightline="true" width="0">
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\series bold
Warning Name
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\series bold
Condition
\end_layout

\end_inset
</cell>
</row>
<row topline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\family typewriter
deprecated
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
a deprecated syntax is being used
\end_layout

\end_inset
</cell>
</row>
<row topline="true" bottomline="true">
<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
\begin_inset Text

\begin_layout Standard

\family typewriter
macro
\end_layout

\end_inset
</cell>
<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
\begin_inset Text

\begin_layout Standard
macro-generated code would have to be transformed
\end_layout

\end_inset
</cell>
</row>
</lyxtabular>

\end_inset


\end_layout

\begin_layout Standard
\begin_inset Caption

\begin_layout Standard

\family typewriter
\begin_inset LatexCommand label
name "tab:warnings"

\end_inset

ac++
\family default
 Warnings
\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Subsubsection

\family typewriter
-I <arg>
\end_layout

\begin_layout Standard
The option 
\family typewriter
-I
\family default
 adds the directory 
\family typewriter
<arg>
\family default
 to the list of directories to be searched for header files.
 It can be used more than once and the search order is from the last directory
 to the first.
 The compiler 
\family typewriter
ac++
\family default
 needs to know all directories, where header files for the current translation
 unit might be located.
\end_layout

\begin_layout Standard
In case of system headers there are often a lot of these directories.
 To make the setup of 
\family typewriter
ac++
\family default
 more convenient we provide the 
\family typewriter
ag++ --gen_config
\family default
 command.
 The command calls the 
\family typewriter
g++
\family default
 compiler to get all these paths.
 A similar mechanism exists for the (commercial) Visual Studio Add-In.
 Users of Borland C++ or non-supported back-end compilers have to find out
 this list on their own.
\end_layout

\begin_layout Subsubsection

\family typewriter
-D <name>[=<value>]
\end_layout

\begin_layout Standard
With 
\family typewriter
-D
\family default
 a preprocessir macro 
\family typewriter
<name>
\family default
 will be defined.
 Without the optional value assignment the macro will get the value 
\family typewriter
1
\family default
.
 The option can be used more than once.
\end_layout

\begin_layout Standard
In most cases your source code expects some standard macros to be defined
 like 
\family typewriter
win32
\family default
, 
\family typewriter
linux
\family default
, or 
\family typewriter
i386
\family default
.
 And even if your code doesn't use them directly, they are often required
 to be set correctly by system header files.
 Thus, for the 
\family typewriter
ac++
\family default
 parser a correct set of these macros has to be defined.
 For 
\family typewriter
g++
\family default
 users we provide a command called 
\family typewriter
ag++
\family default
 that calls the compiler to get the list of these macros.
 A similar mechanism exists for the (commercial) Visual Studio Add-In.
 Users of Borland C++ or non-supported back-end compilers have to find out
 this list on their own.
\end_layout

\begin_layout Subsubsection

\family typewriter
-U <name>
\end_layout

\begin_layout Standard
This option can be used to undefine a previously defined macros.
 
\end_layout

\begin_layout Subsubsection

\family typewriter
\begin_inset LatexCommand label
name "sec:option_include"

\end_inset

-include <arg>
\end_layout

\begin_layout Standard
The 
\family typewriter
-include
\family default
 option can be used to include a file 
\family typewriter
<arg>
\family default
 into the compiled translation unit(s) even though there is no explicit
 
\family typewriter
#include
\family default
 directive given in the source code.
 If multiple 
\family typewriter
-include
\family default
 options are given on the command line, the files are include in the same
 order (from left to right).
 If you use the option in STU mode make sure that the back-end compiler
 is not forced to include the same files again (read details in 
\begin_inset LatexCommand vref
reference "sec:dup-forced-includes"

\end_inset

).
\end_layout

\begin_layout Subsection
Examples
\end_layout

\begin_layout Itemize

\family typewriter
ac++
\family default
 
\newline
Displays all options with a short description.
\end_layout

\begin_layout Itemize

\family typewriter
ac++ -I examples/Trace -p examples/Trace -d examples/Trace-out
\family default
 
\newline
Transforms the complete project from directory 
\begin_inset Quotes eld
\end_inset

examples/Trace
\begin_inset Quotes erd
\end_inset

 into the directory 
\begin_inset Quotes eld
\end_inset

examples/Trace-out
\begin_inset Quotes erd
\end_inset

.
 This is the whole program transformation (WPT) mode, which also performs
 a simple dependency check.
\end_layout

\begin_layout Standard
The following examples describe the compiler like interface (STU Mode).
 All dependency handling has to be done the user.
\end_layout

\begin_layout Itemize

\family typewriter
ac++ -c main.cc -p.

\family default
 
\newline
Transforms only the translation unit 
\family typewriter
main.cc
\family default
.
 The default name for the output file is 
\family typewriter
ac.out
\family default
.
\end_layout

\begin_layout Itemize

\family typewriter
ac++ -c main.cc -o main.acc -p.
\family default

\newline
Transforms the file 
\family typewriter
main.cc
\family default
 into the new file 
\family typewriter
main.acc
\family default
.
\end_layout

\begin_layout Itemize

\family typewriter
ac++ -c main.cc -o main.acc -p.
 -a trace.ah
\family default
 
\newline
Transforms the file 
\family typewriter
main
\family default
.
\family typewriter
cc
\family default
 into the new file 
\family typewriter
main.acc
\family default
 with the aspect located in 
\family typewriter
trace.ah
\family default
.
\end_layout

\begin_layout Itemize

\family typewriter
ac++ -i -v9 -p.
 -d includes
\family default

\newline
Creates the manipulated project header files and stores it into the directory
 
\family typewriter
includes
\family default
.
 ATTENTION: This works only once, because of the 
\family typewriter
includes
\family default
 directory is located in the project directory tree and the aspect header
 files exists twice now.
\end_layout

\begin_layout Section

\family sans
\begin_inset LatexCommand label
name "sec:Platform-Notes"

\end_inset


\family default
Platform Notes
\end_layout

\begin_layout Subsection
Ports
\end_layout

\begin_layout Standard
The 
\family typewriter
ac++
\family default
 compiler was originally developed on RedHat Linux systems.Today most of
 the development is still done under Linux (Debian and RedHat), but Windows
 has become a second development platform.
 This means that the Windows and Linux ports are the most tested.
 The Solaris and MacOS X ports were compiled, because they were demanded
 by users, but they are far less tested than our development platform ports.
\end_layout

\begin_layout Subsubsection
Linux
\end_layout

\begin_layout Standard
The 
\family typewriter
ac++
\family default
 binary was tested on\SpecialChar \ldots{}

\end_layout

\begin_layout Itemize
RedHat 7.3, 8.0, 9
\end_layout

\begin_layout Itemize
Debian 3.0
\end_layout

\begin_layout Itemize
Suse 8.2, 9, 9.1, 9.3
\end_layout

\begin_layout Subsubsection
Windows
\end_layout

\begin_layout Standard
Windows systems have different filename conventions than UNIX systems.
 Although ac++ was originally developed on Linux and does not use or need
 the Cygwin environment, path names are allowed to contain '
\family typewriter

\backslash

\family default
' characters and drive names like '
\family typewriter
C:
\family default
'.
 The UNIX filename delimiters '
\family typewriter
/
\family default
' are also accepted.
\end_layout

\begin_layout Standard
\begin_inset Note Comment
status collapsed

\begin_layout Standard
The 
\family typewriter
ac++
\family default
 compiler saves files always conforming to the Windows newline conventions,
 i.e.
 lines always end with a CR and a LF character.
 As input files the UNIX and Windows conventions are accepted.
\end_layout

\end_inset


\end_layout

\begin_layout Subsubsection
Solaris
\end_layout

\begin_layout Standard
No specific information available, yet.
\end_layout

\begin_layout Subsubsection
MacOS X
\end_layout

\begin_layout Standard
No specific information available, yet.
\end_layout

\begin_layout Subsection
\begin_inset LatexCommand label
name "sec:back-end"

\end_inset

Back-End Compiler Support
\end_layout

\begin_layout Standard
The C++ compiler that should be used to compile the output of 
\family typewriter
ac++
\family default
 (back-end compiler) plays a very important role for 
\family typewriter
ac++
\family default
, because compilers normally come with header files, which 
\family typewriter
ac++
\family default
 must be able to parse.
 None of the back-end compilers listed here has totally standard conforming
 header files, which makes it very hard for 
\family typewriter
ac++
\family default
 to parse all this code.
\end_layout

\begin_layout Standard
GNU 
\family typewriter
g++
\family default
 (including Cygwin/GNU g++ under Windows) and MS VC++ are our best supported
 compilers.
 After the implementation of a lot of MS VC++ specific extensions, the freely
 available Borland C++ became less important in the development.
 Depending on the users' demands it might become an unsupported platform
 in future releases.
\end_layout

\begin_layout Subsubsection
GNU g++
\end_layout

\begin_layout Standard
There are a lot of GNU g++ specific C++ extensions as well as several builtin
 functions and types.
 To enable all these extensions the option 
\family typewriter
--gnu
\family default
 (or 
\family typewriter
--gnu-2.95
\family default
 if g++ 2.9x header files should be parsed) has to be used.
 If a configuration file is generated with 
\family typewriter
ag++ --gen_config
\family default
, this option will be automatically inserted (either 
\family typewriter
--gnu
\family default
 or 
\family typewriter
--gnu-2.95
\family default
 depending on your compiler).
\end_layout

\begin_layout Standard
The 
\family typewriter
ac++
\family default
 parser aims at being compatible with g++ and nearly all of the header files
 that come with g++ 3.x and 2.9x can be parsed.
 The workaround to install the old g++ 2.95 header and to modify your 
\family typewriter
puma.config
\family default
 file so that 
\family typewriter
ac++
\family default
 finds these old files while parsing your code is no longer needed starting
 from version 0.8pre2.
\end_layout

\begin_layout Standard
Compilers from the g++ family do not support explicit template specialization
 in a non-namespace scope.
 However, this feature is needed by ac++ in the code generation process.
 A workaround for this problem is automatically enabled when you use the
 
\family typewriter
--gnu
\family default
 or 
\family typewriter
--gnu-2.95
\family default
 option.
 To explictly enable or disable the workaround use 
\family typewriter
--problem_spec_scope
\family default
 or 
\family typewriter
--no_problem_spec_scope
\family default
.
\end_layout

\begin_layout Subsubsection
\begin_inset LatexCommand label
name "sec:cygwin_back_end"

\end_inset

Cygwin/GNU g++
\end_layout

\begin_layout Standard
The 
\family typewriter
ac++
\family default
 compiler can also be used with the Cygwin/GNU g++ compiler under Windows.
 Note, that 
\family typewriter
ac++
\family default
 itself is not a Cygwin application and, thus, does not support Cygwin-specific
 path names like 
\family typewriter
/home/olaf
\family default
, which is relative to the cygwin installation directory.
 If your generate your parser configuration file automatically with 
\family typewriter
ag++ --gen_config
\family default
 the contained include paths will automatically be converted from Cygwin
 paths names to Windows path names using the 
\family typewriter
cygpath
\family default
 command.
 However, be careful when you set the 
\family typewriter
PUMA_CONFIG
\family default
 environment variable or when you pass any other path name to 
\family typewriter
ac++
\family default
.
\end_layout

\begin_layout Subsubsection
MS VC++
\end_layout

\begin_layout Standard
The 
\family typewriter
ac++
\family default
 parser aims at being compatible with Microsoft Visual C++ 7.
 This compiler comes with a large number of non-standard language extensions.
 To enable support for these extensions in the 
\family typewriter
ac++
\family default
 parser the command line option 
\family typewriter
--vc
\family default
 must be provided either on the command line or in your configuration file.
\end_layout

\begin_layout Standard
It is not recommended to use 
\family typewriter
ac++
\family default
 with Visual C++ 6 as this compiler has some problems with the generated
 code, even though the generated code is standard complient.
\end_layout

\begin_layout Standard
We recently found a bug in Visual C++ 6 and 7, which is related to local
 classes defined in header files.
 As 
\family typewriter
ac++
\family default
 sometimes generates such classes a workaround has to be enabled until Microsoft
 fixes the problem.
 The workaround can be enabled with the command line option 
\family typewriter
--problem_local_class
\family default
 and disabled with 
\family typewriter
--no_problem_local_class
\family default
.
 In the current 
\family typewriter
ac++
\family default
 version the workaround is enabled by default if the executable was compiled
 for the Windows platform.
\end_layout

\begin_layout Subsubsection
Borland C++
\end_layout

\begin_layout Standard
The Borland C++ compiler is not well supported by 
\family typewriter
ac++
\family default
.
 Probably the support will be completely discontinued in the near future.
\end_layout

\begin_layout Section

\family sans
\begin_inset LatexCommand label
name "sec:Problems"

\end_inset


\family default
Problems & Workarounds
\end_layout

\begin_layout Subsection
\begin_inset LatexCommand label
name "sec:pitfalls"

\end_inset

Common Pifalls
\end_layout

\begin_layout Subsubsection
\begin_inset LatexCommand label
name "sec:Include-Cycles"

\end_inset

Include Cycles
\end_layout

\begin_layout Standard
In versions prior to 1.0pre1 include cycles could occur in many situations
 and workarounds could not always be found.
 In version 1.0pre1 include cycles can only occur in the case of aspect code
 with introductions.
 Advice for code join points cannot produce cycles.
\end_layout

\begin_layout Standard
The reason for the remaining possible cycles is that 
\family typewriter
ac++
\family default
 generates 
\family typewriter
#include <aspect-header>
\family default
 in every file that contains the definition of a target class of an introduction.
 Without this generation pattern definitions from the aspect header would
 not be accessable by introduced code.
 However, if the aspect header directly or indirectly includes the target
 file, there is a cycle, which might cause parse errors.
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Standard
\align center
\begin_inset Graphics
	filename /home/olaf/workspace/AspectC++/doc/images/include_cycle.eps
	lyxscale 50
	width 60text%

\end_inset


\end_layout

\begin_layout Standard
\begin_inset Caption

\begin_layout Standard
\begin_inset LatexCommand label
name "fig:inc_cycle"

\end_inset

Include cycle problem
\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Standard
Figure 
\begin_inset LatexCommand ref
reference "fig:inc_cycle"

\end_inset

 illustrates the include cycle problem by giving an example.
 Here an aspect 
\family typewriter
\size small
Problem
\family default
\size default
 uses the type 
\family typewriter
\size small
Target
\family default
\size default
 and therefore includes 
\family typewriter
\size small
Target.h
\family default
\size default
.
 At the same time the aspect introduces a slice into the class 
\family typewriter
\size small
Target
\family default
\size default
.
 As the slice might depend on definitions or 
\family typewriter
\size small
#include
\family default
\size default
s in 
\family typewriter
\size small
Problem.ah
\family default
\size default
, the weaver generates the 
\family typewriter
\size small
#include\InsetSpace ~
"Problem.ah
\family default
\size default
" in 
\family typewriter
\size small
Target.h
\family default
\size default
.
 This causes the include cycle.
 Include guards (which should always be used!) avoid duplicate definitions,
 but do not solve the problem.
 It might still be the case that the parser complains about undefined types.
\end_layout

\begin_layout Standard
To avoid these cycles introductions can always be separated from the aspect
 by means of slices.
 Slice declarations and slice member definitions can be located in arbitrary
 aspect header files.
 The aspect weaver will only include these aspect headers in the target
 classes' header/implementation files and thereby avoid the cycle.
 For a slice reference within an advice declaration even a forward declaration
 of the slice is sufficient.
\end_layout

\begin_layout Standard
\begin_inset Float figure
wide false
sideways false
status open

\begin_layout Standard
\align center
\begin_inset Graphics
	filename /home/olaf/workspace/AspectC++/doc/images/no_include_cycle.eps
	lyxscale 50
	width 60text%

\end_inset


\end_layout

\begin_layout Standard
\begin_inset Caption

\begin_layout Standard
\begin_inset LatexCommand label
name "fig:no_inc_cycle"

\end_inset

Include cycle avoidance
\end_layout

\end_inset


\end_layout

\end_inset


\end_layout

\begin_layout Standard
Figure 
\begin_inset LatexCommand ref
reference "fig:no_inc_cycle"

\end_inset

 shows how the include cycle from the example in Figure 
\begin_inset LatexCommand ref
reference "fig:inc_cycle"

\end_inset

 can be avoided.
 Here the function 
\family typewriter
\size small
dump
\family default
\size default
 is implemented in a separate slice class 
\family typewriter
\size small
Dump
\family default
\size default
 that is stored in an aspect header file 
\family typewriter
\size small
Dump.ah
\family default
\size default
.
 The implementation of 
\family typewriter
\size small
Dump
\family default
\size default
 could rely on defintions and 
\family typewriter
\size small
#include
\family default
\size default
s in 
\family typewriter
\size small
Dump.ah
\family default
\size default
 (
\family typewriter
\size small
stdio.h
\family default
\size default
 in this example), but not on defintions in 
\family typewriter
\size small
Problem.ah
\family default
\size default
.
 Therefore, the aspect weaver generates 
\family typewriter
\size small
#include\InsetSpace ~
"Dump.ah"
\family default
\size default
 and not 
\family typewriter
\size small
#include\InsetSpace ~
"Problem.ah"
\family default
\size default
 in 
\family typewriter
\size small
Target.h
\family default
\size default
.
\end_layout

\begin_layout Standard
Note that in the case of 
\series bold
non-inline
\series default
 introductions the #include directive is generated in the file that contains
 the 
\begin_inset Quotes eld
\end_inset

link-once element
\begin_inset Quotes erd
\end_inset

 of the target class, which is never a header file.
 You can, for example,  exploit this feature to produce cyclic class relationshi
ps.
 The included file will be the aspect header file that contains the definition
 of the non-inline slice member.
\end_layout

\begin_layout Subsubsection
\begin_inset LatexCommand label
name "sec:dup-forced-includes"

\end_inset

Duplicate Forced Includes in STU Mode
\end_layout

\begin_layout Standard
In the Single Translation Unit (STU) mode 
\family typewriter
ac++
\family default
 handles forced includes (see 
\family typewriter
-include
\family default
 option in section 
\begin_inset LatexCommand vref
reference "sec:option_include"

\end_inset

) in the following way:
\end_layout

\begin_layout Description
internal\InsetSpace ~
includes: If the included file is part of your project, the file
 content will be expanded in the compiled translation unit.
\end_layout

\begin_layout Description
external\InsetSpace ~
includes: If the included file is 
\emph on
not
\emph default
 part of the project, ac++ generates an #include directive with the absolute
 path name of the file.
\end_layout

\begin_layout Standard
In both case the back-end compiler should not be forced to include the same
 file again.
 For example, 
\family typewriter
g++
\family default
 users should not use the 
\family typewriter
-include
\family default
 option with 
\family typewriter
ac++
\family default
 and with 
\family typewriter
g++
\family default
, because otherwise symbols might be defined twice.
\end_layout

\begin_layout Subsubsection
TODO in this manual:
\end_layout

\begin_layout Itemize
Generating header files into the project tree
\end_layout

\begin_layout Itemize
Different macros for translation units while parsing in WPT mode
\end_layout

\begin_layout Itemize
-a 0 option
\end_layout

\begin_layout Itemize
-a: different instances of the same header files
\end_layout

\begin_layout Subsection
Unimplemented Features
\end_layout

\begin_layout Subsubsection
Multi-Threading Support
\end_layout

\begin_layout Standard
C++ has no integrated thread modell like Java.
 Therefore, the woven AspectC++ code cannot rely on any available thread
 synchronization mechanism.
 As a result the implementation of the 
\family typewriter
cflow
\family default
 pointcut functions is currently 
\emph on
not thread-safe
\emph default
.
\end_layout

\begin_layout Standard
We are urgently investigating how thread synchronization and thread local
 storage can be integrated into AspectC++.
\end_layout

\begin_layout Subsubsection
Parse Errors
\end_layout

\begin_layout Standard
If 
\family typewriter
ac++
\family default
 stops processing because of parse errors this might be due to an incompatibilit
y or missing feature in the underlying C++ parser.
\end_layout

\begin_layout Standard
In the case that the error is found in your own code, i.e.
 code you are able to modify, you could use the following workaround:
\end_layout

\begin_layout LyX-Code
#ifdef __puma
\end_layout

\begin_layout LyX-Code
// ...
 simplified version of the code for ac++
\end_layout

\begin_layout LyX-Code
#else
\end_layout

\begin_layout LyX-Code
// ...
 original code
\end_layout

\begin_layout LyX-Code
#endif
\end_layout

\begin_layout Standard
Even if your own AspectC++ code contains only harmless C++ code you might
 experience parsing problems due to header files from libraries which your
 application code includes, especially in the case of template libraries.
 In this situation it might help to copy the file with the parse error into
 a different directory.
 Then you have to change the code in this file to avoid the error message
 by simplifying it.
 The final step is to extend the 
\family typewriter
puma.config
\family default
 file by a 
\begin_inset Quotes eld
\end_inset

-I <path>
\begin_inset Quotes erd
\end_inset

 entry for the directory where you placed the copy.
 As the result 
\family typewriter
ac++
\family default
 will now parse the simplified version while the original file is untouched
 and used while the C++ compiler runs.
\end_layout

\begin_layout Subsubsection
Templates
\end_layout

\begin_layout Standard
Currently ac++ is able to parse a lot of the (really highly complicated)
 C++ templates, but weaving is restricted to non-templated code only.
 That means you can not weave in templates or even affect calls to template
 functions or members of template classes.
 However, template instances can be matched by match expressions in the
 pointcut language and calls to members of class templates or template functions
 can be affected by advice.
\end_layout

\begin_layout Subsubsection
Unimplemented Language Elements
\end_layout

\begin_layout Description

\family typewriter
set
\family default
\series medium
\InsetSpace ~
and\InsetSpace ~

\family typewriter
\series default
get
\family default
 are the most demanded unimplemented language features.
 The discussion about a useful semantics of these pointcut functions in
 AspectC++ is still in progress.
\end_layout

\begin_layout Subsubsection
Support for Plain C Code
\end_layout

\begin_layout Standard
Currently 
\family typewriter
ac++
\family default
 generates C++ code, which cannot be compiled by a C compiler.
 As for many hardware platforms in the embedded domain no C++ compiler is
 available we are actively looking for a solution.
\end_layout

\begin_layout Subsubsection
Miscellaneous
\end_layout

\begin_layout Itemize

\family typewriter
ac++
\family default
 currently expects that header files have the extension 
\begin_inset Quotes eld
\end_inset

.h
\begin_inset Quotes erd
\end_inset

.
 Future version will solve this problem by adding a further command line
 option.
\end_layout

\begin_layout Subsubsection
Constructor/Destructor Generation
\end_layout

\begin_layout Standard
If advice for construction/destruction joinpoints is given and no constructor/de
structor is defined explicitly, ac++ will generate it.
 However, currently ac++ assumes that the copy constructor has one argument
 of type 
\begin_inset Quotes eld
\end_inset


\family typewriter
const <Classname>&
\family default

\begin_inset Quotes erd
\end_inset

.
 This leads to problems if the implicitly declared copy constructor has
 an argument of type 
\begin_inset Quotes eld
\end_inset


\family typewriter
<Classname>&
\family default

\begin_inset Quotes erd
\end_inset

.
 Therefore, you should not define construction/destruction advice for classes
 with this copy constructor signature.
\end_layout

\begin_layout Standard

\newpage

\end_layout

\begin_layout Section
Code Transformation Patterns
\end_layout

\begin_layout Standard
This appendix documents some internals of the 
\family typewriter
ac++
\family default
 weaver implementation.
\end_layout

\begin_layout Subsection
Inclusion of Aspect Header Files
\end_layout

\begin_layout Standard
The weaver has to guarantee that aspect header files are only compiled in
 a translation unit if they are affecting the shadows of code join point
 that are located within the translation unit.
 If an aspect header has to be included because of this reason, the same
 check have to be performed again, because the aspect header might contain
 code join points that have to be affected by other aspects.
\end_layout

\begin_layout Standard
In order to implement this behavior a forward declaration of the advice
 invocation function is generated and a macro 
\family typewriter
__ac_need_<
\emph on
mangled_ah_filename
\emph default
>
\family default
 is defined in each file that contains a join point shadow, which is affected
 by an aspect that is defined in an aspect header whose mangled files name
 is 
\family typewriter
<
\emph on
mangled_ah_filename
\emph default
>
\family default
.
 Multiple inclusions shall be avoided.
 Therefore, another macro 
\family typewriter
__ac_have_<
\emph on
mangled_ah_filename
\emph default
>
\family default
 is set wherever an aspect header is included by generated code.
 The following code is an example that shows the code which is generated
 at the end of each translation unit for each known aspect header of the
 project:
\end_layout

\begin_layout LyX-Code
#ifdef __ac_need_<
\family typewriter
\emph on
mangled_ah_
\family default
1
\emph default
>
\end_layout

\begin_layout LyX-Code
#ifndef __ac_have_<
\family typewriter
\emph on
mangled_ah_
\family default
1
\emph default
>
\end_layout

\begin_layout LyX-Code
#define __ac_have_<
\family typewriter
\emph on
mangled_ah_
\family default
1
\emph default
>
\end_layout

\begin_layout LyX-Code
#include "
\emph on
ah_1
\emph default
"
\end_layout

\begin_layout LyX-Code
#endif
\end_layout

\begin_layout LyX-Code
// other aspect headers that are needed if ah_1 is needed
\end_layout

\begin_layout LyX-Code
#ifndef __ac_have_<
\family typewriter
\emph on
mangled_ah_
\family default
\emph default
4>
\end_layout

\begin_layout LyX-Code
#define __ac_have_<
\family typewriter
\emph on
mangled_ah_
\family default
\emph default
4>
\end_layout

\begin_layout LyX-Code
#include "
\emph on
ah_
\emph default
4"
\end_layout

\begin_layout LyX-Code
#endif
\end_layout

\begin_layout LyX-Code
#endif // __ac_need_<
\family typewriter
\emph on
mangled_ah_
\family default
1
\emph default
>
\end_layout

\begin_layout Standard
This code transformation pattern might result in multiple 
\family typewriter
#include
\family default
 directives for the same aspect header files.
 This is correct, as there might be cyclic dependencies between the aspect
 headers.
\end_layout

\begin_layout LyX-Code

\end_layout

\end_body
\end_document
