These are chat archives for ChaiScript/ChaiScript

15th
Apr 2017
Harish Bhagat
@Wizardo367
Apr 15 2017 14:36
Hey, I was wondering how I should go about creating C++ objects within ChaiScript? How would I register the class with ChaiScript? For example:
Sound::Sound(std::string path)
{
file = loadFile(path);
}

Sound::play()
{
file.play();
}
class Test
{
Sound sound1 = Sound("A.mp3");
Sound sound2 = Sound("B.mp3");

def Test()
{
sound1.play();
}

}