2016-12-26 2 views
0

私はDoxygenを使用して、次のクラスヘッダーを文書化しようとしています。このクラスは純粋に抽象クラスなので、対応するソースファイルはありません。クラスヘッダーファイルをDoxygenに悪意のある方法はありませんか?

#ifndef QMFBANK_H 
#define QMFBANK_H 

#include <memory> 

class QMFBank 
{ 
    public: 

     QMFBank(); 
     virtual void setInputReference(std::shared_ptr<double>) = 0; 
     virtual std::shared_ptr<double> getLowBandReference() = 0; 
     virtual std::shared_ptr<double> getHighBandReference() = 0; 
     virtual void clearFilter() = 0; 
     virtual void update() = 0; 
}; 

#endif // QMFBANK_H 

Doxygenを使用して、ヘッダーファイルに次のコメントを挿入します。

#ifndef QMFBANK_H 
#define QMFBANK_H 

#include <memory> 

class QMFBank 
{ 
    public: 
     /** 
     * @brief Creates a quadrature mirror filter bank 
     * @param p_in A reference to an input source 
     */ 
     QMFBank(); 

     /** 
     * @brief Sets the reference to the QMF banks input source 
     * @param p_in A reference to an input source 
     */ 
     virtual void setInputReference(std::shared_ptr<double>) = 0; 

     /** 
     * @brief Retrieves a reference to the lowpassband output 
     * @return Returns a shared pointer to the lowpassband output 
     */ 
     virtual std::shared_ptr<double> getLowBandReference() = 0; 

     /** 
     * @brief Retrieves a reference to the highpassband output 
     * @return Returns a shared pointer to the highpassband output 
     */ 
     virtual std::shared_ptr<double> getHighBandReference() = 0; 

     /** 
     * @brief Clears (zeros) the filter bank history 
     */ 
     virtual void clearFilter() = 0; 

     /** 
     * @brief Updates the filter bank. 
     * When this method is called, the filter bank will retrieve a new input and update its outputs 
     */ 
     virtual void update() = 0; 
}; 

#endif // QMFBANK_H 

しかし、私はこれは醜いと思う。はい、ドキュメントはDoxygen HTMLの中ではかなり読みやすくなりますが、何かをすばやく参照しようとすると読みにくいようです。

私の質問:このインスタンスにDoxygenコメントを書くより良い方法はありますか?それとも、これはかなり普通ですし、私はただそれに対処するべきですか?

+0

'@のbrief'は、通常は必要ありません。それは私のIDEでautopopulatedだπάνταῥεῖ@ –

+0

ので、私はちょうどそれを残して。 – Izzo

+1

これは正常です。 –

答えて

1

///のようなコメントを使用すると、/ **と* /で2つの最も醜い行を取り除くことができます。また、その@briefを削除することもできます。それらがなければ、OKヘッダーファイルのように見えます。

#ifndef QMFBANK_H 
#define QMFBANK_H 
#include <memory> 

/// Comment about class itself too 
class QMFBank 
{ 
public: 
    /// Creates a quadrature mirror filter bank 
    QMFBank(); 

    /// Sets the reference to the QMF banks input source 
    /// @param p_in A reference to an input source 
    virtual void setInputReference(std::shared_ptr<double> p_in) = 0; 

    /// Retrieves a reference to the lowpassband output 
    /// @return shared pointer to the lowpassband output 
    virtual std::shared_ptr<double> getLowBandReference() = 0; 

    /// Retrieves a reference to the highpassband output 
    /// @return shared pointer to the highpassband output 
    virtual std::shared_ptr<double> getHighBandReference() = 0; 

    /// Clears (zeros) the filter bank history 
    virtual void clearFilter() = 0; 

    /// Updates the filter bank. 
    /// When this method is called, the filter bank will retrieve 
    /// a new input and update its outputs 
    virtual void update() = 0; 
}; 

#endif // QMFBANK_H 
関連する問題