What I require is some idea / hint how to do this.

Pass a string(template) to a C++ function. It should parse the template and call function function_A or function_B.... etc with the parameters.

x = "some value";
// x is created and defined within the C++ program
// similarly y and z are variables within this program.

string = ".... {if(x=="value1") function_A(x,y,z) else function_B(x,y,z)} .... ";
// string may be read from an external file...

.... denotes that this could appear anywhere within the string and there could be multiple appearance within the same string.

Any help would be greatly appreciated.