473,385 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

XML documentation in unmanaged C++

I thought I read somewhere in the MS documentation that XML documentation is
compiled in C++, but the C++ code editor obviously doesn't do anything
interesting when I enter "///". What's the deal with C++ and XML docs? Is
there an add-in available to help with entering XML docs?

TIA - Bob
Oct 27 '06 #1
5 8539
Hi Bob,

The VC2005 compiler supports the XML documentation comment, it could
generate the XML file from your code comments (which are prefixed by
'///')). But it would not support the "on-the-fly" XML comments. You need
to compile it and then it should support it. Please refer to the following
blog article for the details:

http://blogs.msdn.com/peterhu/archiv...05/126767.aspx

"Support for XML doc comments: we now support XML doc comments in compiled
files. The compiler outputs an .xdc file which contains the documentation
information fragments. There's a new tool called xdcmake which takes these
fragments and produces the final .xml comments file. This tool is
integrated into the IDE, so producing doc comments is as simple as enabling
the /doc switch in the compiler's property pages (the xdcmake tool
automatically runs when the compiler outputs .xdc files). In addition,
IntelliSense will support these xml comment files. "

I suggest you can also refer to the related MSDN documentation for the
usage of XML documentation comment in VC2005:

XML Documentation (Visual C++)
http://msdn2.microsoft.com/en-us/library/ms177226.aspx

doc (Process Documentation Comments) (C/C++)
http://msdn2.microsoft.com/en-us/library/ms173501.aspx

XML Document Generator Tool Property Pages
http://msdn2.microsoft.com/en-us/library/ms235515.aspx

I hope the above information helps, if you have any questions or concerns,
please do not hesitate to let me know. I am standing by to help you.

Thansk!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Oct 30 '06 #2
Hi Gary,

Based on the articles you referred me to, it's clear that the C++ compiler
will process XML documentation. But what about tools to help me create the
documentation in the code editor? In VB and C#, the code editor and
intellisense help me to correctly create XML documentation. But the C++
code editor seems to just ignore "///". Am I missing something?

- Bob
Nov 3 '06 #3
Hi Bob,

Just as I suggested in my last post, add the /doc compiler option to your
project compilier options:

To set this compiler option in the Visual Studio development environment:

1. Open the project's Property Pages dialog box.

2. Expand the Configuration Properties node.

3. Expand the C/C++ node.

4. Select the Output Files property page.

5. Modify the Generate XML Documentation Files property.

Then after the building process, the XML comment file should be generated
in the location which you specified in the 'Output Document File' entry of
the 'XML Document Generator Tool Property Pages'
Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 6 '06 #4
Gary,

/doc only helps if there is XML documentation in the source code to begin
with. My original question was whether or not the IDE (the C++ code editor
and C++ intellisense) will give me any help with authoring XML documentation
the same way VB and C# do. Lacking built-in support in the VS 2005 IDE, is
there a plug-in that any readers of this NG can point me to that provides
contextual editing help for XML documentation in C++ source code.

- Bob

""Gary Chang[MSFT]"" <v-******@online.microsoft.comwrote in message
news:%2****************@TK2MSFTNGXA01.phx.gbl...
Hi Bob,

Just as I suggested in my last post, add the /doc compiler option to your
project compilier options:

To set this compiler option in the Visual Studio development environment:

1. Open the project's Property Pages dialog box.

2. Expand the Configuration Properties node.

3. Expand the C/C++ node.

4. Select the Output Files property page.

5. Modify the Generate XML Documentation Files property.

Then after the building process, the XML comment file should be generated
in the location which you specified in the 'Output Document File' entry of
the 'XML Document Generator Tool Property Pages'
Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.

Nov 9 '06 #5
Hi Bob,
>My original question was whether or not the IDE (the C++ code
editor and C++ intellisense) will give me any help with authoring
XML documentation the same way VB and C# do
Sorry for misunderstanding your questions. I am afraid the VC2005 editor is
unlike the C# and VB.NET editor, it only provides some limited intellisence
after the source code have beed compiled.

Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 10 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bob Rock | last post by:
Hello, in the last few days I've made my first few attempts at creating mixed C++ managed-unmanaged assemblies and looking aftwerwards with ILDASM at what is visible in those assemblies from a...
4
by: Rachel Suddeth | last post by:
What is the difference between a managed/unmanaged resource, and how do you tell which is which? I'm trying to understand how to write some Dispose() methods, and we are supposed to put code that...
1
by: Sparhawk | last post by:
Hi, my company is going to migrate a large VC++ application to .NET to make use of Windows Forms (the old class library is not updated any more). We are not planning to migrate the rest of the...
6
by: marek | last post by:
Hello All, we are doing a quite a big project that contains at the lowest level an unmenaged c++ classes. Above it there are managed wrappers and at the top there are ASP.NET pages. Can anyone...
6
by: Stephen Walch | last post by:
Our application environment consists of three basic layers: 1. Third-party unmanaged DLLs that were written before the CLR was invented and maintain a significant amount of information (including...
9
by: Amit Dedhia | last post by:
Hi All I have a VC++ 2005 MFC application with all classes defined as unmanaged classes. I want to write my application data in xml format. Since ADO.NET has buit in functions available for...
5
by: akash | last post by:
I'm having problems calling an unmanaged class from a managed wrapper. I suspect I'm missing something obvious, as I'm unfamiliar with C++ and classes are very simple. My unmanaged class is as...
4
by: Can | last post by:
From the MSN documentation; "By default, /CLRUNMANAGEDCODECHECK is in effect, which means SuppressUnmanagedCodeSecurityAttribute is applied to linker-generated PInvoke calls. Specify...
2
by: Jon Slaughter | last post by:
How difficult is it for one to integrate unmanaged C++ into C#? I know for functions one can use DLLimport but how does one go about doing it for classes? Do I have to completely reimplement the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.