Re: [Doxygen-users] documenting multiple methods defined by a single macro - help
Brought to you by:
dimitri
From: Manfred D. <man...@me...> - 2005-11-29 11:34:00
|
mx...@se... wrote: > > 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. > > Yes - that's what I'm trying to do... but still no success :-( Running with the -d option (doxygen -d Preprocessor <config.dox>), yielded the following suprise: 00094 /** 00095 * 00096 * @def RESHAPE 00097 * 00098 * The macro documentaion is here. 00099 */ 00100 #define RESHAPE(z, N, _) 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 /**/ 00112 00113 00114 BOOST_PP_REPEAT(BOOST_PP_INC(RESHAPE_DIM_MAX), RESHAPE, _) 00115 ... As you can see, there's nothing there - this one has really got me. -Any other ideas ?? Cheers, -- Manfred MetOcean Engineers www.metoceanengineers.com > > > 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, > |