首页 | 本学科首页   官方微博 | 高级检索  
     

消除C++中的私有函数
引用本文:赵红超,方金云,唐志敏. 消除C++中的私有函数[J]. 计算机工程与应用, 2005, 41(7): 90-92,103
作者姓名:赵红超  方金云  唐志敏
作者单位:中国科学院计算技术研究所,北京,100080;中国科学院计算技术研究所,北京,100080;中国科学院计算技术研究所,北京,100080
基金项目:国家863高技术研究发展计划项目(编号:2002AA114020,2001AA135210),中国科学院知识创新项目(编号:20036020)资助
摘    要:私有访问是C++中三种访问权限的一种,是访问权限中最严格的。类对象的私有成员分私有函数和私有数据两部分,其中私有数据有特殊的作用;但是私有函数有很大的弊端,应该尽力消除。论文讨论了几种消除私有函数的方法,并重点论述了匿名命名空间的方法,同时提出了函数的私有函数的概念。

关 键 词:匿名命名空间  编译器防火墙  函数的私有函数
文章编号:1002-8331-(2005)07-0090-03

Removing Private Functions in C++
Zhao Hongchao,Fang Jinyun,Tang Zhimin. Removing Private Functions in C++[J]. Computer Engineering and Applications, 2005, 41(7): 90-92,103
Authors:Zhao Hongchao  Fang Jinyun  Tang Zhimin
Abstract:Private access is one of three access rights in C++,which is the hardest one in all.Private member is composed of private function and private data.Private data has its special usage,but private function has severe advantage and should be removed at full stream.This article discusses many methods and puts emphasis on the method of anonymous namespace.Meantime it discusses the concept of function's private functions.
Keywords:anonymous namespace  compiler firewall  function's private functions  
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号