Hello all, let me tell you a bit about where this question came from. I have been playing around with the SDK of Serious Sam 2, a first person shooter which runs on the Serious Engine 2. This engine introduces something called MetaData. MetaData is used in the engine to serialize classes and be able to edit them in the editor environment (Serious Editor 2). So for example, instead of:
class CSomeGameItem : CEntity
{
public:
int iHealthToGive;
}
Which will not show up in the editor, you would do:
meta ver(1) class CSomeGameItem : CEntity _("Some game item")
{
public:
meta int iHealthToGive; _("Amount of health to give")
}
Now when making a level, you can insert a "Some game item" entity into your level, and edit the one property it has. Now, I know Croteam (the developers of said game and engine) are using an extra compiler (Mdc, meta data compiler) to inject extra information about classes and their variables into the dll files, to make this metadata system possible. Does anyone have any clue as to how they did this?
Oh, btw, the meta, ver() and _() keywords are #define'd to nothing in their code, so the "normal" compiler ignores them.