In C++, is there a nice technique or design pattern to perform the following tasks based on configuration?
Scenario #1: Call functions
If a configuration says:
A:foo()
Then the code should call A::foo() assuming that the object of A is already accessible.
Scenario #2: Declare type
If a configuration says:
bar:vector<std::string>
Then the code should create an object with the type vector<std::string> in runtime.
String match solution is not desirable.
Thanks in advance.