Visual Studio IntelliSense for VC++ includes the "complete" EDG C++ parser (also used by Intel and others). Since the C# Code DOM is accessible to addons (correct me if I'm wrong), is the C++ Code DOM also accessible? Can this be used to analyse an open VC++ project within the VS environment?
相关问题
- Generic Generics in Managed C++
- How to know full paths to DLL's from .csproj f
- Importing NuGet references through a local project
- How to Debug/Register a Permanent WMI Event Which
- Visual Studio 2019 - error MSB8020: The build tool
The Visual C++ Refactoring extension is able to rename a member project-wide. Its built by MS but obviously they used the internal Code DOM to achieve this. So it is possible, I just don't know how, yet.
The CppLister extension is able to read the intellisense databases created by VS to list the various members within a class.
You can always use the open source Clang C++ parser (actually compiler) and read the AST into a C# Object Model. See CppSharp and ClangSharp for C# bindings to Clang.
I'm not sure what the "C++ Code DOM" is, if it even exists. What matters is that MSVS is using the EDG front end to parse and determine meaning of symbols, to support MSVS IDE actions. EDG IIRC builds its own internal data structures representing the program; I have no reason to believe that those data structures are the "C++ Code DOM", or that they are visible to you or you'd be able to find out about them at MSDN.
Your real stated problem is you want to analyze C++ source code. I agree, having the EDG front end information would be a significant aid to do that; you really really don't want to attempt to write your own C++ parser (and you need lots of stuff past parsing, google my essay on "life after parsing").
So you kind of have the following choices: