K
krbyxtrm
Hi
is there a way to 'manage' function execution using macros?
#define MY_CALL_MACRO(MacroName)
{ g_MacroStack.push_back(MacroName);
<some code here...>}
such that when i use the macro like this:
MY_CALL_MACRO("MyMacroName")
{
Func1(123);
Func2(1);
Func3(1,123);
}
MY_CALL_MACRO("YetAnotherMacro")
{
Func2(1); // will be tagged with 1
Func3(1,123); // will be tagged with 2
}
I have a choice which Function in MyMacroName macro will be called,
functions inside the curly braces?
e.g.
CallFunctionByMacro(const char* szMacro, UINT function);
is there a way to 'manage' function execution using macros?
#define MY_CALL_MACRO(MacroName)
{ g_MacroStack.push_back(MacroName);
<some code here...>}
such that when i use the macro like this:
MY_CALL_MACRO("MyMacroName")
{
Func1(123);
Func2(1);
Func3(1,123);
}
MY_CALL_MACRO("YetAnotherMacro")
{
Func2(1); // will be tagged with 1
Func3(1,123); // will be tagged with 2
}
I have a choice which Function in MyMacroName macro will be called,
functions inside the curly braces?
e.g.
CallFunctionByMacro(const char* szMacro, UINT function);