欢迎来到天天文库
浏览记录
ID:51500387
大小:916.35 KB
页数:4页
时间:2020-03-25
《侯捷stl源码剖析注释之25 sgi-stl-queue.pdf》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、完整列表1G++2.91.57,cygnuscygwin-b20includeg++stl_queue.h完整列表/***Copyright(c)1994*Hewlett-PackardCompany**Permissiontouse,copy,modify,distributeandsellthissoftware*anditsdocumentationforanypurposeisherebygrantedwithoutfee,*providedthattheabovecopyrightnoticeappearinallcopiesand*that
2、boththatcopyrightnoticeandthispermissionnoticeappear*insupportingdocumentation.Hewlett-PackardCompanymakesno*representationsaboutthesuitabilityofthissoftwareforany*purpose.Itisprovided"asis"withoutexpressorimpliedwarranty.***Copyright(c)1996,1997*SiliconGraphicsComputerSystems,Inc.**Permissionto
3、use,copy,modify,distributeandsellthissoftware*anditsdocumentationforanypurposeisherebygrantedwithoutfee,*providedthattheabovecopyrightnoticeappearinallcopiesand*thatboththatcopyrightnoticeandthispermissionnoticeappear*insupportingdocumentation.SiliconGraphicsmakesno*representationsaboutthesuitab
4、ilityofthissoftwareforany*purpose.Itisprovided"asis"withoutexpressorimpliedwarranty.*//*NOTE:Thisisaninternalheaderfile,includedbyotherSTLheaders.*Youshouldnotattempttouseitdirectly.*/#ifndef__SGI_STL_INTERNAL_QUEUE_H#define__SGI_STL_INTERNAL_QUEUE_H__STL_BEGIN_NAMESPACE#ifndef__STL_LIMITED_DEFA
5、ULT_TEMPLATEStemplate>#elsetemplate#endifclassqueue{friendbooloperator==__STL_NULL_TMPL_ARGS(constqueue&x,constqueue&y);friendbooloperator<__STL_NULL_TMPL_ARGS(constqueue&x,constqueue&y);public:typedeftypenameSequence::value_typevalue_type;type
6、deftypenameSequence::size_typesize_type;typedeftypenameSequence::referencereference;typedeftypenameSequence::const_referenceconst_reference;TheAnnotatedSTLSources2完整列表protected:Sequencec;//底層容器public://以下完全利用Sequencec的操作,完成queue的操作。boolempty()const{returnc.empty();}size_typesize()co
7、nst{returnc.size();}referencefront(){returnc.front();}const_referencefront()const{returnc.front();}referenceback(){returnc.back();}const_referenceback()const{returnc.back();}//deque是兩頭可進出,queue是末端進,前端出(所以先進者先出)。voidpush(cons
此文档下载收益归作者所有