Label: ♦english ♦news

[210] A simple example for embedding and extending of Dao is available

Comment
The codes for this example can be found in the svn repository of Dao on Google Codes: http://code.google.com/p/dao-language/source/browse/#svn/trunk/demo/embedding .

This example shows how to wrap C functions and C++ classes. The wrapping can allow deriving Dao classes from C++ classes with the possibility to re-implement C++ virtual functions. The wrapping codes are generated by the autobind.dao tool, so if you want to know how other data types and functions should be wrapped, just put them in the greeting.h file and then run make bind , the generated codes will show you how to wrap them!

This example also shows you how to embed Dao, and use proper C interfaces of Dao to run Dao scripts stored in C string. It can be used as a starting point, to get to know more about the C interfaces of Dao, one may simply look into the head file dao.h of the Dao library.
Comments

Change picture:

Choose file:

123 4
56 78910 11
121314151617 18
192021222324 25
2627282930

klabim: ... Ok, I found it. It can be so easy by reading the documentation :- ). I have overseen the keyword glob ... (Aug.21,18:09)

klabim: sharing vars between scripts Hi, how can I share a variable between 2 scripts in an embedded environment? For example: script 1: ... (Aug.21,17:55)

This site is powered by Dao
Copyright (C) 2009,2010, daovm.net.
Webmaster: admin@daovm.net