Im trying to create my own scripting engine/language.

Is it possible to call a c++ class method by string name and also pass in
the parameters?

for example I have a class called MyClass with a method called callme:

bool MyClass::callme(string name)
{
    cout << "Hello " << name.c_str() << "\n";

    return true;
}

Normally would call it by using:

bool res = myClass->callMe("Harry");

what I want is a command like:

callAMethod("bool", "callme", "Harry");

any ideas to get something like that?


-- 
View this message in context: 
http://old.nabble.com/call-c%2B%2B-method-by-string-name-%2B-passing-parameters-tp27196409p27196409.html
Sent from the Gnu - Common C++ mailing list archive at Nabble.com.



_______________________________________________
Bug-commoncpp mailing list
Bug-commoncpp@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-commoncpp

Reply via email to