// [ __ includes…//]的注释约定是什么?

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

boost::property_tree tutorial包含明显的注释约定:

//[debug_settings_includes
#include ...
//]
//[debug_settings_data
struct debug_settings {...};
//]
//[debug_settings_load
void debug_settings::load(const std::string &filename) {...}
//]
//[debug_settings_save
void debug_settings::save(const std::string &filename) {...}
//]
int main() {...}

这仅仅是emacs组织模式约定吗?是否有利用此约定的工具?采纳和拥抱它会满足我的生活吗?

c++ comments
1个回答
2
投票

它似乎是文档生成的一部分。

例如,如果您看到the raw source for the tutorial documentation,您将看到其中包含诸如以下的行

First we need some includes:

[debug_settings_includes]

To store the logging configuration in the program we create a debug_settings
structure:

[debug_settings_data]

方括号包围的线在the example source file中具有相应的部分。

[当查看the documentation itself时,我们看到那些“关键字”已被源文件中的代码替换。

有关更多信息,请阅读the Boost quickbook documentation

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