Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate XML documentation comments for /// in Visual Studio 2010 C++

Tags:

c++

comments

xml

I need comment my function prototype (written in C/C++) with summary, returns, param tags. How can I persuade Visual Studio to insert xml tags after three forward slashes like in C#? I found one solution. When I rename xx.h xx.cs in C++ project, I can use /// for generating xml comments (IntelliSense in xml comments works too). There must be a better way, mustn’t there? It would kill me to write it manually. I’ll grateful for every useful comment.

/// <summary>
/// 
/// </summary>
/// <param name="aa"></param>
/// <returns></returns>
bool function1(TypeX aa);
like image 454
user471571 Avatar asked Sep 09 '25 19:09

user471571


2 Answers

CppTripleSlash creates xml doc comment stubs in c++ files when /// is typed, similar to what is available for c# in visual studio. This also has some basic intellisense for completing XML doc comments.

like image 104
tcb Avatar answered Sep 12 '25 08:09

tcb


This functionality isn't buit-in. You can try using Visual Studio add-ins. I haven't used Atomineer Utils Pro Documentation myself, but it looks promising. It generates documentation comments and supports C++. It costs $10 though.

like image 39
Athari Avatar answered Sep 12 '25 09:09

Athari