一种定制的、更高效的C++RTTI实现方法  

A Customized and More Efficient Method for C++ RTTI Realization

在线阅读下载全文

作  者:苏常友[1] 文建国[1] 

机构地区:[1]湖南大学计算机与通信学院,长沙410082

出  处:《微计算机信息》2011年第8期163-165,共3页Control & Automation

摘  要:RTTI(Run-Time Type Information,运行时类型识别)是C++等面向对象编程语言的一种重要语言机制。目前流行的C++编译器中的RTTI实现机制在应用中存在一些不足,主要体现在动态类型转换操作的低效率和RTTI实现机制的不可定制性。本文通过分析研究标准C++的RTTI机制,提出一种基于元数据和宏,以可定制和高效率为目标的RTTI实现方法。在文章的最后仿真这种RTTI实现方法,证明其可行性和高效性(仿真数据其效率比为5.8)。RTTI is an important mechanism of object-oriented computer languages like C ++,etc.In the currently prevalent C ++ compiler,the RIIT mechanism still has some defects in its implementation,which is mainly embodied in the low efficiency of dynamic type-casting as well as the inability of customization in RIIT realization.Based on the analysis of the standard C++ RTTI,this paper proposed a new method for RTTI realization which is based on metadata and macro,aiming to be customizable and of a higher efficiency.At last,a concrete C++ RTTI realization is simulated in the end of this paper,which could be a testament of the complete feasibility and higher efficiency of this method(the efficient ratio is 5.8).

关 键 词:C++语言 运行时类型识别 元数据  

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象