期刊文献+

消除C++中的私有函数

Removing Private Functions in C++
下载PDF
导出
摘要 私有访问是C++中三种访问权限的一种,是访问权限中最严格的。类对象的私有成员分私有函数和私有数据两部分,其中私有数据有特殊的作用;但是私有函数有很大的弊端,应该尽力消除。论文讨论了几种消除私有函数的方法,并重点论述了匿名命名空间的方法,同时提出了函数的私有函数的概念。 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.
出处 《计算机工程与应用》 CSCD 北大核心 2005年第7期90-92,103,共4页 Computer Engineering and Applications
基金 国家863高技术研究发展计划项目(编号:2002AA114020 2001AA135210) 中国科学院知识创新项目(编号:20036020)资助
关键词 匿名命名空间 编译器防火墙 函数的私有函数 anonymous namespace,compiler firewall,function's private functions
  • 相关文献

参考文献5

  • 1DONBOX 潘爱民.COM本质论[M].北京:中国电力出版社,2001..
  • 2ErichGamma RichardHelm RalphJohnson 李英军译.设计模式:可复用面向对象软件的基础[M].北京:机械工业出版社,2000..
  • 3HerbSutter 於春景译.MoreExceptionalC++中文版[M].武汉:华中科技大学出版社,2002..
  • 4BjarneStroustrup 裘宗燕译.C++ProgrammingLanguage[M].北京:机械工业出版社,2002..
  • 5StanleyBLppman JosseLajoie 潘爱民 张丽译.C++Primer第三版[M].北京:中国电力出版社,2002..

共引文献67

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部