检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
机构地区:[1]河南大学计算中心,河南开封475004 [2]商丘师范学院软件学院,河南商丘476000
出 处:《计算机与现代化》2010年第8期120-123,共4页Computer and Modernization
摘 要:编译结束后,由于C++编译器不再保留类的定义信息,致使程序在运行时刻(Run-Time)无法再次获得对象的类信息,如类名、类的继承关系等,因此C++中的一些重要操作,如动态转类型(dynamic_cast)、对象的持久化(Persistence)等将无法实现,而RTTI正是解决这一问题的关键。鉴于RTTI长期不为大多数开发人员所理解,本文通过对一个简单RT-TI的实现,探讨RTTI的实现机制。After compiling a source file by C++ compiler,the class definition information isn't remained in object file.Therefore,the program at run-time can't acquire the class information,such as class name,class hierarchy and so on,and consequently many operations such as dynamic_cast,persistence are impossible to be completed.RTTI is the key to conquer this problem.Although a great deal of importance is attached to RTTI,many C++ programmers are still confused by RTTI realization.In this paper,a concrete RTTI is realized,and it gives C++ programmers a chance to have a glimpse of RTTI realization.
分 类 号:TP311.1[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.30