summaryrefslogtreecommitdiffstats
path: root/doc/preprocessing.doc
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2004-11-14 19:44:16 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2004-11-14 19:44:16 (GMT)
commit05930245579c006f2b5bfca53e0a1976d682f9b8 (patch)
tree181f9ebfd0706ecca5898b169bffa8bc4f5486cc /doc/preprocessing.doc
parent62d6edc6d0b299e93384e678748b635eb1bfe9b9 (diff)
downloadDoxygen-05930245579c006f2b5bfca53e0a1976d682f9b8.zip
Doxygen-05930245579c006f2b5bfca53e0a1976d682f9b8.tar.gz
Doxygen-05930245579c006f2b5bfca53e0a1976d682f9b8.tar.bz2
Release-1.3.9.1-20041114
Diffstat (limited to 'doc/preprocessing.doc')
-rw-r--r--doc/preprocessing.doc26
1 files changed, 24 insertions, 2 deletions
diff --git a/doc/preprocessing.doc b/doc/preprocessing.doc
index bce601a..883f8d2 100644
--- a/doc/preprocessing.doc
+++ b/doc/preprocessing.doc
@@ -74,8 +74,30 @@ and specify the macro definitions after
the \ref cfg_predefined "PREDEFINED" or
\ref cfg_expand_as_defined "EXPAND_AS_DEFINED" tag.
-As an example, suppose you have the following obfuscated code fragment
-of an abstract base class called \c IUnknown:
+A typically example where some help from the preprocessor is needed is
+when dealing with Microsoft's __declspec language extension. Here is an
+example function.
+
+\verbatim
+extern "C" void __declspec(dllexport) ErrorMsg( String aMessage,...);
+\endverbatim
+
+When nothing is done, doxygen will be confused and see __declspec as
+some sort of function. To help doxygen one typically uses the following
+preprocessor settings:
+
+\verbatim
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = YES
+EXPAND_ONLY_PREDEF = YES
+PREDEFINED = __declspec(x)=
+\endverbatim
+
+This will make sure the __declspec(dllexport) is removed before doxygen
+parses the source code.
+
+For a more complex example, suppose you have the following obfuscated
+code fragment of an abstract base class called \c IUnknown:
\verbatim
/*! A reference to an IID */