Add_class doesn't exist in the doc

Hi I need to use add_class, it would be great to know how to use it. For example I want add some qt classes to chai. And now I want to know how to use the classes in chai.

void Link2SpeakScript::addClasses(ChaiScript &chai)
ModulePtr m(new Module());

add_class<QObject>(*m, "QObject",
                       constructor<QObject(QObject *)>()
                       fun([](const QObject &o)
                           return string("QObject");
                       fun(&QObject::parent), "parent"},
                       fun([](QObject &o, const string &name)
                       {o.setObjectName(name.c_str());}), "setObjectName"},
                       fun([](QObject &o)
                           return o.objectName().toStdString();}), "objectName"}

m->add(fun([](const string &sourceText)
    return QObject::tr(sourceText.c_str());
}), "tr");



You can find an example of add_class here:

Once added you can use them in script like this:

var myClass := MyClass();
myClass.memberVar = 123;

Note := assigns as reference. You may need to play around with that depending on your class.