如何配置 doxygen 模块页面的默认详细级别?

问题描述 投票:0回答:1

我正在使用 doxygen 生成文档 html 网站。通过使用

@defgroup
命令,我可以生成模块页面,它们就像手动制作的索引一样。

我的“手动制作索引”(模块页面)至少有 2 个详细级别。一旦有人单击该模块页面,就会显示所有级别的索引,这是我不喜欢的。有没有什么配置项可以只显示模块页面的顶级索引?

实际行为:

预期行为:

重现

doxygen 可执行版本:1.9.2 (97cb0de4dab1f9eb77325f7ee9f46dcaed8b0c69)

可在此处复制完整代码:https://gitee.com/aczz/cv-dbg/tree/master/doxygen_example

我使用的doxyfile是:

PROJECT_NAME = "MyProject"
INPUT = @CMAKE_SOURCE_DIR@
EXTRACT_ALL = YES
HTML_TIMESTAMP = YES
RECURSIVE = YES
STRIP_FROM_PATH = ../

GENERATE_LEGEND        = YES

HTML_HEADER            = @CMAKE_SOURCE_DIR@/docs/header.html
HTML_FOOTER            = @CMAKE_SOURCE_DIR@/docs/footer.html
HTML_STYLESHEET        =
HTML_EXTRA_STYLESHEET  = @CMAKE_SOURCE_DIR@/docs/stylesheet.css

我使用 doxygen 命令使用的 C++ 头文件是:

#ifndef HELLO_H
#define HELLO_H

/**
  @defgroup basic_types Basic Types
  @{
      @defgroup array_type Array
      @defgroup matrix_type Matrix
      @defgroup tensor_type Tensor
      @defgroup network Nerual Network Data Types
      @{
          @defgroup layer Layer
          @defgroup network Network
      @}
  @}

  @defgroup math_algorithms Math and Algorithms
  @{
    @defgroup array_op Array Operations
    @defgroup matrix_op Matrix Operations
    @{
      @defgroup decomp Matrix Decomposition
      @{
          @defgroup decomp_lu LU Decomposition
          @defgroup decomp_svd SVD Decomposition
      @}
      @defgroup solve Solve Linear Equation
    @}
    @defgroup tensor_op Tensor Operations
  @}

  @defgroup deep_nn Deep Neural Networks

*/

typedef unsigned char uchar;

#include <memory>

//! @addtogroup basic_types
//! @{

/// Matrix class
///
/// represens the image struct
///
class Mat
{
public:
    Mat(): rows_(0), cols_(0), data_(NULL){}

public:
    int rows();
    int cols();
    unsigned char* data();

private:
    int rows_;
    int cols_;
    std::shared_ptr<uchar> data_;
};

class Point
{
public:
    Point(): x(0), y(0) {}
    Point(int _x, int _y): x(_x), y(_y) {}

public:
    int x, y;
};

class Size
{
public:
    Size(): height(0), width(0) {}
    Size(int _height, int _width): height(_height), width(_width) {}

public:
    int height;
    int width;
};

//! @} basic_types

#endif // HELLO_H
c++ doxygen document
1个回答
0
投票

使用 HTML_INDEX_NUM_ENTRIES
如果设置为 1,则所有树将完全折叠。

PS:我知道我迟到了。这个答案是那些将来偶然发现此页面的人。

© www.soinside.com 2019 - 2024. All rights reserved.