ãã®èšäºã¯ãDoxygenããã¥ã¡ã³ããŒã·ã§ã³ã·ã¹ãã ã«é¢ããäžé£ã®èšäºã®äžéšã§ãã
- Doxygenã§ã³ãŒããå¹ççã«ææžåãã
- Doxygenã®ããã¥ã¡ã³ã
- Doxygenã§ãã£ãŒããšã°ã©ããäœæãã
ããã¯ãèšåããããµã€ã¯ã«ã®æåã®äž»èŠãªèšäºã§ãããéçºè ã®å£°æã«åºã¥ããŠãå®éã«C ++ã§æžããããœãããŠã§ã¢ãææžåããããã®æšæºã«ãªããããã«å°ãªãDoxygenãœãŒã¹ææžã·ã¹ãã ã®çŽ¹ä»ã§ãä»ã®ããã€ãã®èšèªã«åºãæ®åããŠããŸãã
ãã®èšäºã§ã¯ãæåã«ã·ã¹ãã èªäœãšãã®æ©èœã«ç²Ÿéãã次ã«ãã®ã€ã³ã¹ããŒã«ãšåºæ¬çãªåäœåçãæ±ããæåŸã«ãããŸããŸãªããã¥ã¡ã³ãã®äŸãã³ãŒãã®ç¹å®ã®éšåãããã¥ã¡ã³ãåããæ¹æ³ã®äŸã®èª¬æã§ç¥ãåããçµäºããŸãã äžèšã§èšãã°ãç§ãã¡ã¯ããªããå¿«é©ã«ãªãããã®çŽ æŽãããã·ã¹ãã ã䜿ãå§ããããšãå¯èœã«ãããã¹ãŠã®ãã®ã«ç²ŸéããŸãã
ã¯ããã«
ãããããç§ãã¡ã¯ãããããããŸããŸãªããã¥ã¡ã³ããžã§ãã¬ãŒã¿ãŒã®äœæ¥ã®çµæã«åºããããŸããã 圌ãã®ä»äºã®äžè¬çãªååã¯æ¬¡ã®ãšããã§ãããã®ãããªãžã§ãã¬ãŒã¿ã®å ¥åã¯ãç¹å¥ã«ã³ã¡ã³ãããããœãŒã¹ã³ãŒããšãæã«ã¯ä»ã®ããã°ã©ã ã³ã³ããŒãã³ããåãåããåºåã¯é åžãšäœ¿çšã®ããã®æ¢è£œã®ããã¥ã¡ã³ããäœæããŸãã
æ€èšäžã®Doxygenã·ã¹ãã ã¯ãã®ã¿ã¹ã¯ãå®è¡ããã ãã§ããç¹å¥ãªçš®é¡ã®ã³ã¡ã³ããå«ããœãŒã¹ã³ãŒãã«åºã¥ããŠããªã³ã¯ãã¯ã©ã¹å³ãåŒã³åºããªã©ãå«ãçŸãã䟿å©ãªããã¥ã¡ã³ããçæã§ããŸãã ããŸããŸãªåœ¢åŒïŒHTMLãLaTeXãCHMãRTFãPostScriptãPDFãmanããŒãžã
ã·ã¹ãã ã®å šäœçãªå°è±¡ãäžããããã«ãDoxygenã䜿çšããŠäœæãããAPIã®ããŸããŸãªããã¥ã¡ã³ãã®äŸã以äžã«ç€ºããŸãïŒæè¿ã®äŸã§ã¯ããã®ã·ã¹ãã ãçæããæšæºããã¥ã¡ã³ããšæ¯ã¹ãŠç®ç«ã£ãå€æŽãè¡ãããŠããŸãïŒã
- CrystalSpace Game Engine APIããã¥ã¡ã³ã
- Visualization Toolkitã®ããã¥ã¡ã³ã
- AbiwordãœãŒã¹ããã¥ã¡ã³ã
- KDE APIããã¥ã¡ã³ã
- Drupal APIããã¥ã¡ã³ã
泚ææ·±ãèªè ã¯ãã»ãšãã©ã®äŸã§D ++ genãC ++ã§èšè¿°ããããœãããŠã§ã¢ã®ææžåã«äœ¿çšãããŠããããšã«æ°ã¥ããŠããã¯ãã§ãããå®éããã®ã·ã¹ãã ã¯ä»ã®å€ãã®èšèªããµããŒãããŠããŸãïŒCãObjective-CãCïŒãPHPãJavaãPython ãIDLãFortranãVHDLãTclãããã³éšåçã«Dã
ãã ãã確ç«ãããäŒçµ±ã«åŸã£ãŠãäŸã§ã¯C ++ã䜿çšããŸããããµããŒããããŠããå¥ã®èšèªã奜ãå Žåã¯æ··ä¹±ããªãã¯ãã§ããå®éã«ã¯å€§ããªéãã«æ°ä»ããªãããã以äžã®ã»ãšãã©ã¯ããªãã®èšèªã«ãåœãŠã¯ãŸããŸãã
ã¡ãªã¿ã«ãDoxygenã䜿çšãããããžã§ã¯ãã®ãªã¹ãã¯å ¬åŒWebãµã€ãã§å ¥æã§ãããããã®ãããžã§ã¯ãã®ã»ãšãã©ã¯ç¡æã§ãã ãããã£ãŠãåžæãã人ã¯ããã®ãããžã§ã¯ããŸãã¯ãã®ãããžã§ã¯ãã®ãœãŒã¹ãããŠã³ããŒãããããã§éçºè ãã©ã®ããã«ããã¥ã¡ã³ããå®è¡ãããã確èªã§ããŸãã
ã€ã³ã¹ããŒã«ãšã»ããã¢ãã
Doxygenã®ææ°ããŒãžã§ã³ã¯ã å ¬åŒWebãµã€ãããããŠã³ããŒãã§ããŸãããã®ãã£ã¹ããªãã¥ãŒã·ã§ã³ã¯ãã»ãšãã©ã®äžè¬çãªãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§å©çšã§ããŸãããŸããããã±ãŒãžãããŒãžã£ãŒã䜿çšããããšãã§ããŸãã ããã«ãå¿«é©ã§ãã«æ©èœã®äœæ¥ãè¡ãã«ã¯ã Graphvizãã€ã³ã¹ããŒã«ããããšããå§ãããŸãã
ããã«ãDoxygenã®æäœã¯éåžžã«ç°¡åã§ããèšå®ãã¡ã€ã«ãžã®ãã¹ã衚瀺ããŠããã°ã©ã ãèµ·åããã ãã§ãã
doxygen <config_file>
ãããããã®ãã¡ã€ã«ã«ã¯ãã¹ãŠã®åŸ®åŠãªç¹ããããŸãã å®éã«ã¯ãåãããžã§ã¯ãã«ã¯ç¬èªã®èšå®ãã¡ã€ã«ãããããããžã§ã¯ããœãŒã¹ãžã®ãã¹ãããã¥ã¡ã³ããäœæãããã¹ãããã³ããã¥ã¡ã³ãã§è©³çŽ°ã«èª¬æãããŠããä»ã®ããŸããŸãªãªãã·ã§ã³ãèšè¿°ãããå¯èœãªéãæ§æããããšãã§ããŸãããŒãºã«åã£ããããžã§ã¯ãææžã
ååãšããŠããã®ãã¡ã€ã«ãç·šéããäžè¬ã«Doxygenã§äœæ¥ããã«ã¯ãDoxywizardããã°ã©ã ã䜿çšã§ããŸããããã¯ã»ãšãã©ã®å ŽåDoxygenã«ä»å±ããŠãããèšå®ãã¡ã€ã«ã®æäœãå°ã䟿å©ã«ãªããŸãïŒå·ŠåŽã¯Doxywizardãå³åŽã¯ããã¹ããšãã£ã¿ãŒã§éããã¡ã€ã«ã§ãïŒïŒ
ããã§ã¯ãèšå®ãã¡ã€ã«ã®äœæãå§ããŸãããã äžè¬ã«ãDoxywizardã䜿çšããå Žåãèªåçã«äœæãããŸãããã以å€ã®å Žåããã®ãã¡ã€ã«ãäœæããã«ã¯ã -gã¹ã€ããïŒçæããïŒãæå®ããŠDoxygenããã°ã©ã ãå®è¡ããå¿ èŠããããŸãã
doxygen -g <config_name>
æåã®ããã¥ã¡ã³ããäœæããã®ã«äŸ¿å©ãªäž»ãªãªãã·ã§ã³ãèããŠã¿ãŸãããã
ã¿ã°ä»ã | äºå® | ããã©ã«ã㧠|
DOXYFILE_ENCODING | ãã®èšå®ãã¡ã€ã«ã®ãã¹ãŠã®æåã«äœ¿çšããããšã³ã³ãŒãã£ã³ã° | UTF-8 |
OUTPUT_LANGUAGE | ããã¥ã¡ã³ããçæããèšèªãèšå®ããŸãã | è±èª |
PROJECT_NAME | ãããžã§ã¯ãã®ååãåäžã®åèªãŸãã¯äžé£ã®åèªã«ããããšãã§ããŸãïŒDoxywizardã®å€éšã§ç·šéããŠããå Žåãäžé£ã®åèªã¯äºéåŒçšç¬Šã§å²ãå¿ èŠããããŸãïŒ | ç§ã®ãããžã§ã¯ã |
PROJECT_NUMBER | ãã®ã¿ã°ã¯ããããžã§ã¯ãçªå·ãŸãã¯ãã®ããŒãžã§ã³ã瀺ãããã«äœ¿çšã§ããŸãã | - |
PROJECT_BRIEF | ãããžã§ã¯ãã®çã1è¡ã®èª¬æãåããŒãžã®äžéšã«é 眮ããããããžã§ã¯ãã®ç®çã®äžè¬çãªèãã瀺ããŸãã | - |
OUTPUT_DIRECTORY | ããã¥ã¡ã³ããçæããã絶察ãã¹ãŸãã¯çžå¯Ÿãã¹ | çŸåšã®ãã£ã¬ã¯ã㪠|
å ¥å | ãããžã§ã¯ãã®ãœãŒã¹ã³ãŒããå«ããã¹ããŒã¹ã§åºåããããã¡ã€ã«ããã£ã¬ã¯ããªã®ãªã¹ã | çŸåšã®ãã£ã¬ã¯ã㪠|
ååž°ç | æå®ãããã£ã¬ã¯ããªã®ãµããã©ã«ããŒå ã®ãœãŒã¹ã³ãŒããã¹ãã£ã³ããå¿ èŠãããå Žåã«äœ¿çšããŸã | ãã |
ãããçæããã«ã¯ãDoxywizardã䜿çšããŸãïŒãã®ããã«ã¯ããœãŒã¹ã³ãŒããååŸããäœæ¥ãã£ã¬ã¯ããªãæå®ãã[å®è¡]ã¿ãã«ç§»åããŠ[å®è¡doxygen]ãã¯ãªãã¯ããŸãïŒããŸãã¯ãèšå®ãã¡ã€ã«ãžã®ãã¹ããã©ã¡ãŒã¿ãŒãšããŠæå®ããŠDoxygenããã°ã©ã ãå®è¡ããŸãïŒ
doxygen <config_file>
Doxygenããã¥ã¡ã³ãã®åºæ¬
Doxygenã®èšå®æ¹æ³ãšæäœæ¹æ³ãããã£ãã®ã§ãä»åºŠã¯ã³ãŒããåºæ¬ååãã¢ãããŒããææžåããæ¹æ³ãç解ããŸãã
Doxygenã®ã³ãŒãããã¥ã¡ã³ããŒã·ã§ã³ã¯ãããã¥ã¡ã³ããããã¯ã䜿çšããŠè¡ãããŸãã ãã®é 眮ã«ã¯2ã€ã®ã¢ãããŒãããããŸãã
- ã¯ã©ã¹ãã¯ã©ã¹ã®ã¡ã³ããŒãé¢æ°ãåå空éãªã©ã®å®£èšãŸãã¯å®çŸ©ã®ååŸã«é 眮ã§ããŸãã
- ãŸãã¯ãä»»æã®å ŽæïŒããã³å¥ã®ãã¡ã€ã«ïŒã«é 眮ããããšãã§ããŸããããã®ããã«ã¯ãã³ãŒãã®ã©ã®èŠçŽ ãåç §ããããæ瀺çã«ç€ºãå¿ èŠããããŸãã éçºè ã§ããåé¿ããããšãæšå¥šããŠããããããã®ã¢ãããŒãã¯èæ ®ããŸããããèå³ãããã°ã ããã¥ã¡ã³ãã§è©³çŽ°ãèªãããšãã§ããŸã ã
æ§é çã«ã¯ãããã¥ã¡ã³ãåãŠãããã¯ã³ã¡ã³ãã§ãããç¹å¥ãªæ¹æ³ã§ãã©ãŒããããããŠããããããã®å€èŠ³ã¯äœ¿çšããèšèªã«äŸåããã®ã¯åœç¶ã§ãïŒè©³çŽ°ã«ã€ããŠã¯ãããã¥ã¡ã³ãã®å¯Ÿå¿ããã»ã¯ã·ã§ã³ãåç §ããŠãã ãã ïŒã ãããã£ãŠãããã«Cã©ã€ã¯ãªèšèªïŒC / C ++ / CïŒ/ Objective-C / PHP / JavaïŒã®æ§æã«æ³šç®ããŸãã
ããã«ãäžè¬ã«ãææžåãããã¯ã«ã¯2ã€ã®äž»ãªã¿ã€ããããããšã«æ³šæããŠãã ãããè€æ°è¡ãããã¯ãšåäžè¡ãããã¯ã§ãã
ãããã®éãã¯ãåäžè¡ã®ã³ã¡ã³ããšè€æ°è¡ã®ã³ã¡ã³ãã®éããããããã«åŒ·ãã§ãã å®éãåäžè¡ã®ãããã¯ã§æžãããããã¹ãã¯ãææžåãããèŠçŽ ã®ç°¡åãªèª¬æïŒèŠåºãã«äŒŒãŠããŸãïŒãæããè€æ°è¡ã®ãããã¯ã§æžãããããã¹ãã¯è©³çŽ°ãªèª¬æãæããŸãã ãã®éããå¿ããŠã¯ãªããŸããã
è€æ°è¡ãããã¯
ãããã¯ã¯ç¹å¥ãªæå³ã§ã®ã³ã¡ã³ãã§ãããšèšããŸããã ãããã£ãŠããã®ãããªãç¹å¥ãªæ¹æ³ãã§ã©ã®ããã«æ±ºå®ããå¿ èŠããããŸãã äžè¬ã«ãè€æ°è¡ãããã¯ãèšè¿°ããæ¹æ³ã¯ããã€ããããç¹å®ã®æ¹æ³ã®éžæã¯å¥œã¿ã«å¿ããŠç°ãªããŸãã
- JavaDocã¹ã¿ã€ã«ïŒéåžžã®Cã³ã¡ã³ããé£æ³ããããã2ã€ã®ã¢ã¹ã¿ãªã¹ã¯ã§å§ãŸãïŒïŒ
/** * ... ... * ... ... */
åæã«ãåè¡ã«æãä»ããå¿ èŠã¯ãããŸããã ãã®ãããªã¬ã³ãŒãã¯åçã§ãïŒ
/** ... ... ... ... */
- Qtã¹ã¿ã€ã«ãæåã®ã¢ã¹ã¿ãªã¹ã¯ã®ä»£ããã«æå笊ãä»ããããŸãïŒ
/*! * ... ... * ... ... */
åè¿°ã®ãªãã·ã§ã³ã®äžéæãåæ§ã§ãã ãããã®2ã€ã®ã¹ã¿ã€ã«ã«å ããŠãããã€ãã®ã¹ã¿ã€ã«ããããŸãããä»ã®ãšãããããã«ã€ããŠã¯è©³ãã説æããŸããã
ãã®å Žåããã®ãããªã³ã¡ã³ãã§æžãããããã¹ãã詳现ãªèª¬æãæããŠãããšããäºå®ã«å床泚æãæã£ãŠãã ããã
\ briefã³ãã³ãã䜿çšããŠãç°¡åãªèª¬æã瀺ãããšãã§ããŸãã ã³ãã³ãã®åŸã段èœã®çµãããŸã§ã«ç€ºãããããã¹ãã¯ãçã説æãšåŒã°ãã空ã®è¡ã¯è©³çŽ°ãªèª¬æãšçã説æãåºå¥ããããã«äœ¿çšãããŸãã
/*! \brief . */
åç·ãŠããã
åäžè¡ã®ãããã¯ã説æããã«ã¯ãå€ãã®èšèšæ¹æ³ããããŸããããã®ãã¡ã®2ã€ãæ€èšããŠãã ããã
- C ++ã¹ã¿ã€ã«ã®ç¹å¥ãªã³ã¡ã³ãã䜿çšã§ããŸãã
///
- åã®ã³ã¡ã³ããšåæ§ã®ã³ã¡ã³ãã䜿çšã§ããŸãããè¿œå ã®ã¹ã©ãã·ã¥ã®ä»£ããã«æå笊ãæ¿å
¥ããŸãã
//!
- 1è¡ã®ããã¥ã¡ã³ãåäœã§è©³çŽ°ãªèª¬æãæå®ããã«ã¯ã \ detailsã³ãã³ãã䜿çšã§ããŸãã
/// \details
- é£ç¶ããããã¥ã¡ã³ãåãããã¯ã¯1ã€ã«çµåãããŸãïŒäœ¿çšãããã¹ã¿ã€ã«ããè€æ°è¡ãŸãã¯åäžè¡ã«é¢ä¿ãªãïŒã
ããšãã°ã次ã®2ã€ã®ææžåæ¹æ³ã§ã¯åãçµæãåŸãããŸãã
/// \brief /// \details
/// /*! */
èŠçŽ ã®åŸã®ããã¥ã¡ã³ããããã¯ã®é 眮
åè¿°ã®ãã¹ãŠã®äŸã§ã¯ãææžåãããèŠçŽ ãææžåãããèŠçŽ ã®åã«ãããšæ³å®ãããŠããŸããããææžåãããèŠçŽ ã®åŸã«é 眮ããæ¹ã䟿å©ãªå ŽåããããŸãã ãããè¡ãã«ã¯ã以äžã®äŸã®ããã«ãããŒã«ãŒã<ãããããã¯ã«è¿œå ããŸãã
int variable; ///<
ããã¥ã¡ã³ãã®äŸ
ãããå®éã«ã©ã®ããã«èŠãããèŠãŠã¿ãŸãããã 以äžã¯ã以åã«æ€èšããã«ãŒã«ã«åŸã£ãŠç¹å®ã®ã¯ã©ã¹ã®ææžåãããã³ãŒãã§ãã
/*! \brief , : , Doxygen */ class Parent { public: Parent(); ~Parent(); };
ãã®çµæãDoxygenã¯ãããã®ã³ã¡ã³ãã«åºã¥ããŠæ¬¡ã®çŸãããã¶ã€ã³ãããããŒãžã圢æããŸãïŒããããã®åãæãã§ãïŒã
ããã§åºæ¬ãåŠãã ã®ã§ãä»åºŠã¯ããã¥ã¡ã³ãã®è©³çŽ°ãç¥ãæ¹æ³ãåŠã³ãŸãã ãã®ããã®ããŒã«ã¯ããŒã ã§ãã
ããŒã
ç§ãã¡ã¯äœãšãDoxygenã®ããã€ãã®ããŒã ãšç¥ãåãããšãã§ããŸããïŒ \ç°¡åãªèª¬æãš\詳现ã«ã€ããŠè©±ããŠããïŒããå®éã«ã¯ããã«å€ãã®ããŒã ããããŸãã å®å šãªãªã¹ãã¯ã å ¬åŒããã¥ã¡ã³ãã«èšèŒãããŠããŸã ã
äžè¬ã«ãDoxygenã®ã³ãã³ãã¯ãã¹ãŠãèšå·ã\ããŸãã¯ã@ããä»ããè±èªã®åèªïŒäž¡æ¹ã®ãšã³ããªã¯åäžïŒã§ããããã®ãããªã³ãã³ãã¯200æ¡ã»ã©ãããŸãã ãã®ãããªããã€ãã®ã³ãã³ãã®äŸãæããŸãããã
ããŒã | äŸ¡å€ |
\èè | èè ã瀺ããŸã |
\ããŒãžã§ã³ | ããŒãžã§ã³ã瀺ãããã«äœ¿çš |
\æ¥ä» | éçºæ¥ã瀺ãããã«èšèš |
\ãã° | æ¢ç¥ã®ãšã©ãŒã®ãªã¹ã |
\èŠå | 䜿çšäžã®èŠå |
\èäœæš© | 䜿çšãããã©ã€ã»ã³ã¹ |
\äŸ | äŸã«ãœãŒã¹ãžã®ãªã³ã¯ã瀺ãããã«ã³ã¡ã³ãã«è¿œå ãããã³ãã³ãïŒã³ãã³ãã®åŸã«è¿œå ïŒ |
\ todo | ãã®ã³ãã³ãã¯ãè¡ãå¿ èŠã®ããå€æŽïŒTODOïŒãèšè¿°ããããã«äœ¿çšãããŸãã |
/*! \brief \author Norserium \version 1.0 \date 2015 \warning , Parent */ class Son : public Parent { public: Son(); ~Son(); };
ããã«ã次ã®è¡šèšæ³ã䜿çšããŠãã³ãã³ãã®äžè¬çãªåœ¢åŒãæå®ããããšãã®ã³ãã³ãã®åŒæ°ã説æããŸãã
æå® | äŸ¡å€ |
<...> | å±±æ¬åŒ§ã¯ãåŒæ°ãåäžã®åèªã§ããããšã瀺ããŸãã |
ïŒ...ïŒ | æ¬åŒ§ã¯ãåŒæ°ãã³ãã³ããé 眮ãããè¡ã®çµãããŸã§ã®ãã¹ãŠã®ããã¹ãã§ããããšã瀺ããŸã |
{...} | äžæ¬åŒ§ã¯ãåŒæ°ã次ã®æ®µèœãŸã§ã®ããã¹ãå šäœã§ããããšã瀺ããŸãã 段èœã¯ã空çœè¡ãŸãã¯åºåãã³ãã³ãã§åºåãããŸãã |
ãœãŒã¹ã³ãŒãã®ã³ã¢èŠçŽ ã®ææžå
ããã§ãäžè¬çãªãã¡ã€ã«ããã¯ã©ã¹ãæ§é ãé¢æ°ãã¡ãœããã«è³ããŸã§ããœãŒã¹ã³ãŒãã®ããŸããŸãªèŠçŽ ãææžåããç¹å®ã®æ©èœãæ€èšã§ããŸãã
ãã¡ã€ã«ã®ããã¥ã¡ã³ã
ç®çã説æããããã¥ã¡ã³ããããã¯ããã¡ã€ã«ã®å é ã«è¿œå ããããšããå§ãããŸãã ãã®ãããã¯ããã¡ã€ã«ã«å±ããŠããããšã瀺ãã«ã¯ã \ fileã³ãã³ãã䜿çšããå¿ èŠããããŸã ïŒãŸãããã©ã¡ãŒã¿ãŒãšããŠããã®ãããã¯ãå±ãããã¡ã€ã«ãžã®ãã¹ãæå®ã§ããŸãããããã©ã«ãã§ã¯ããããã¯ãè¿œå ããããã¡ã€ã«ãéžæãããŸããç§ãã¡ã®ããŒãºã«å¯Ÿå¿ããŠããŸãïŒã
/*! \file \brief , */ #ifndef CLASSES_H #define CLASSES_H ... #endif // CLASSES_H
é¢æ°ãšã¡ãœããã®ææžå
é¢æ°ãšã¡ãœãããææžåããå Žåãã»ãšãã©ã®å Žåãå ¥åãã©ã¡ãŒã¿ãŒãé¢æ°ã«ãã£ãŠè¿ãããå€ãããã³èããããäŸå€ãæå®ããå¿ èŠããããŸãã é©åãªã³ãã³ããé çªã«æ€èšããŠãã ããã
ãã©ã¡ãŒã¿
ãã©ã¡ãŒã¿ãŒãæå®ããã«ã¯ãé¢æ°ãã©ã¡ãŒã¿ãŒããšã«\ paramã³ãã³ãã䜿çšããå¿ èŠããããŸããã³ãã³ãæ§æã¯æ¬¡ã®ãšããã§ãã
\param [<>] <_> {_}
ã³ãã³ãã®ã³ã³ããŒãã³ãã®æå³ãèæ ®ããŠãã ããã
- ãã©ã¡ãŒã¿ãŒã®ååã¯ãææžåãããã³ãŒãã§ãã®ãã©ã¡ãŒã¿ãŒãèªèãããååã§ãã
- ãã©ã¡ãŒã¿ãŒã®èª¬æã¯ã䜿çšããããã©ã¡ãŒã¿ãŒã®ç°¡åãªããã¹ã説æã§ãã
- æ¹åã¯ããã©ã¡ãŒã¿ãŒã®ç®çã瀺ããªãã·ã§ã³ã®å±æ§ã§ããã3ã€ã®å€ã[in]ããã[out]ããã[inãout]ããæã€ããšãã§ããŸãã
ããã«äŸã«é²ãã§ãã ããã
/*! \param[out] dest \param[in] src \param[in] n , */ void memcpy(void *dest, const void *src, size_t n);
ãã®çµæãé¢æ°ã®ãã®ãããªãã¡ããšããããã¥ã¡ã³ããååŸããŸãã
æ»ãå€
æ»ãå€ãèšè¿°ããã«ã¯ã \ returnã³ãã³ãïŒãŸãã¯ãã®é¡äŒŒã®\ return ïŒã䜿çšããŸã ã æ§æã¯æ¬¡ã®ãšããã§ãã
\return {__}
æ»ãå€ã®èª¬æãå«ãäŸãèããŠã¿ãŸãããïŒãã®å Žåããã©ã¡ãŒã¿ãŒã1ã€ã®ã³ãã³ãã䜿çšããŠèª¬æããããã®çµæã説æã«äžç·ã«é 眮ãããããšã«æ³šæããŠãã ããïŒã
/*! \param a,b \return , */ double sum(const double a, const double b);
次ã®çµæãåŸãããŸãã
äŸå€
äŸå€ã瀺ãã«ã¯ã \ throwã³ãã³ãïŒãŸãã¯ãã®å矩èªïŒ \ throws ã \ exception ïŒã䜿çšããŸãã圢åŒã¯æ¬¡ã®ãšããã§ãã
\throw <-> {}
æãç°¡åãªäŸã以äžã«ç€ºããŸãã
\throw std::bad_alloc
ã¯ã©ã¹ã®ããã¥ã¡ã³ã
ã¯ã©ã¹ã®åã«ããã¥ã¡ã³ããããã¯ãè¿œå ããã ãã§ãã¯ã©ã¹ãããã¥ã¡ã³ãåããããšãã§ããŸãã åæã«ãDoxygenã¯èšèªã®æ§æãäžãããããšå€§éã®æ å ±ãèªåçã«åä¿¡ãããããã¯ã©ã¹ãããã¥ã¡ã³ãåããã¿ã¹ã¯ã¯å€§å¹ ã«ç°¡çŽ åãããŸãã ãã®ãããããã¥ã¡ã³ãåããéã«ãDoxygenã¯ã¯ã©ã¹ã®ã¡ãœãããšã¡ã³ããŒãé¢æ°ãžã®ã¢ã¯ã»ã¹ã¬ãã«ã䜿ããããé¢æ°ãªã©ãèªåçã«å®çŸ©ããŸãã
ã䜿çšã®èšèªãã¢ã¯ã»ã¹ã¬ãã«ãã¡ãœããã®äœæãªã©ã®ç¹å®ã®æŠå¿µãæ瀺çã«ãµããŒãããŠããªããããããã®ååšãæ瀺ãããããã¥ã¡ã³ãã§äœããã®æ¹æ³ã§åŒ·èª¿ãããå Žåã¯ãããã€ãã®ã³ãã³ãããããŸãïŒããšãã°ã \ public ã \ private ã\ protectedã \ memberof ïŒããããã«ã€ããŠDoxygenãæ瀺çã«ç€ºãããšãã§ããŸãã
åæããã¥ã¡ã³ã
åæã®ææžåã¯ãä»ã®èŠçŽ ã®ææžåãšå€§å·®ãããŸããã ãããã䟿å©ã«ææžåããæ¹æ³ã瀺ãäŸãèããŠã¿ãŸãããã
/// enum States { Disabled, ///< , Undefined, ///< , Enabled, ///< , }
ã€ãŸããç¶æ ã®èª¬æã¯ãå®éã«ã¯ãç°¡åãªèª¬æãŸãã¯è©³çŽ°ãªèª¬æã®å©ããåããŠç€ºãããŸãïŒãã®å Žåãããã¯åœ¹å²ãæãããŸããïŒã
çµæã¯æ¬¡ã®ããã«ãªããŸãã
ã¢ãžã¥ãŒã«
ããã¥ã¡ã³ãå ã®ã¢ãžã¥ãŒã«ã®äœæã«ã¯ç¹å¥ãªæ³šæãæãå¿ èŠããããŸããããã¯ãã¢ãžã¥ãŒã«ãããã²ãŒãããæã䟿å©ãªæ¹æ³ã®1ã€ã§ããããã®æ§é åã®ããã®å¹æçãªããŒã«ã§ããããã§ãã ããã§ã¢ãžã¥ãŒã«ããšã®é©åãªã°ã«ãŒãåã®äŸãèŠãããšãã§ããŸã ã
次ã«ãèŠç¹ãç°¡åã«æ€èšããäŸã瀺ããŸããããã¹ãŠã®è€éããç解ãããå Žåã¯ãããã¥ã¡ã³ãã®å¯Ÿå¿ããã»ã¯ã·ã§ã³ã«ç®ãåããå¿ èŠããããŸã ã
ã¢ãžã¥ãŒã«äœæ
ã¢ãžã¥ãŒã«ã宣èšããã«ã¯ã \ defgroupã³ãã³ãã䜿çšããããšããå§ãããŸãããã®ã³ãã³ãã¯ããã¥ã¡ã³ããããã¯ã§å²ãå¿ èŠããããŸãã
\defgroup <> ( )
ã¢ãžã¥ãŒã«èå¥åã¯ã©ãã³èªã§æžãããäžæã®åèªã§ãããåŸã§ãã®ã¢ãžã¥ãŒã«ãåç §ããããã«äœ¿çšãããŸãã ã¢ãžã¥ãŒã«ã®ã¿ã€ãã«ã¯ãããã¥ã¡ã³ãã«è¡šç€ºãããä»»æã®åèªãŸãã¯æïŒã§ããã°çããã®ïŒã§ãã
ã¢ãžã¥ãŒã«ã説æãããšããç¹å®ã®ã¢ãžã¥ãŒã«ã®ç®çãæããã«ããããã®ç°¡æœã§è©³çŽ°ãªèª¬æãè¿œå ããããšãã§ããããšã«æ³šæããŠãã ãããäŸãã°ïŒ
/*! \defgroup maze_generation \brief , . : Eller's algorithm, randomized Kruskal's algorithm, cellular automaton algorithm, randomized Prim's algorithm. */
ã¢ãžã¥ãŒã«å ã®ææžåãããèŠçŽ ã®é 眮
ãã®èŠçŽ ãŸãã¯ãã®ææžåãããèŠçŽ ãã¢ãžã¥ãŒã«ã«åž°å±ãããã«ã¯ã2ã€ã®ã¢ãããŒãããããŸãã
æåã®ã¢ãããŒãã¯ã \ ingroupã³ãã³ãã䜿çšããããšã§ãã
\ingroup <> ( )
æ¬ ç¹ã¯ããã®ã³ãã³ãããœãŒã¹ã³ãŒãã®åèŠçŽ ã®ããã¥ã¡ã³ããããã¯ã«è¿œå ããå¿ èŠãããããšã§ããåãã¢ãžã¥ãŒã«å ã«ã¯éåžžã«å€ãã®èŠçŽ ãããããã§ãã
ãããã£ãŠãå¥ã®ã¢ãããŒããå¿ èŠã§ããã2çªç®ã®ã¢ãããŒãã¯ã°ã«ãŒãã®éå§ããã³çµäºã³ãã³ã@ {ããã³@}ã䜿çšããããšã§ãã \ defgroup ã \ addtogroup ãããã³\ weakgroupã³ãã³ããšãšãã«äœ¿çšãããããšã«æ³šæããŠãã ããã
䜿çšäŸã以äžã«ç€ºããŸãã
/*! \defgroup <> ( ) @{ */ _ /*! @} */
ãã®äŸã®æå³ã¯æ確ã§ããå¿ èŠããããŸããã¢ãžã¥ãŒã«ã宣èšããã¢ãžã¥ãŒã«ã®æåãšæåŸã®æåã§å²ãŸããç¹å®ã®ææžåãããèŠçŽ ãè¿œå ããŸãã
ãã ããã¢ãžã¥ãŒã«ã¯1åå®çŸ©ããå¿ èŠãããããã®å®£èšã¯1ã€ã®ãã¡ã€ã«ã®ã¿ã«å«ãŸããŸãããŸãã1ã€ã®ã¢ãžã¥ãŒã«ã®èŠçŽ ãç°ãªããã¡ã€ã«ã«åå²ãããããšããããããããã°ã«ãŒããåå®çŸ©ããã«1ã€è¿œå ãã\ addtogroupã³ãã³ãã䜿çšããå¿ èŠããããŸãå¥ã®èŠçŽ ïŒ
/*! \addtogroup <> [( )] @{ */ _ /*! @} */
ã¢ãžã¥ãŒã«åã¯ãªãã·ã§ã³ã§ãã å®éããã®ã³ãã³ãã¯\ defgroupã³ãã³ãã®é¡äŒŒç©ãšããŠäœ¿çšã§ãã察å¿ããã¢ãžã¥ãŒã«ãå®çŸ©ãããŠããªãå Žåã察å¿ããååãšèå¥åã§äœæãããŸãã
æåŸã«ã \ weakgroupã³ãã³ãã¯\ addtogroupã³ãã³ããšäŒŒãŠããŸãããç°ãªãã¢ãžã¥ãŒã«ãžã®åãèŠçŽ ã®å²ãåœãŠã«é¢é£ãã競åãããå Žåããããšæ¯èŒããŠåçŽã«åªå é äœãäœããšããéãããããŸãã
ãµãã¢ãžã¥ãŒã«ã®äœæ
ãµãã¢ãžã¥ãŒã«ãäœæããã«ã¯ããµãã¢ãžã¥ãŒã«ãå®çŸ©ãããšãã«ãä»ã®ææžåãããèŠçŽ ã®ããã«ãç¹å®ã®ãµãã¢ãžã¥ãŒã«ã«å±æ§ãå²ãåœãŠãã ãã§ååã§ãã
以äžã«äŸã瀺ããŸãã
/*! \defgroup main_module */ /*! \defgroup second_module \ingroup main_module */
è€æ°ã®ã¢ãžã¥ãŒã«ãäœæããäŸ
以äžã¯ãã¢ãžã¥ãŒã«ãäœæãã詳现ãªäŸã§ãã
ãã¡ã€ã«generate_maze.h
/*! \defgroup generate_mazes \ingroup maze \brief , . : Eller's algorithm, randomized Kruskal's algorithm, cellular automaton algorithm, randomized Prim's algorithm. */ ///@{ /*! \brief \param width, height \returns , Maze */ Maze generateEller(int width, int height); /*! \brief \param width, height \returns , Maze */ Maze generateKruskal(int width, int height); /*! \brief \param width, height \returns , Maze */ Maze generatePrim(int width, int height); /*! \brief \param width, height \returns , Maze */ Maze generateCellular(int width, int height); ///@}
Maze.hãã¡ã€ã«
/*! \defgroup maze \brief , */ ///@{ class Maze { /* */ }; ///@}
ææžåãããã¯ã®ã¿ã€ããåè¿°ã®äŸãšæ¯èŒããŠãããã«å€æŽãããŠããããšã«æ³šæããŠãã ãããããããåè¿°ããããã«ãããã¯åºæ¬çãªåœ¹å²ãæããããããè¿ããªãã·ã§ã³ãéžæããŸãã
ãã®çµæã次ã®ããã¥ã¡ã³ããååŸããŸãã
ããã¥ã¡ã³ãã®ããã¹ã圢åŒ
ããã§ãã³ãŒãã®äž»èŠãªèŠçŽ ãææžåããæ¹æ³ãäžè¬çãªçšèªã§ç解ããåŸãææžãããèŠèŠçã§è¡šçŸåè±ãã§å®å šãªãã®ã«ããæ¹æ³ãæ€èšããŸãã
ããã¥ã¡ã³ãå ã®ã³ãŒã
ããšãã°ãããã¥ã¡ã³ãã®èª¬æã®äžã«ã¯ãããšãã°ãæ©èœã説æããããã®ã³ãŒããè¿œå ããå¿ èŠããããŸãã
\ Codeããã³\ endcodeã³ãã³ã
ãããè¡ãæãç°¡åã§æãæ®éçãªæ¹æ³ã®1ã€ã¯ã次ã®ããã«é©çšããã\ codeããã³\ endcodeã³ãã³ãã䜿çšããããšã§ãã
\code [ {<>}] ... \endcode
䜿çšãããèšèªã¯ãããã¥ã¡ã³ããããã¯ãé 眮ãããŠãããã¡ã€ã«æ¡åŒµåã«å¿ããŠèªåçã«æ±ºå®ãããŸããããã®åäœãæåŸ ãæºãããŠããªãå Žåã¯ãæ¡åŒµåãæ瀺çã«æå®ã§ããŸãã
䜿çšäŸãèããŠã¿ãŸãããã
/*! \brief \param a,b , , . : \code int gcd(int a, int b) { int r; while (b) { r = a % b; a = b; b = r; } return r; } \endcode */ int gcd(int a, int b);
çµæã¯æ¬¡ã®ããã«ãªããŸãã
ã³ãŒãäŸ
å¥ã®ãã¡ã€ã«ã§ã³ãŒãã䜿çšããæ¹æ³ã®äŸã瀺ãæ¹ã䟿å©ãªå ŽåããããŸãããããè¡ãã«ã¯ããããã®ãã¡ã€ã«ãå¥ã®ãã£ã¬ã¯ããªã«é 眮ããèšå®ã§ãã¹ãèšå®ããå¿ èŠããããŸãã
EXAMPLE_PATH = __
ããã¥ã¡ã³ãã§ã³ãŒãäŸã䜿çšã§ããããã€ãã®æ¹æ³ãæ€èšããŠãã ããã
\
ã³ãã³ãäŸãã®ã³ãã³ãã¯ãããã¥ã¡ã³ããããã¯ããµã³ãã«ã³ãŒããåç §ããŠããããšã瀺ããŠããŸãã
\example <_>
ãœãŒã¹ã³ãŒãã®ããã¹ãããäŸãã»ã¯ã·ã§ã³ã«è¿œå ãããäŸã®ãœãŒã¹ã³ãŒãã§ææžåãããèŠçŽ ããã§ãã¯ãããèŠã€ãã£ãå Žåã¯äŸãžã®ãªã³ã¯ã説æã«è¿œå ãããŸãã
Gcd.hãã¡ã€ã«
/*! \brief \param a,b , , . */ int gcd(int a, int b); /*! \example main.cpp , */
ãã¡ã€ã«äŸ/ main.cpp
, EXAMPLE_PATH = examples
void main() { int result = gcd(52,106); }
\ includeã³ãã³ã
ææžåãããèŠçŽ ã®èª¬æã«ãµã³ãã«ã³ãŒããè¿œå ããããã«ã\ includeã³ãã³ãã䜿çšãããŸããäžè¬çãªåœ¢åŒã¯æ¬¡ã®ãšããã§ãã
\include <_>
ãã¡ã€ã«ã®å 容ãå®å šã«ã³ããŒããã³ãŒãã®ãããã¯ãšããŠããã¥ã¡ã³ãã«æ¿å ¥ããŸãïŒ\ codeã³ãã³ãã§å§ãŸã\ endcodeã³ãã³ãã§çµãããããã¯å ã®ã³ãŒãããã©ãŒãããããã®ã«äŒŒãŠããŸãïŒã
ããŒã \ã¹ãããã
ããŒã \ã¹ããããåã®ããŒã ãšåæ§ã«ãããã¯ããªããå šäœã®ãã¡ã€ã«ãæ¿å ¥ããããšãå¯èœã«ãããã®å ·äœçãªéè·¯ãåœç¶ã®ããšãªããããã®åœ¢åŒã¯ãããã«ç°ãªããŸãã
\snippet <_> ( _ )
ç¹å®ã®ã³ãŒããã©ã°ã¡ã³ãã匷調衚瀺ããã«ã¯ããã©ã°ã¡ã³ãåã®å é ãšæ«å°Ÿã«ããã¥ã¡ã³ããããã¯ãé 眮ããå¿ èŠããããŸãã
/// [ _ ] ... /// [ _ ]
ææžåããããªããžã§ã¯ãã³ãŒãã®èªåå®è£
æåŸã«ãDoxygenã¯ãé¢æ°ãã¡ãœãããã¯ã©ã¹ãæ§é ãªã©ã®æ¬äœã詳现ãªèª¬æã«èªåçã«æ¿å ¥ããæ©èœããµããŒãããŠããŸãããããè¡ãã«ã¯ã次ã®ãªãã·ã§ã³ã䜿çšããŸãã
INLINE_SOURCES = YES
LaTeXã䜿çšããæ°åŒ
Doxygenã䜿çšãããšãããã¥ã¡ã³ãã§TeXã®åŒãçŽæ¥äœ¿çšã§ããŸããéåžžã«äŸ¿å©ã§ãçµæã¯éåžžã«ãŸãšãã§ãããã ããå¶éãããããšã«æ³šæããŠãã ãããçŸæç¹ã§ã¯ãåŒã¯HTMLããã³LaTeXã®ããã¥ã¡ã³ãã«ããæ¿å ¥ã§ããŸããããéåžžã¯ããã§ååã§ãã
æ°åŒã衚瀺ããã«ã¯ãçŸåš2ã€ã®ã¢ãããŒãããããŸãã
- MathJaxã䜿çšããŠæ°åŒã衚瀺ããã«ã¯ãèšå®ãã¡ã€ã«ã§é©åãªãªãã·ã§ã³ãèšå®ããå¿
èŠããããŸãã
USE_MATHJAX = YES
- é©åãªç»åãçæããããã¥ã¡ã³ãã«æ¿å
¥ããŸãããããã¯ãã¹ãŠèªåçã«è¡ãããŸããã次ã®ããŒã«ãå¿
èŠã«ãªããŸãïŒlatexãdvipsãgsãããã©ã«ãã§ã¯ãåŒã¯ãã®ããã«è¡šç€ºãããŸãã
æ°åŒãããã¥ã¡ã³ãã«è¿œå ããæ¹æ³
ããã¥ã¡ã³ãã«åŒãè¿œå ããã«ã¯ã3ã€ã®æ¹æ³ããããŸããããã¥ã¡ã³ãã®äŸã䜿çšããŠããããããé£ç¶ããŠæ€èšããŸãã
- å°æåã®åŒã䜿çšããŸããããã¯ãã³ãã³ãã\ f $ãã§å§ãŸããšçµãããå²ãŸããŠããŸãã以äžã«äŸã瀺ããŸãã
\f$(x_1,y_1)\f$ \f$(x_2,y_2)\f$ \f$\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}\f$.
çµæã¯æ¬¡ã®ãããªç·ã«ãªããŸãã ãã㊠çãã
- å¥ã®è¡ããå§ãŸããäžå€®ã«é
眮ããããªã¢ãŒãåŒã®äœ¿çšãåã®åŒãšã¯ç°ãªãããããã¯ã³ãã³ãã\ f [ãã§å§ãŸããã³ãã³ãã\ f]ãã§çµããã«å²ãŸããŠããŸãã以äžã«äŸã瀺ããŸãã
\f[ |I_2|=\left| \int_{0}^T \psi(t) \left\{ u(a,t)- \int_{\gamma(t)}^a \frac{d\theta}{k(\theta,t)} \int_{a}^\theta c(\xi)u_t(\xi,t)\,d\xi \right\} dt \right| \f]
çµæã¯æ¬¡ã®ãããªè¡ã«ãªããŸãã
- ã³ãã³ãã\ F {}ç°å¢ããããç°å¢ããã¯ã©ããã¯ã¹äžã®ç¹å®ã®ç°å¢ã®ååã§ãã- ãéåžžã®LaTeXããã¥ã¡ã³ãã§æå®ãããŠãããã®ããã«ãæå®ãããç°å¢ã䜿çšã§ããŸãã以äžã«äŸã瀺ããŸãã
\f{eqnarray*}{ g &=& \frac{Gm_2}{r^2} \\ &=& \frac{(6.673 \times 10^{-11}\,\mbox{m}^3\,\mbox{kg}^{-1}\, \mbox{s}^{-2})(5.9736 \times 10^{24}\,\mbox{kg})}{(6371.01\,\mbox{km})^2} \\ &=& 9.82066032\,\mbox{m/s}^2 \f}
ãã®çµæã次ã®çµæãåŸãããŸãïŒeqnarray *ç°å¢ã¯ãããã€ãã®æ°åŒãé 眮ããããã®çªå·ä»ããããŠããªãç°å¢ã§ãïŒã
ããã¥ã¡ã³ãå ã®åŒã®å°å ¥äŸ
LaTeXæ°åŒã䜿çšããããã¥ã¡ã³ãã®ç¹å®ã®äŸãèããŠã¿ãŸãããã
/*! \brief \f$ n \f$ \param n - , \return \f$ n! \f$ \f$ n \f$, : \f[ n! = \prod_{i = 1}^ni \f] */ int factorial(int n);
çµæã¯ä»¥äžã®ãšããã§ãã
Markdownã«ã€ããŠç°¡åã«
Markdownã¯è»œéã®ããŒã¯ã¢ããèšèªã§ãïŒããšãã°ããã¡ãã®ããã¥ã¡ã³ããããã¥ã¡ã³ãã®ç¹å¥ãªã»ã¯ã·ã§ã³ãåç §ããŠãã ããïŒãããŒãžã§ã³1.8.0以éãDoxygenã¯ãããŸã§éå®çãªãµããŒããæäŸããããã¥ã¡ã³ããæŽçããæ¹æ³ã®1ã€ãšããŠæ©èœããŸãïŒããšãã°ãããã¥ã¡ã³ããŸãã¯HTMLæ¿å ¥ãåŠçããã³ãã³ãããããŸãããããã¯æ®éçã§ã¯ãããŸããïŒã
ãã®èšèªã®è©³çŽ°ãšååãããã§èª¬æããããããŸããããããã£ãŠããã®èšèªã§ããã¥ã¡ã³ãããè£ é£Ÿãããæ¹æ³ãæ€èšããããšã«éå®ããŸãã
/*! ------------------------------------------ : - ; - ; - ; - . : > . , , , , . â , . > â CAR Hoare . ![ ](image.png) */ int getRandomNumber();
çµæã¯ä»¥äžã®ãšããã§ãã
ãŸãšãããš
ãã®ç®èãªããšã«ãç§ã¯ãããããšã«ããŸããããŸã 説æã觊ãããããŠããªãããšã¯å®å šã«ç解ããŠããŸããããã®èšäºãããã¥ã¡ã³ããžã§ãã¬ãŒã¿ãŒã®æŠå¿µã玹ä»ããDoxygenã·ã¹ãã ã«ç²Ÿéããããã¥ã¡ã³ãã®åºæ¬ååãšã¢ãããŒãã説æããé¢é£ããåé¡ã«ç°¡åã«è§Šãããšããäž»èŠãªç®æšãéæããããšãé¡ã£ãŠããŸããã®èšèšãšè©³çŽ°ã䜿çšããŠãå°æ¥ã®äœæ¥ã«åããŠæºåãæŽããŸãã
ãæž èŽããããšãããããŸããïŒ
ãããªãç 究ã®ããã®æç®ãšåèæç®
1.èšäºã®å·çæã«äœ¿çšãããäž»ãªæ å ±æºã¯å ¬åŒææžã§ããã
2. Doxygenã«é¢é£ããå€æ°ã®è³ªåã«ã€ããŠãããã§åçãå¯ããããŸããïŒDoxygenã®äœæè ãããŸãïŒã
ãµã€ã¯ã«ã®ç¶ç¶3ïŒããã¥ã¡ã³ãã®å€èŠ³ãã¶ã€ã³ãDoxygenã®ã®ã°ã©ããšãã£ãŒãã®æ§æã