views:

256

answers:

4

I want to list properties and functions present in c++ classes. Is that functionality already implemented in any library ? Does visual studio intellisense use any library ? Is that library available publicly from Microsoft?

A: 

I would imagine that Visual Studio uses the header files to provide Intellisense.

Andrew Hare
+8  A: 

Visual Studio parses your code, so that's how it knows. You would need to do the same.

Paul Beckingham
+4  A: 

They use a propriety format to store intellisense information (they are saved as NCB files). You can delete these files to force VS to recreate its intellisense database if things go wrong.

They then scan header files for class information as well as dependencies, then build the NCB file for future reference.

No, this library is not available for personal use.

Intellisense in C# is lots better than the one in C++ VS2010 will see C++ have the same intellisense features as C# currently enjoys.

Chris
VS2010 also drops the NCB file for a SQL Server Compact database.
Billy ONeal
+2  A: 

The Visual C++ team maintains a blog that has had several very nice articles about how IntelliSense has worked in the past and how it will work in the future:

Essentially they build their own 'reflection' database (the .ncb file in current and past version sof VS, using a compact SQL database starting with VS2010) by parsing the headers and other source files - using both custom parsers and parsing that's done with the cooperation of the compiler.

Apparently at least some of that information is available in the VCCodeModel and related interfaces that the Visual Studio extensibility model provides. I have no idea how well the extensibility model works or how easy it is to use.

Michael Burr