摘要
为了说明BREW中如何实现用C语言来模拟C++中的面向对象的特性,实现接口的声明与实现的分离、对多个接口的支持和接口的易扩展性。通过实例,阐述了BREW通过虚拟函数表将接口与实现分离,使用ISHELL接口对多个接口支持及扩展。该方法与普通的C语言实现的接口相比较,修改接口而不会影响到应用程序,而接口有更好的可扩展性,更容易管理。
In order to illustrate how to use C language to simulate the C + +, object-oriented features in BREW, achieve the separation oflnterface declaration and implementation support for multiple interfaces and interfaces easy scalability. In this paper, for example, BREW virtual function table describes the interface and implementation separation. Use ISHELL this interface to support multiple interfaces and expansion. The methods compare with common C language interface, modify the interface without affecting the application. The interface has better scalability and easier management.
出处
《微型机与应用》
2012年第5期11-13,16,共4页
Microcomputer & Its Applications