๋ฐ˜์‘ํ˜•

Doxygen ์‚ฌ์šฉ์„ ์œ„ํ•œ ๋ณธ๋ฌธ์€ ์•„๋ž˜ ๋งํฌ๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”.

[Doxygen] ๋…์‹œ์  ์œผ๋กœ ์ฝ”๋“œ ๋ฌธ์„œ ๋งŒ๋“ค๊ธฐ ์ด์ •๋ฆฌ (์˜ˆ์ œ ํฌํ•จ)

 

[Doxygen] ๋…์‹œ์  ์œผ๋กœ ์ฝ”๋“œ ๋ฌธ์„œ ๋งŒ๋“ค๊ธฐ ์ด์ •๋ฆฌ (์˜ˆ์ œ ํฌํ•จ)

๋…์‹œ์  (Doxygen)์ด๋ž€? ํ˜น์‹œ ํŠน์ • ํšŒ์‚ฌ์—์„œ ์ œ๊ณตํ•˜๋Š” SDK(Software Development Kit)๋ฅผ ์‚ฌ์šฉํ•ด ๋ณธ ๊ฒฝํ—˜์ด ์žˆ๋‚˜์š”? ์žˆ๋‹ค๋ฉด, ์ฒ˜์Œ ์‚ฌ์šฉํ•˜๋Š” SDK๋ฅผ ์ดํ•ดํ•˜๊ธฐ ์œ„ํ•ด ๋ž˜ํผ๋Ÿฐ์Šค ๋งค๋‰ด์–ผ์„ ์ฝ์–ด๋ณธ ์ ์ด ์žˆ๋‚˜์š”? SDK๋ฅผ ์‚ฌ

luckygg.tistory.com

Doxygen ๋ฌธ๋ฒ•

๋…์‹œ์  ์€ ๋งˆํฌ๋‹ค์šด(Markdown)๊ณผ HTML, XML ๋ช…๋ น์–ด ๋ชจ๋‘ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋ฌธ์„œ๋ฅผ ๋งŒ๋“ค๊ธฐ ์œ„ํ•ด์„œ๋Š” Doxygen ๋ฌธ๋ฒ•๋Œ€๋กœ ์ž‘์„ฑํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. Doxygen์€ ๋งŽ์€ ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•˜์ง€๋งŒ, ๋ณธ๋ฌธ์—์„œ๋Š” ๊ทธ์ค‘์—์„œ๋„ ๊ฐ€์žฅ ๋งŽ์ด ์‚ฌ์šฉ๋˜๋Š” ๋ฌธ๋ฒ•๋งŒ ์ •๋ฆฌํ•ด ๋ณด์•˜์Šต๋‹ˆ๋‹ค.

Doxygen์˜ ๊ธฐ๋ณธ ๋ฌธ๋ฒ•์€ ์•„๋ž˜ ๋งํฌ๋ฅผ ๋จผ์ € ์ฐธ๊ณ ํ•˜์…”๋„ ๋˜๊ฒ ์Šต๋‹ˆ๋‹ค.

https://www.doxygen.nl/manual/docblocks.html

 

Doxygen Manual: Documenting the code

This chapter covers two topics: How to put comments in your code such that doxygen incorporates them in the documentation it generates. This is further detailed in the next section. Ways to structure the contents of a comment block such that the output loo

www.doxygen.nl

์•ž์œผ๋กœ ์ด์–ด์งˆ ์„ค๋ช…์—๋Š” ์†Œ์Šค ์ฝ”๋“œ์—์„œ ์ฃผ์„์„ ์ž‘์„ฑํ•˜๋Š” ๋ฐฉ๋ฒ•๊ณผ ํŽ˜์ด์ง€๋ฅผ ์ถ”๊ฐ€ํ•˜๊ณ  ํŽ˜์ด์ง€์—์„œ ๋ณธ๋ฌธ์„ ์ž‘์„ฑํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์„ค๋ช…ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

์†Œ์Šค ์ฝ”๋“œ์˜ ์ฃผ์„ ์ž‘์„ฑ ๋ฐฉ๋ฒ•

Doxygen ์ฃผ์„ ํ˜•์‹

๋…์‹œ์   ์ฃผ์„์˜ ์‹œ์ž‘์€ /*!์ด๊ณ , ๋์€ */์ž…๋‹ˆ๋‹ค. ์ด ๋ฐฉ๋ฒ• ์™ธ์—๋„ ///๋˜๋Š” /**๋„ ์žˆ๊ธด ํ•˜์ง€๋งŒ, ๊ฐœ์ธ์ ์ธ ์ทจํ–ฅ์œผ๋ก  ์•„๋ž˜ ๋ฐฉ์‹์„ ์„ ํ˜ธํ•ฉ๋‹ˆ๋‹ค.

/*!
* ๋ฉ”์‹œ์ง€ 
*/

๊ทธ๋ฆฌ๊ณ  ๋ฉ”์‹œ์ง€๋ฅผ ๋‚จ๊ธธ ๋•Œ ๋งจ ์•ž์— *ํ‘œ์‹œ๋Š” ์—†์–ด๋„ ๋˜์ง€๋งŒ, ์ด๊ฒƒ๋„ ์ทจํ–ฅ ์ฐจ์ด์ž…๋‹ˆ๋‹ค.

๋…์‹œ์   ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ \๋˜๋Š” @๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ์˜ˆ์‹œ๋Š” ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.

/*!
@section
*/

/*!
\section
*/

namespace, class ์ฃผ์„ ๋‹ฌ๊ธฐ

namespace์™€ classํ˜•์‹์€ ๊ฐ„๋‹จํ•ฉ๋‹ˆ๋‹ค.

/**
* @namespace Figure
* @brief [๋ชฉ๋ก์— ๋ณด์—ฌ์ง€๋Š” ์งง์€ ์„ค๋ช…]
*/
namespace Figure
{
	/**
	* @class Line
	* @brief [๋ชฉ๋ก์— ๋ณด์—ฌ์ง€๋Š” ์งง์€ ์„ค๋ช…]
	*/
	class Line : public IFigure
	{
    	//...
    }
}

์œ„ ์ฃผ์„์€ ์•„๋ž˜์™€ ๊ฐ™์ด ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค. ์‚ฌ์‹ค @namespace [์ด๋ฆ„]๋˜๋Š” @class [์ด๋ฆ„]์„ ๊ตณ์ด ์ ์ง€ ์•Š๊ณ , namespace๋‚˜ class๋ฐ”๋กœ ์œ„์— @brief [์„ค๋ช…]๋งŒ ์ ์–ด๋„ ๋ฉ๋‹ˆ๋‹ค.

namespace์™€ class์˜ ์„ค๋ช…
namespace์™€ class์˜ ์„ค๋ช…

ํ•จ์ˆ˜ ์ฃผ์„ ๋‹ฌ๊ธฐ

ํ•จ์ˆ˜์˜ ์ฃผ์„์€ ๊ธฐ๋ณธ์ ์œผ๋กœ ์•„๋ž˜์™€ ๊ฐ™์ด ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค.

/**
* @details ๋‘ ์ •์ˆ˜๋ฅผ ๋”ํ•˜๋Š” ๋™์ž‘์„ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.
* @param[in] a ์ˆซ์ž1
* @param[in] b ์ˆซ์ž2
* @param[out] c ๊ฒฐ๊ณผ
* @return void
*/
void Sum(int a, int b, int *c);

์œ„ ๊ธฐ๋ณธ ํ˜•์— bug๋‚˜ todo, see also, example ๋“ฑ์˜ ๋‚ด์šฉ๋„ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด์— ๋Œ€ํ•œ ๋‚ด์šฉ์€ ๊ณ„์†ํ•ด์„œ ์„ค๋ช…ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

ํ•  ์ผ(To Do), ์ฃผ์˜ ์‚ฌํ•ญ(Warning) ๋“ฑ ์‚ฌ์šฉ์ž์—๊ฒŒ ์ฐธ๊ณ  ๋ฉ”์‹œ์ง€ ํ‘œ์‹œํ•˜๊ธฐ

๋ฉ”์‹œ์ง€ ํ‘œ์‹œ
๋ฉ”์‹œ์ง€ ํ‘œ์‹œ

SDK ๋ž˜ํผ๋Ÿฐ์Šค ๋งค๋‰ด์–ผ(Reference Maunal)์—์„œ ์•„๋ž˜์— ํ‘œ์‹œํ•œ ์ฐธ๊ณ (see also) ๋˜๋Š” ์œ„์™€ ๊ฐ™์ด ๊ฒฝ๊ณ (warning)๋‚˜ ์ „์ œ์กฐ๊ฑด(precondition)์„ ๋ณธ ์ ์ด ์žˆ์„ ๊ฒ๋‹ˆ๋‹ค.

์ฐธ๊ณ (see also) ๋งˆํฌ
์ฐธ๊ณ (see also) ๋งˆํฌ

์œ„์™€ ๊ฐ™์€ ๋งˆํ‚น์€ ์•„๋ž˜์˜ ๋ฌธ๋ฒ•์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

* @note ์ฐธ๊ณ  ์„ค๋ช…
* @todo ํ•  ์ผ ์„ค๋ช…
* @pre ๋ฏธ๋ฆฌ ํ˜ธ์ถœํ•ด์•ผ ํ•  ์‚ฌํ•ญ
* @bug ๋ฒ„๊ทธ ์„ค๋ช…
* @warning ์ฐธ๊ณ  ๋งํฌ, ํŽ˜์ด์ง€
* @see ์ฐธ๊ณ ํ•  ํ•จ์ˆ˜ ๋˜๋Š” ํŽ˜์ด์ง€

์•„๋ž˜์™€ ๊ฐ™์ด ์ž‘์„ฑํ•˜๊ณ  ๋ฌธ์„œ๋ฅผ ์ƒ์„ฑํ•ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

/**
* @details ๋‘ ์ •์ˆ˜๋ฅผ ๋”ํ•˜๋Š” ๋™์ž‘์„ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.
* @param[in] a ์ˆซ์ž1
* @param[in] b ์ˆซ์ž2
* @param[out] c ๊ฒฐ๊ณผ
* @return void
* @warning int ํ˜•๋งŒ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค.
* @bug ๋ฒ„๊ทธ ์‚ฌํ•ญ
* @todo ํ•ด์•ผ ํ•  ์ผ
* @see ์ด๊ณณ์— ํŽ˜์ด์ง€, ํ•จ์ˆ˜ ์ด๋ฆ„์„ ์ž‘์„ฑํ•˜๋ฉด ์ž๋™ ๋งํฌ๋ฉ๋‹ˆ๋‹ค. Sub() ์ฐธ๊ณ .
*/
void Sum(int a, int b, int *c);

๋งจ ๋งˆ์ง€๋ง‰ ์ฐธ๊ณ ์— Sub()์˜ ๋งํฌ๊ฐ€ ์ž๋™ ์ƒ์„ฑ๋˜์–ด ์—ฐ๊ฒฐ๋ฉ๋‹ˆ๋‹ค.

ํ•จ์ˆ˜์— ๋ฉ”์‹œ์ง€ ํ‘œ์‹œํ•˜๊ธฐ
ํ•จ์ˆ˜์— ๋ฉ”์‹œ์ง€ ํ‘œ์‹œํ•˜๊ธฐ

ํ•จ์ˆ˜์— ์˜ˆ์ œ ์ฝ”๋“œ(Example code) ์—ฐ๋™ํ•˜๊ธฐ

ํ•จ์ˆ˜ ์„ค๋ช… ์•„๋ž˜์— ์˜ˆ์ œ ์ฝ”๋“œ๋ฅผ ์—ฐ๊ฒฐํ•˜์—ฌ ์ฐธ๊ณ ํ•˜๋ผ๊ณ  ๊ฐ•์กฐํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹จ, Doxywizard์—์„œ EXAMPLE_PATH์— ์ƒ˜ํ”Œ ์ฝ”๋“œ๊ฐ€ ์ถ”๊ฐ€๋˜์–ด ์žˆ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

/**
* @details ๊ทธ๋ฆฌ๋Š” ๋™์ž‘์„ ํ•ฉ๋‹ˆ๋‹ค.
* @param g Graphics Handle
* @return void
* @note ์‚ฌ์šฉ์ž์—๊ฒŒ ์•Œ๋ ค์ฃผ๊ณ  ์‹ถ์€ ๋‚ด์šฉ ์ž‘์„ฑ
* @pre  ํ•ด๋‹น ํ•จ์ˆ˜ ํ˜ธ์ถœ ์ „ ํ•„์ˆ˜ ์‚ฌํ•ญ ์ž‘์„ฑ
* @bug  ๋ฒ„๊ทธ๊ฐ€ ์žˆ๋‹ค๋ฉด ์ž‘์„ฑ
* @warning ์ฃผ์˜ ์‚ฌํ•ญ ์ž‘์„ฑ
*/
virtual void Draw(Gdiplus::Graphics* g) override;
/** \example example.cpp
* ์ด ์˜ˆ์ œ๋Š” Figure::Line Class๋ฅผ ์–ด๋–ป๊ฒŒ ์‚ฌ์šฉํ•˜๋Š”์ง€ ์˜ˆ์‹œ๋ฅผ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค. ๋” ์ž์„ธํ•œ ๋‚ด์šฉ์€ Figure::Line Class๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”.
*/

Doxygen GUI์—์„œ Exptert > Input > EXAMPLE_PATH ํ•ญ๋ชฉ์— ์ƒ˜ํ”Œ ์ฝ”๋“œ ๊ฒฝ๋กœ๋ฅผ ์ถ”๊ฐ€ํ•˜์„ธ์š”.

์œ„ ์˜ˆ์ œ ์ฝ”๋“œ์˜ ๋ฌธ์„œ ๊ฒฐ๊ณผ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค. API ์„ค๋ช… ํ•˜๋‹จ์— ์˜ˆ์ œ๊ฐ€ ์ถ”๊ฐ€๋˜์—ˆ๊ณ , Navigation์—๋„ ์˜ˆ์ œ ๋ชฉ๋ก์ด ์ถ”๊ฐ€๋์Šต๋‹ˆ๋‹ค. example.cpp๋ฅผ ํด๋ฆญํ•˜๋ฉด ์˜ˆ์ œ ์ฝ”๋“œ์™€ ์„ค๋ช…์ด ๋ณด์ž…๋‹ˆ๋‹ค.

example code ์ถ”๊ฐ€ํ•œ ๊ฒฐ๊ณผ
example code ์ถ”๊ฐ€ํ•œ ๊ฒฐ๊ณผ

ํŽ˜์ด์ง€ ์ž‘์„ฑ ๋ฐฉ๋ฒ•

์ €๋Š” ๊ด€๋ฆฌ์˜ ํŽธ์˜์„ฑ์„ ์œ„ํ•ด ํŽ˜์ด์ง€๋ฅผ ์œ„ํ•œ ๋ณ„๋„์˜ ํ…์ŠคํŠธ ํŒŒ์ผ์„ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์†Œ์Šค ์ฝ”๋“œ์˜ ์ฃผ์„์€ *.h์—์„œ ์ž‘์„ฑํ•˜๊ณ , ํŽ˜์ด์ง€๋Š” *.txt์—์„œ ๊ด€๋ฆฌํ•˜๋Š” ๊ฒƒ์ด์ฃ .

์ฃผ์˜
 
 

์ผ๋ฐ˜ ๋ฉ”๋ชจ์žฅ์œผ๋กœ *.txtํŒŒ์ผ์„ ์ƒ์„ฑํ•˜๋ฉด UTF-8 ํฌ๋งท์œผ๋กœ ํ•œ๊ธ€์ด ๊นจ์ง€๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. Notepad++ ๋˜๋Š” Visual Studio์—์„œ ์ผ๋ฐ˜ ํ…์ŠคํŠธ ํŒŒ์ผ์„ ์ƒ์„ฑํ•˜์—ฌ CP949 ๋˜๋Š” EUC-KR ํฌ๋งท์„ ์‚ฌ์šฉํ•ด์•ผ ํ•œ๊ธ€์ด ์ •์ƒ์ ์œผ๋กœ ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค.

๋ฉ”์ธ ํŽ˜์ด์ง€ ์ถ”๊ฐ€ํ•˜๊ธฐ

ํ…์ŠคํŠธ ํŒŒ์ผ์„ ์ƒ์„ฑํ•˜๊ณ  ์•„๋ž˜์™€ ๊ฐ™์ด ์ฃผ์„์„ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค.

/*! @mainpage ๋ฉ”์ธ ํŽ˜์ด์ง€
* ๋‚ด์šฉ
*/

๋ฉ”์ธ ํŽ˜์ด์ง€๋Š” ๋งค๋‰ด์–ผ ํŒŒ์ผ ์‹คํ–‰ ์‹œ ์ตœ์ดˆ๋กœ ๋ณด์ด๋Š” ํŽ˜์ด์ง€์ž…๋‹ˆ๋‹ค.

์„œ๋ธŒ ํŽ˜์ด์ง€ ์ถ”๊ฐ€ํ•˜๊ธฐ

๋ฉ”์ธ ํŽ˜์ด์ง€ ์™ธ์—๋„ ์ผ๋ฐ˜ ํŽ˜์ด์ง€๋ฅผ ์ž‘์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ผ๋ฐ˜ ํŽ˜์ด์ง€๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์ฃผ์„์„ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค.

/*! @page subpage_1 ์„œ๋ธŒ ํŽ˜์ด์ง€
* ๋‚ด์šฉ
*/

์ฐธ๊ณ ๋กœ subpage_1์€ ํ•ด๋‹น ํŽ˜์ด์ง€์˜ ์ด๋ฆ„์ž…๋‹ˆ๋‹ค. ๋‹ค๋ฅธ ๊ณณ์—์„œ ์ด ์ด๋ฆ„์„ ์ž‘์„ฑํ•˜๋ฉด ์ž๋™์œผ๋กœ ํ•ด๋‹น ํŽ˜์ด์ง€๋กœ ๋งํฌ๋˜๋Š” ๊ฒƒ์ด์ฃ .

๋ฉ”์ธ ํŽ˜์ด์ง€์—์„œ ์„œ๋ธŒ ํŽ˜์ด์ง€ ์—ฐ๋™ํ•˜๊ธฐ

๋ฉ”์ธ ํŽ˜์ด์ง€์—์„œ ์„œ๋ธŒ ํŽ˜์ด์ง€๋ฅผ ์–ด๋–ป๊ฒŒ ์—ฐ๋™ํ•˜๋Š”์ง€ ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ๋ฉ”์ธ ํŽ˜์ด์ง€๋Š” @mainpage์ปค๋งจ๋“œ๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

/*! @mainpage ๋ฉ”์ธ ํŽ˜์ด์ง€
* Doxygen ๋งค๋‰ด์–ผ์„ ์‹คํ–‰ํ•˜๋ฉด ๋ณด์—ฌ์ง€๋Š” ์ฒซ ํŽ˜์ด์ง€์ž…๋‹ˆ๋‹ค.\n
* Doxygen์„ ์‚ฌ์šฉํ•˜๋Š”๋ฐ ์žˆ์–ด ๊ฐ€์žฅ ๊ธฐ๋ณธ์ ์ธ ์‚ฌ์šฉ ๋ฐฉ๋ฒ•์€ @subpage tips_page ํŽ˜์ด์ง€๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”.\n
*/

๊ฒฐ๊ณผ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค. ๋ชฉ์ฐจ๋ฅผ ๋ณด๋ฉด '๋ฉ”์ธ ํŽ˜์ด์ง€'์— 'Doxygen ํŒ'์ด๋ผ๋Š” ํŽ˜์ด์ง€๊ฐ€ ํ•˜์œ„๋กœ ์กด์žฌํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ๋ฉ”์ธ ํŽ˜์ด์ง€์˜ ๋‚ด์šฉ์—๋Š” 'Doxygen ํŒ'์ด๋ผ๋Š” ๋งํฌ๊ฐ€ ๊ฑธ๋ ค์žˆ๊ณ , ํด๋ฆญํ•˜๋ฉด ํ•ด๋‹น ํŽ˜์ด์ง€๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค.

๋ฉ”์ธ ํŽ˜์ด์ง€์™€ ์„œ๋ธŒ ํŽ˜์ด์ง€ ์—ฐ๋™ ๊ฒฐ๊ณผ
๋ฉ”์ธ ํŽ˜์ด์ง€์™€ ์„œ๋ธŒ ํŽ˜์ด์ง€ ์—ฐ๋™ ๊ฒฐ๊ณผ

ํŽ˜์ด์ง€์—์„œ ์„น์…˜(Section) ์ถ”๊ฐ€ํ•˜๊ธฐ

ํ•˜๋‚˜์˜ ํŽ˜์ด์ง€์— ๋งŽ์€ ๋‚ด์šฉ์„ ์„œ์ˆ ํ•˜๋‹ค ๋ณด๋ฉด, ์„น์…˜์„ ๋‚˜๋ˆ„๋Š” ๊ฒƒ์ด ๊ฐ€๋…์„ฑ์— ์ข‹์Šต๋‹ˆ๋‹ค. ์ด๋Ÿฌํ•œ ์„น์…˜์€ @section์ปค๋งจ๋“œ๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

/*! @page subpage_1 ์„œ๋ธŒ ํŽ˜์ด์ง€
*
* @section section_1 ์„น์…˜ 1
* ๋‚ด์šฉ
*/

section_1๋„ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ์„น์…˜์˜ ์ด๋ฆ„์ž…๋‹ˆ๋‹ค. ํŽ˜์ด์ง€ ๋‚ด์—์„œ ์„น์…˜ ์ด๋ฆ„์„ ์ž‘์„ฑํ•˜๋ฉด ์ž๋™์œผ๋กœ ํ•ด๋‹น ์„น์…˜์œผ๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค.

์„œ๋ธŒ ์„น์…˜(Subsection) ์ถ”๊ฐ€ํ•˜๊ธฐ

์„น์…˜ ๋‚ด์—์„œ๋„ ํ•˜์œ„ ์„น์…˜์ด ํ•„์š”ํ•  ๋•Œ ์“ฐ์ด๋Š” ๋ช…๋ น์–ด์ž…๋‹ˆ๋‹ค. @subsection์ปค๋งจ๋“œ๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

* @section procedure_sec Step by step ์ ˆ์ฐจ ์˜ˆ์‹œ
* ์–ด๋–ค ์ ˆ์ฐจ์— ๋Œ€ํ•œ ์ˆœ์„œ๋ฅผ ์„ค๋ช…ํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.\n
* ์•„๋ž˜์™€ ๊ฐ™์ด Section ๋งํฌ๋ฅผ ์—ฐ๊ฒฐํ•˜์—ฌ ์„ค๋ช…์„ ์ž‘์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.\n
* @ref step1 ๊ณผ @ref step2 ๋ฅผ ์ฃผ์˜ ๊นŠ๊ฒŒ ์ง„ํ–‰ํ•˜์„ธ์š”.
* 
* @subsection step1 Step 1
* 1๋‹จ๊ณ„์— ๋Œ€ํ•œ ์„ค๋ช….
* @subsection step2 Step 2
* 2๋‹จ๊ณ„์— ๋Œ€ํ•œ ์„ค๋ช….

์„น์…˜๊ณผ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ, step1๊ณผ step2๋Š” ์„œ๋ธŒ ์„น์…˜์˜ ์ด๋ฆ„์ž…๋‹ˆ๋‹ค. ์œ„ ์˜ˆ์‹œ์ฒ˜๋Ÿผ @ref step1์„ ์ž‘์„ฑํ•˜๋ฉด step1์ด ์ž๋™ ๋งํฌ๋ฉ๋‹ˆ๋‹ค.

์„œ๋ธŒ ์„น์…˜ ์ถ”๊ฐ€๋œ ๋ชจ์Šต
์„œ๋ธŒ ์„น์…˜ ์ถ”๊ฐ€๋œ ๋ชจ์Šต

๋ชฉ์ฐจ(TOC, Table of Contents) ๋งŒ๋“ค๊ธฐ

ํ•˜๋‚˜์˜ ํŽ˜์ด์ง€์— ๋งŽ์€ ์„น์…˜์„ ๋‚˜๋ˆ„๋ฉด, ์ผ๋ฐ˜ ์‚ฌ์šฉ์ž๋Š” ๋ฌด์Šจ ๋‚ด์šฉ์ด ์žˆ๋Š”์ง€ ์•Œ๊ธฐ๋„ ํž˜๋“ค๊ณ  ์ผ์ผ์ด ์Šคํฌ๋กค ๋‚ด๋ฆฌ๊ธฐ๋„ ํž˜๋“ญ๋‹ˆ๋‹ค. ์ด๋ฅผ ์œ„ํ•ด ํŽ˜์ด์ง€ ์ƒ๋‹จ์— ๋ชฉ์ฐจ๋ฅผ ๋„ฃ์–ด์ฃผ๋ฉด ํŽธ๋ฆฌํ•˜๊ฒ ์ฃ ?

/*! @page subpage_1 ์„œ๋ธŒ ํŽ˜์ด์ง€
* @tableofcontents
*
* @section section_1 ์„น์…˜ 1
* ๋‚ด์šฉ
*/

@tableofcontents๋ฅผ ์ถ”๊ฐ€ํ•˜๋ฉด ์ž๋™์œผ๋กœ ๋ชฉ์ฐจ๋ฅผ ์ƒ์„ฑํ•ด ์ค๋‹ˆ๋‹ค.

ํŽ˜์ด์ง€์— ๋ชฉ์ฐจ๊ฐ€ ์ƒ์„ฑ๋œ ๋ชจ์Šต
ํŽ˜์ด์ง€์— ๋ชฉ์ฐจ๊ฐ€ ์ƒ์„ฑ๋œ ๋ชจ์Šต

ํ•˜์ดํผ๋งํฌ(Hyperlink) ์ถ”๊ฐ€ํ•˜๋Š” ๋ฐฉ๋ฒ•

๋ณธ๋ฌธ์— ์„ค๋ช…์„ ์ž‘์„ฑํ•˜๋‹ค ๋ณด๋ฉด, ์™ธ๋ถ€ ์‚ฌ์ดํŠธ ์ฃผ์†Œ๋ฅผ ์ž‘์„ฑํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

* @section link_sec ๋งํฌ ์‚ฝ์ž… ์˜ˆ์‹œ
* ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๋งํฌ๋ฅผ ์‚ฝ์ž…ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
* [LuckyGg](https://luckygg.tistory.com/)์— ์˜ค์‹œ๋ฉด ๊ฐœ๋ฐœ์— ๊ด€๋ จ๋œ ๋งŽ์€ ์ •๋ณด๋ฅผ ๋ณด์‹ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.\n
* @note ์ž์ฃผ ๋ฐฉ๋ฌธํ•ด์ฃผ์„ธ์š” :)

์•„๋ž˜์™€ ๊ฐ™์ด LuckyGg ๋‹จ์–ด์— ํ•˜์ดํผ๋งํฌ๊ฐ€ ์ถ”๊ฐ€๋˜์–ด, ํด๋ฆญํ•˜๋ฉด ํ•ด๋‹น ์‚ฌ์ดํŠธ๋กœ ์ด๋™ํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.

ํ•˜์ดํผ๋งํฌ ์ถ”๊ฐ€๋œ ๋ชจ์Šต
ํ•˜์ดํผ๋งํฌ ์ถ”๊ฐ€๋œ ๋ชจ์Šต

์†Œ์Šค ์ฝ”๋“œ์˜ ํด๋ž˜์Šค ๋˜๋Š” ํ•จ์ˆ˜ ์—ฐ๋™ ๋ฐฉ๋ฒ•

ํŽ˜์ด์ง€์—์„œ ์†Œ์Šค ์ฝ”๋“œ์— ์กด์žฌํ•˜๋Š” ํด๋ž˜์Šค ๋˜๋Š” ํ•จ์ˆ˜๋ฅผ ์–ธ๊ธ‰ํ•  ์ˆ˜๋„ ์žˆ๋Š”๋ฐ์š”. ๋งํฌ๋Š” ์ž๋™ ์ƒ์„ฑ๋˜๊ธฐ ๋•Œ๋ฌธ์— ์•„๋ž˜์™€ ๊ฐ™์ด ์‚ฌ์šฉํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค. ๋‹จ, ๋„ค์ž„์ŠคํŽ˜์ด์Šค๊ฐ€ ์กด์žฌํ•œ๋‹ค๋ฉด ์ „์ฒด ๋‹ค ์ž‘์„ฑํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

Figure::IFigure

๋งŒ์•ฝ, ๋„ค์ž„์ŠคํŽ˜์ด์Šค๋Š” ์ œ์™ธํ•˜๊ณ  ํด๋ž˜์Šค ์ด๋ฆ„์ด๋‚˜ ํ•จ์ˆ˜ ์ด๋ฆ„๋งŒ ์ž‘์„ฑํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด ์•„๋ž˜์™€ ๊ฐ™์€ ๋ฐฉ๋ฒ•๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

\ref Figure::IFigure "IFigure"

@ref๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ Figure::IFigure๋ฅผ IFigure๋ผ๋Š” ์ด๋ฆ„์œผ๋กœ ์—ฐ๋™ํ•˜๋Š” ๊ฒƒ์ด์ฃ .

ํด๋ž˜์Šค ๋˜๋Š” ํ•จ์ˆ˜ ์—ฐ๋™ ๊ฒฐ๊ณผ
ํด๋ž˜์Šค ๋˜๋Š” ํ•จ์ˆ˜ ์—ฐ๋™ ๊ฒฐ๊ณผ

ํ‘œ(Table) ์ถ”๊ฐ€ํ•˜๋Š” ๋ฐฉ๋ฒ•

ํด๋ž˜์Šค๋ฅผ ์„ค๋ช…ํ•˜๋Š” ํ‘œ๋ฅผ ์ž‘์„ฑํ•ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ์œ„์—์„œ ์„ค๋ช…ํ•œ ํด๋ž˜์Šค ์ด๋ฆ„๋„ ๋„ฃ์–ด ๋ดค์Šต๋‹ˆ๋‹ค.

* @section table_sec ํ‘œ ์‚ฝ์ž… ์˜ˆ์‹œ
* ํ‘œ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์‚ฝ์ž…ํ•ฉ๋‹ˆ๋‹ค.
*	ํ•ญ๋ชฉ								|				์„ค๋ช…
*	--------------------------------|---------------------------------
*	\ref Figure::IFigure "IFigure"	|	๋„ํ˜• ์ธํ„ฐํŽ˜์ด์Šค
*	\ref Figure::Line "Line"		|	IFigure๋ฅผ ์ƒ์†๋ฐ›์€ Line Class

์•„์ฃผ ๊ฐ„๋‹จํ•˜์ฃ ?

ํ‘œ ์‚ฝ์ž… ๊ฒฐ๊ณผ
ํ‘œ ์‚ฝ์ž… ๊ฒฐ๊ณผ

ํ‘œ์˜ ์…€ ๋ณ‘ํ•ฉ ๋ฐฉ๋ฒ•์€ ์•„๋ž˜ ๋งํฌ๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”.

https://www.doxygen.nl/manual/markdown.html#md_tables

 

Doxygen Manual: Markdown support

Markdown support was introduced in doxygen version 1.8.0. It is a plain text formatting syntax written by John Gruber, with the following underlying design goal: The design goal for Markdown's formatting syntax is to make it as readable as possible. The id

www.doxygen.nl

์ด๋ฏธ์ง€ ์ถ”๊ฐ€ํ•˜๋Š” ๋ฐฉ๋ฒ•

๋จผ์ €, Doxygen GUI์—์„œ Expert > Input > IMAGE_PATH์— ์ด๋ฏธ์ง€ ํŒŒ์ผ์ด ์กด์žฌํ•˜๋Š” ํŒŒ์ผ ๋˜๋Š” ๊ฒฝ๋กœ๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์•„๋ž˜์˜ ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

* @section image_sec ์ด๋ฏธ์ง€ ์‚ฝ์ž… ์˜ˆ์‹œ
* ์ด๋ฏธ์ง€๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์‚ฝ์ž…ํ•ฉ๋‹ˆ๋‹ค.
* @image html test_image.png "์บก์…˜ ์‚ฝ์ž…"

์ด๋ฏธ์ง€ ์‚ฝ์ž… ๊ฒฐ๊ณผ
์ด๋ฏธ์ง€ ์‚ฝ์ž… ๊ฒฐ๊ณผ

์ธ์šฉ ๋ฌธ๊ตฌ ์ถ”๊ฐ€ํ•˜๋Š” ๋ฐฉ๋ฒ•

์ธ์šฉ ๋ฌธ๊ตฌ๋Š” >๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ํ•œ ์ค„ ๋˜๋Š” ์—ฌ๋Ÿฌ ์ค„๋„ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

* @section quote_sec ์ธ์šฉ ๋ฌธ๊ตฌ ์‚ฝ์ž… ์˜ˆ์‹œ
* ์ธ์šฉ ๋ฌธ๊ตฌ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์‚ฝ์ž…ํ•ฉ๋‹ˆ๋‹ค.
* > LuckyGg์˜ Doxygen์ž…๋‹ˆ๋‹ค.\n
* > ์ด๋ ‡๊ฒŒ ์—ฌ๋Ÿฌ ์ค„ ์‚ฝ์ž…์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

์ธ์šฉ ๋ฌธ๊ตฌ ์‚ฝ์ž… ๊ฒฐ๊ณผ
์ธ์šฉ ๋ฌธ๊ตฌ ์‚ฝ์ž… ๊ฒฐ๊ณผ

์ฝ”๋“œ ์˜ˆ์‹œ(Code snippet) ์ถ”๊ฐ€ํ•˜๋Š” ๋ฐฉ๋ฒ•

๋ณธ๋ฌธ์—์„œ ์ฝ”๋“œ ์˜ˆ์‹œ๋ฅผ ์„ค๋ช…ํ•˜๋Š” ๊ฒฝ์šฐ๋„ ์žˆ๊ฒ ์ฃ . ์ฝ”๋“œ๋Š” @code{.cpp}๋กœ ์‹œ์ž‘ํ•˜์—ฌ @endcode๋กœ ๋๋‚ฉ๋‹ˆ๋‹ค.

* @section code_sec ์ฝ”๋“œ ์‚ฝ์ž… ์˜ˆ์‹œ
* ์ฝ”๋“œ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์‚ฝ์ž…ํ•ฉ๋‹ˆ๋‹ค. ์ž๋™์œผ๋กœ ํด๋ž˜์Šค ๋ฐ ํ•จ์ˆ˜๊ฐ€ ๋งํฌ๋ฉ๋‹ˆ๋‹ค.
* @code{.cpp}
* #include "Line.h"
* Figure::Line object;
* object.Draw();
* @endcode

์ฝ”๋“œ ์˜ˆ์‹œ ์‚ฝ์ž… ๊ฒฐ๊ณผ
์ฝ”๋“œ ์˜ˆ์‹œ ์‚ฝ์ž… ๊ฒฐ๊ณผ

๋” ์ž์„ธํ•œ ๋…์‹œ์   ์ปค๋งจ๋“œ๋ฅผ ํ™•์ธํ•˜๋ ค๋ฉด ์•„๋ž˜ ๋งํฌ๋ฅผ ์ฐธ๊ณ ํ•˜์„ธ์š”.

https://www.doxygen.nl/manual/commands.html

 

Doxygen Manual: Special Commands

Introduction All commands in the documentation start with a backslash (\) or an at-sign (@). If you prefer you can replace all commands starting with a backslash below by their counterparts that start with an at-sign. Some commands have one or more argumen

www.doxygen.nl

๋ฐ˜์‘ํ˜•