Re: [Doxygen-users] documenting multiple methods defined by a single macro - help
Brought to you by:
dimitri
From: <mx...@se...> - 2005-11-29 10:34:51
|
The MACROS you can document very easy, e.g. /** * The macro documentation. */ #define RESHAPE(z, N, _) ... or /** * @def RESHAPE * * The macro documentation. */ ... However, if you want to document the methods inside the RESHAPE macro, did you try following?: #define RESHAPE(z, N, _) \ \ /** \ * reshape method documentation. \ */ \ static void reshape(const blitz::Array<T, BOOST_PP_INC(N)>& btz, \ MoeArray<T>& data \ ) \ throw(); \ \ /** \ * reshape2 method documentation. \ */ \ static boost::shared_ptr<MoeArray<T> > \ reshape(const blitz::Array<T, BOOST_PP_INC(N)>& btz) throw(); \ /**/ Of course, you have to use precompiler to expand this macro, setting at least: ENABLE_PREPROCESSING = YES MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = YES SEARCH_INCLUDES = YES INCLUDE_PATH = <path to your includes which contains expanded macros> [INCLUDE_FILE_PATTERNS = <...>] and EXPAND_AS_DEFINED = RESHAPE or EXPAND_ONLY_PREDEF = NO will expand all macros, not only predefined (but it can be potentialy problematic) * hint: run "doxygen -d Preprocessor <your_config.dox> >PreProcess.txt" to see the result of macro expansion. Manfred Doudar wrote: > > Hi: > > Can anyone let me know how I would even begin to document the following > macros? > > Note: the macro below encapsulates 2 methods, which in fact result in > 22 (yes 22, not 20) declarations in all (it's an iterative macro). > > > > > #define RESHAPE_DIM_MAX 10 > > > #define RESHAPE(z, N, _) \ > \ > static void reshape(const blitz::Array<T, BOOST_PP_INC(N)>& btz, \ > MoeArray<T>& data \ > ) \ > throw(); \ > \ > static boost::shared_ptr<MoeArray<T> > \ > reshape(const blitz::Array<T, BOOST_PP_INC(N)>& btz) throw(); \ > /**/ > > > BOOST_PP_REPEAT(BOOST_PP_INC(RESHAPE_DIM_MAX), RESHAPE, _) > > #undef RESHAPE > > > > Thanks in advance, |