摘要
为了解决在低端嵌入式设备中用C语言编写的代码难以维护以及重用率低等问题,提出了一种新的对象模型。将面向对象的思想与C语言开发相结合,利用现代C编译器的宏等特性以及元编程技巧,对C语言本身进行扩展,模拟了面向对象思想中单根继承,多态等特性,并在风格上和C++保持一致。在提升了其代码的可维护和可重用性的同时,简化了使用支持面向对象特性编程语言编写的代码向C语言移植的过程。
To solve the problem of maintainability and reusability of the codes written with C programming language for some low-end embedded devices, a new object model is presented. With the help of the macro feature of modem C compilers and the meta-programming skills, the single inheritance, polymorphism and other object-oriented features can be simulated by standard C programming language and keep the same coding-style of C++, which makes the maintainability, reusability and portability of C codes improved.
出处
《计算机工程与设计》
CSCD
北大核心
2013年第4期1510-1516,共7页
Computer Engineering and Design