YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

Some questions about binding classes
MTK358
#1 Posted : Wednesday, November 30, 2011 10:32:26 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 11/30/2011(UTC)
Posts: 1

Thanks: 0 times
Was thanked: 0 time(s) in 0 post(s)
I created some bindings for C++ classes by creating userdata for each instance, and adding a delegate table to the instances which contains the methods.

My question is how to bind a hierarchy of C++ classes like this? Is it possible to reuse the Squirrel methods created for a base class in a derived class?
fagiano
#2 Posted : Friday, December 30, 2011 12:43:28 PM(UTC)
Rank: Advanced Member

Groups: Registered, Administrators
Joined: 6/11/2005(UTC)
Posts: 825

Thanks: 0 times
Was thanked: 36 time(s) in 29 post(s)
You should not use userdata you should be using classes to bind C++ classes.
Look at the DXSquirrel sample on the wiki, it's a simple example that shows a class hierarchy. Be aware is for squirrel 2.x so some function might have some extra parameter in 3.x .

ciao
Alberto
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Clean Slate theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.067 seconds.