Welcome Guest
Search
|
Active Topics
|
Log In
|
Register
ERROR
Squirrel - The Programming Language
»
General
»
Embedding
»
Some questions about binding classes
Some questions about binding classes
Options
Previous Topic
Next Topic
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?
Back to top
User Profile
View Thanks
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
Back to top
|
Edit by user
User Profile
View Thanks
Users browsing this topic
Guest
Squirrel - The Programming Language
»
General
»
Embedding
»
Some questions about binding classes
Forum Jump
General
- The Language
- Embedding
- Bindings
Development
- Squirrel language review Board
- Squirrel API review Board
- Bugs
Forum
- Stuff
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.
Watch this topic
Email this topic
Print this topic
RSS Feed
Normal
Threaded
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.