views:

69

answers:

2

I am developing visual game level editor in c++. For this I want reflection(RTTI) mechanism to know class attributes at runtime. I am currently using PDB files for this.But using PDB I couldn't retrieve actual code line for extra information in commented format which is given for that attribute. Visual studio uses NCB files for intelligence. So will it be better idea to use NCB instead PDB? If yes,How to retrieve information from NCB files? Is there any SDK like DIA SDK?

+4  A: 

The NCB file format isn't publicly documented and changes with every version of Visual Studio. With the upcoming VS2010 (due out in about a week and a half), it's going away entirely in favor of a new SQL-based format that should be much easier to work with. Microsoft is also implementing an API for integrating with the Intellisense data from the parser.

Dan Story
+2  A: 

I really wouldn't rely on the .ncb files for reflection. Those files are meant for intellisense, and only intellisense. They could change without warning, not be up to date, or what have you...

You could do some macro hackery to get the reflection you seek (something like push your variables/methods into some container, and declare it simultaneously)... or use a framework like Qt (which is what I've been using for my level editor).

Mark