|
|
Label: ♦chinese(中文)
♦news
fu
created at Saturday, 2010-04-03, 07:00:38
0 Replies, 1346 Hits
这个例子可以在道语言在google code上的svn源码仓库里下载:http://code.google.com/p/dao-language/source/browse/#svn/trunk/demo/embedding 。
这例子展示了如何封装c函数和c++类。这个封装允许从c++类派生出dao语言类,并支持dao语言派生类重新实现c++类里的虚函数。这些封装代码是由autobind.dao工具自动生成的,因此,如果你想知道其他数据类型或函数该如何封装,你可以将它们写入到 greeting.h 头文件里,然后运行 make bind , 再查看自动生成的封装代码! 这个例子也演示了如何嵌入dao,并恰当的使用dao语言的c接口运行保存在字符串里的道语言代码。此例子仅仅是作为一个起点,若要更多地了解dao语言的c接口编程,可参看道库的头文件 dao.h 和相关文档(如: 使用道语言的C函数接口编程 )。 Comments
|
fu: ... I forgot to say something about the plan for the whole new year in my previous reply. Well, besides w ... (Jan.19,01:40) fu: ... Happy new dragon year (which will start from this sunday)! Actually, it was a busy month (I wish th ... (Jan.18,22:46) ybabel: What's the plan for the new year ? Hello 'vry budy :- ) happy new year (when is the new year for you Fu ?) I saw you come back and comm ... (Jan.18,18:59) |