2016-07-26 3 views
1

를 참조 포맷하는 방법 : 제대로 클래스 인스턴스가 나는 문서의이 작품이

/** 
* This method creates an import job for the given @arg item 
* 
* The default implementation should be suitable for most needs, 
* it'll create an instance of @class ImportProjectJob 
* 
* @return a job that imports the project 
*/ 
virtual KJob* createImportJob(ProjectFolderItem* item); 

그러나 @class을 의미하지 않는다

은 다음과 같이 사용하고 doxygen에의 @instanceof 같은 아무것도를. 형식을 어떻게 지정해야합니까?

+0

'@의 arg','@의 class','@의 fn'을 비슷하게 의미 주석으로하지만 Doxygen을 얘기하는 것은 아니다 특별 섹션을 시작합니다. –

답변

2

Doxygen의 automatic link generation rules에서 문서화 된 텍스트의 이름이 문서화 된 클래스의 이름과 일치하고 해당 텍스트가 interCaps 명명 스타일을 사용하면 Doxygen은 해당 텍스트를 해당 문서 페이지로의 링크로 자동 변환합니다. 그래서 "ImportProjectJob"을 사용한다면, Doxygen은 해당 클래스를 발견하고 (문서화 된 경우) 해당 텍스트를 링크로 변환합니다.

그러나 클래스/함수가 interCaps이 이름 사용하지 않는 경우, 당신은 명시 적으로 @ref를 통해 문서화 된 개체에 연결할 수 있습니다 참고로

* The default implementation should be suitable for most needs, 
* it'll create an instance of @ref ImportProjectJob 

: @arg가 함수 매개 변수의 목록을 시작하기위한 것입니다 정의. 같은 뭔가 : 당신이 찾고있는 무엇

@arg @c AlignLeft left alignment. 
@arg @c AlignCenter center alignment. 
@arg @c AlignRight right alignment 

는 매개 변수 이름 등을 참조하기위한 인라인 형식 인, @p이다.

2

@class 대신 @ref을 사용하고 선언 된 클래스를 문서화하십시오.

일반적으로 (기본값으로 AUTOLINK_SUPPORTYES 일 때) 명시 적으로 참조 할 필요가 없습니다. Doxygen은 이름을 감지하면 자동으로 연결합니다.

그런데 @arg의 사용은 예상과 다릅니다. 인라인 참조에는 @p을 사용하고 메서드 인수를 문서화하려면 @param을 사용하십시오.


/** 
    * @brief This method creates an import job for the given @p item 
    * 
    * @details The default implementation should be suitable for most needs, 
    * it'll create an instance of ImportProjectJob 
    * 
    * @param item this is a folder item 
    * 
    * @return a job that imports the project 
    */ 
virtual KJob* createImportJob(ProjectFolderItem* item); 

이것은 ImportProjectJob가 선언 된 곳이다 :

/** 
    * @brief short desc of the class 
    * 
    * @details A long description 
    */ 
class ImportProjectJob : public KJob 
{};