当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: Ubiquitous Iterator This art
 

 

 ·pxe技术    »显示摘要«
    摘要:pxe (preboot execute environment)是由intel 公司开发的最新技术,工作于client/server的网络模式,支持工作站通过网络从远端服务器下载映像,并由此支持来自网络的操作系统的启动过程,其启动过程中,终端通过pxe(存放于网卡上的bootrom中或主板的bios)向服务器发出请求,要求服务器分配ip地址,再用tftp(trivial file transfe......
    摘要:系统准备:一个运转正常的linux(这个大家都有)硬件要求:至少一块网卡,宽带设备已经申请完毕,同时已经开通广州电信的ads(lan)l使用的是pppoe拨号方式,因此,要在linux下使用adsl,必须安装pppoe客户端软件。下面说明如何进行安装: 本人以redhat linux 7.3为平台,其它平台linux的安装办法可以参照下面安装的步骤。 一、安装的前提条件 1.确保安装了网卡并工作正......


UbiquitousIterator(inEnglish)
ubiquitous iterator

this article is contributed by wang hailong. 【程序编程相关:豪杰掌门人:游刃于技术与管理之间(一)

  【推荐阅读:豪杰掌门人:游刃于技术与管理之间(二)

preface 【扩展信息:ERP与集中式管理

 

 

as one of 23 basic design patterns, iterator seems to appear everywhere. this article discusses some scenarios where iterator pattern is applied, including stl, collection in java, ienumxxxx interface in com, irowset interface in ole db, recordset object in ado, resultset in jdbc, cursor in oracles sql/pl.

 

iterator concept

 

iterator pattern separates the iteration operation from container/collection. to satisfy iterator pattern, there must be two objects: a container and its iterator.

the aim of iterator pattern is to unify the way of iterating a container, in spite of what kiand of data is put in the container, and how the containers internal structure is implemented.

the following is a simple example imitating stl.

 

// simplearray.cpp

 

template<typename t>

class simplearray

{

t data[100];

 

public:

class iterator

{

simplearray<t>* m_parray;

int m_icurrentindex;

 

friend class simplearray<t>;

public:

iterator( simplearray<t>* parray = 0) : m_parray(parray)

{

}

 

void reset()

{

m_icurrentindex = 0;

}

 

t operator *()

{

return m_parray->data[m_icurrentindex];

}

 

void operator --()

{


...   下一页
    摘要:************************************************************************以下步骤有很多都是很初级的命令或解释,因为偶是linux新手,*在编译过程中走了很多弯路,花了大量时间找各种解决办法,所以*把相应的命令都写了出来,希望对跟偶一样的才入门不久而又想*编译内核的新手有所帮助!** kilvon 05-mar-2003****......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE