| 订阅 | 在线投稿
分享
 
 
当前位置: 王朝网络 >> delphi >> zai Delphi zhong shi xian lei xing an quan de rong qi ,Delphi fan xing ku DGL yin jie ( ti gong yuan ma xia zai )

zai Delphi zhong shi xian lei xing an quan de rong qi ,Delphi fan xing ku DGL yin jie ( ti gong yuan ma xia zai )

2007-01-29 12:06:57 编辑來源:互联网 评论
 
 
 
本文为【在Delphi中实现类型安全的容器,Delphi泛型库DGL引介(提供源码下载)】的拼音翻译版
  zai Delphi zhong shi xian lei xing an quan de rong qi
   Delphi fan xing ku --DGL(The Delphi Generic Library) jian jie
   by HouSisong@263.net,2004.09.12
DGL ku xia zai an zhuang fang fa : jiang ku jie ya dao yi ge mu lu , ran hou zai Delphi zhong tian jia sou suo lu jing
  zui jin dou zai shi yong Delphi, dan Delphi zhong de rong qi he suan fa shi zai tai que fa le , you cun zai hen duo bu yi zhi , shi yong ye hen bu fang bian 。
  zai gou zao yi xie rong qi he suan fa de shi hou , zong shi fu nian C++ de fan xing he STL; suo yi jiu chang shi zai Delphi zhong bian xie fan xing dai ma ;
  qi ta xian you de Deplhi rong qi he suan fa ku shi xian zhong , zhu yao de shi xian tu jing you li yong Delphi zhong de array of const( xiang dang yu ruo lei xing , er qie dui jie gou de zhi chi cha , ru Decal); huo zhe jian li yi tao lei ti xi zuo wei rong qi zhong de yuan su ( zhu yao shi yong xu han shu ji zhi , ru : zuo qing hou you pian wen zhang ye tan dao guo ; yi ban jian dan lei xing xu yao zuo da bao chai bao ); huan you de shi xian shi zhen dui TObject、IInterface、String deng zuo duo tao dai ma shi xian ( ru :DCL ku ); dan ta men xiang dui yu C++ de STL lai shuo que xian ye hen ming xian , lei xing bu an quan , su du man , dai ma chong fu ;
  DGL ku mei you zhe xie wen ti , ku neng gou zhi chi suo you ji ben lei xing 、 zhi zhen ( bao kuo lei de zhi zhen )、Interface、 jie gou (record)、Object jie gou (Delphi zhong yi jing bu tui jian shi yong )、 lei cheng yuan han shu zhi zhen 、 lei (class) de zhi yu yi ( yi ban Delphi zhong bu xi guan shi yong lei de zhi yu yi , suo yi bu jian yi shi yong ) deng qi ta yong hu zi ding yi lei xing , bing qie lei xing an quan ( su du dang ran mei you wen ti la ), mei you chong fu dai ma !
  ku xian zai bao kuo yi xia zu jian :
  <object>
  _IIterator rong qi die dai qi
  _IMapIterator Map die dai qi
  (PointerBox han shu ke yi jiang yuan sheng zhi zhen bao zhuang cheng yi ge yu ku jian rong de die dai qi )
  < jie kou interface>
  _ICollection rong qi jie kou
  _ISerialContainer xu lie rong qi de jie kou
  _IVector xiang liang jie kou ( rong qi de yi zhong )
  _IList lian biao jie kou ( rong qi de yi zhong )
  _IDeque dui lie jie kou ( rong qi de yi zhong )
  _IStack dui zhan jie kou ( yi zhong rong qi pei jie qi )
  _IQueue shuang duan dui lie jie kou ( yi zhong rong qi pei jie qi )
  _IPriorityQueue you xian ji dui lie
  _ISet Set jie kou
  _IMultiSet MultiSet jie kou
  _IMap Map jie kou
  _IMultiMap MultiMap jie kou
  < lei class>
  _TAlgorithms suan fa lei ( bao kuo : kao bei 、 ti huan 、 shan chu 、 pai xu 、 sou suo deng suan fa )
  
  _TVector xiang liang shi xian lei
  _TList lian biao List de yi ge shi xian
  _TDeque dui lie Deque de yi ge shi xian
  _TStack dui zhan Stack
  _TQueue shuang duan dui lie Queue
  (_THashTableBase Hash biao ( ku nei bu shi yong ))
  _THashSet yong Hash biao shi xian de Set
  _THashMultiSet yong Hash biao shi xian de MultiSet
  _THashMap yong Hash biao shi xian de Map
  _THashMultiMap yong Hash biao shi xian de MultiMap
  shi xian yuan xing ju li :
  “ mo ban ” lei de sheng ming wen jian :UnitClassT.inc_h
  //<template:_T,_T_IsEqual>;
  type  TTest  = class (TObject ) private  a  : _T ;
   public  function  GetA ():_T ;
   fucntion  IsEqual (ATest :TTest ):bool ;
   end ;
  “ mo ban ” lei de shi xian wen jian :UnitClassT.inc_pas
   function  TTest.GetA (): _T ;
   begin  result :=a ;
   end ;
   fucntion  IsEqual (ATest :TTest ):bool ;
   begin  result :=_T_IsEqual (a ,ATest.a );
   end ;
  
  //////////////////////////////////////
  shi yong de shi hou dui “ mo ban ” lei zuo pointer de te hua
  unit  UnitTestPointer ;
  interface type  _T  = Pointer ;
  function  _T_IsEqual (cosnt  a ,b :_T );
  
  {
      $I  UnitClassT.inc_h 
  
}type  TTestPointer  = TTest ;
   // TTestPointer ding yi gei wai bu shi yong
   implementation 
  {
      $I  UnitClassT.inc_pas 
  
}function  _T_IsEqual (cosnt  a ,b :_T );
  begin  result :=(a =b );
  end ;
  end. 
  shi yong de shi hou dui “ mo ban ” lei zuo double de te hua
  unit  UnitTestDouble ;
  interface type  _T  = double ;
  
  {
      $I  UnitClassT.inc_h 
  
}type  TTestFloat  = TTest ;
   // TTestFloat ding yi gei wai bu shi yong
  function  _T_IsEqual (cosnt  a ,b :_T );
  implementation function  _T_IsEqual (cosnt  a ,b :_T );
  begin  result :=(a =b );
  end ;
  
  {
      $I  UnitClassT.inc_pas 
  
}end. 
  ( jiang lei fen cheng liang ge bu fen de yuan yin shi zhe yang ke yi $Include geng duo de wen jian , xing cheng zu he ; gan jiao xiang C++ )
  zhe li zhi dui yi ge _T lei xing zuo le shen shu hua , dang ran huan ke yi dui duo ge lei xing zuo te hua ; shen zhi shen shu hua yi xie chang liang he qi ta han shu ( bi ru Hash zhi han shu ), li yong $define\$ifdef jin xing tiao jian bian yi ( zhu yao yong lai you hua huo te shu chu li ); yong zhe zhong fang fa zai jia shang jie kou (Interface, bu shi bi xu ); zai Delphi zhong jiu ke yi shi xian tong yong \ gao xiao \ yi yong de rong qi he suan fa ku le ;【原文】【汉音对照
 
 
 
 
 
 
 
 
 
日版宠物情人插曲《Winding Road》歌词

日版宠物情人2017的插曲,很带节奏感,日语的,女生唱的。 最后听见是在第8集的时候女主手割伤了,然后男主用嘴帮她吸了一下,插曲就出来了。 歌手:Def...

兄弟共妻,我成了他们夜里的美食

老钟家的两个儿子很特别,就是跟其他的人不太一样,魔一般的执着。兄弟俩都到了要结婚的年龄了,不管自家老爹怎么磨破嘴皮子,兄弟俩说不娶就不娶,老父母为兄弟两操碎了心...

如何磨出破洞牛仔裤?牛仔裤怎么剪破洞?

把牛仔裤磨出有线的破洞 1、具体工具就是磨脚石,下面垫一个硬物,然后用磨脚石一直磨一直磨,到把那块磨薄了,用手撕开就好了。出来的洞啊很自然的。需要猫须的话调几...

我就是扫描下图得到了敬业福和爱国福

先来看下敬业福和爱国福 今年春节,支付宝再次推出了“五福红包”活动,表示要“把欠大家的敬业福都还给大家”。 今天该活动正式启动,和去年一样,需要收集“五福”...

冰箱异味产生的原因和臭味去除的方法

有时候我们打开冰箱就会闻到一股异味,冰箱里的这种异味是因为一些物质发出的气味的混合体,闻起来让人恶心。 产生这些异味的主要原因有以下几点。 1、很多人有这种习...

 
 
zai Delphi zhong shi xian lei xing an quan de rong qi Delphi fan xing ku --DGL(The Delphi Generic Library) jian jie by [url=mailto:HouSisong@263.net]HouSisong@263.net[/url],2004.09.12 [url=http://cosoft.org.cn/projects/dgl/]DGL ku xia zai [/url] an zhuang fang fa : jiang ku jie ya dao yi ge mu lu , ran hou zai Delphi zhong tian jia sou suo lu jing zui jin dou zai shi yong Delphi, dan Delphi zhong de rong qi he suan fa shi zai tai que fa le , you cun zai hen duo bu yi zhi , shi yong ye hen bu fang bian 。 zai gou zao yi xie rong qi he suan fa de shi hou , zong shi fu nian C++ de fan xing he STL; suo yi jiu chang shi zai Delphi zhong bian xie fan xing dai ma ; qi ta xian you de Deplhi rong qi he suan fa ku shi xian zhong , zhu yao de shi xian tu jing you li yong Delphi zhong de array of const( xiang dang yu ruo lei xing , er qie dui jie gou de zhi chi cha , ru Decal); huo zhe jian li yi tao lei ti xi zuo wei rong qi zhong de yuan su ( zhu yao shi yong xu han shu ji zhi , ru : zuo qing hou you pian wen zhang ye tan dao guo ; yi ban jian dan lei xing xu yao zuo da bao chai bao ); huan you de shi xian shi zhen dui TObject、IInterface、String deng zuo duo tao dai ma shi xian ( ru :DCL ku ); dan ta men xiang dui yu C++ de STL lai shuo que xian ye hen ming xian , lei xing bu an quan , su du man , dai ma chong fu ; DGL ku mei you zhe xie wen ti , ku neng gou zhi chi suo you ji ben lei xing 、 zhi zhen ( bao kuo lei de zhi zhen )、Interface、 jie gou (record)、Object jie gou (Delphi zhong yi jing bu tui jian shi yong )、 lei cheng yuan han shu zhi zhen 、 lei (class) de zhi yu yi ( yi ban Delphi zhong bu xi guan shi yong lei de zhi yu yi , suo yi bu jian yi shi yong ) deng qi ta yong hu zi ding yi lei xing , bing qie lei xing an quan ( su du dang ran mei you wen ti la ), mei you chong fu dai ma ! ku xian zai bao kuo yi xia zu jian : <object> _IIterator rong qi die dai qi _IMapIterator Map die dai qi (PointerBox han shu ke yi jiang yuan sheng zhi zhen bao zhuang cheng yi ge yu ku jian rong de die dai qi ) < jie kou interface> _ICollection rong qi jie kou _ISerialContainer xu lie rong qi de jie kou _IVector xiang liang jie kou ( rong qi de yi zhong ) _IList lian biao jie kou ( rong qi de yi zhong ) _IDeque dui lie jie kou ( rong qi de yi zhong ) _IStack dui zhan jie kou ( yi zhong rong qi pei jie qi ) _IQueue shuang duan dui lie jie kou ( yi zhong rong qi pei jie qi ) _IPriorityQueue you xian ji dui lie _ISet Set jie kou _IMultiSet MultiSet jie kou _IMap Map jie kou _IMultiMap MultiMap jie kou < lei class> _TAlgorithms suan fa lei ( bao kuo : kao bei 、 ti huan 、 shan chu 、 pai xu 、 sou suo deng suan fa ) _TVector xiang liang shi xian lei _TList lian biao List de yi ge shi xian _TDeque dui lie Deque de yi ge shi xian _TStack dui zhan Stack _TQueue shuang duan dui lie Queue (_THashTableBase Hash biao ( ku nei bu shi yong )) _THashSet yong Hash biao shi xian de Set _THashMultiSet yong Hash biao shi xian de MultiSet _THashMap yong Hash biao shi xian de Map _THashMultiMap yong Hash biao shi xian de MultiMap shi xian yuan xing ju li : “ mo ban ” lei de sheng ming wen jian :UnitClassT.inc_h [code] //<template:_T,_T_IsEqual> type TTest = class(TObject) private a : _T; public function GetA():_T; fucntion IsEqual(ATest:TTest):bool; end; [/code] “ mo ban ” lei de shi xian wen jian :UnitClassT.inc_pas [code] function TTest.GetA(): _T; begin result:=a; end; fucntion IsEqual(ATest:TTest):bool; begin result:=_T_IsEqual(a,ATest.a); end; [/code] ////////////////////////////////////// shi yong de shi hou dui “ mo ban ” lei zuo pointer de te hua [code] unit UnitTestPointer; interface type _T = Pointer; function _T_IsEqual(cosnt a,b:_T); {$I UnitClassT.inc_h} type TTestPointer = TTest; // TTestPointer ding yi gei wai bu shi yong implementation {$I UnitClassT.inc_pas} function _T_IsEqual(cosnt a,b:_T); begin result:=(a=b); end; end. [/code] shi yong de shi hou dui “ mo ban ” lei zuo double de te hua [code] unit UnitTestDouble; interface type _T = double; {$I UnitClassT.inc_h} type TTestFloat = TTest; // TTestFloat ding yi gei wai bu shi yong function _T_IsEqual(cosnt a,b:_T); implementation function _T_IsEqual(cosnt a,b:_T); begin result:=(a=b); end; {$I UnitClassT.inc_pas} end. [/code] ( jiang lei fen cheng liang ge bu fen de yuan yin shi zhe yang ke yi $Include geng duo de wen jian , xing cheng zu he ; gan jiao xiang C++ ) zhe li zhi dui yi ge _T lei xing zuo le shen shu hua , dang ran huan ke yi dui duo ge lei xing zuo te hua ; shen zhi shen shu hua yi xie chang liang he qi ta han shu ( bi ru Hash zhi han shu ), li yong $define\$ifdef jin xing tiao jian bian yi ( zhu yao yong lai you hua huo te shu chu li ); yong zhe zhong fang fa zai jia shang jie kou (Interface, bu shi bi xu ); zai Delphi zhong jiu ke yi shi xian tong yong \ gao xiao \ yi yong de rong qi he suan fa ku le ;
󰈣󰈤
  免责声明:本文仅代表作者个人观点,与王朝网络无关。王朝网络登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
情人节的清纯女生(9)
情人节的清纯女生(8)
情人节的清纯女生(7)
情人节的清纯女生(6)
山东蓬莱海边组照
一探哲蚌 II
一探哲蚌 III
古长城的一角
 
>>返回首页<<
 
 
 为你推荐
 
 
 
 转载本文
 UBB代码 HTML代码
复制到剪贴板...
 
 热帖排行
 
 
 
 
 
©2005- 王朝网络 版权所有