• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号
您的位置:首页 > 程序设计 >vc/mfc > Atl开发,不用MFC,有没有类似MFC中的CArray、CList、CMap等集合类呀,我用的是VC60

Atl开发,不用MFC,有没有类似MFC中的CArray、CList、CMap等集合类呀,我用的是VC60

作者:佚名 字体:[增加 减小] 来源:互联网 时间:2017-06-04

佚名通过本文主要向大家介绍了Atl开发,不用MFC,有没有类似MFC中的CArray、CList、CMap等集合类呀,我用的是VC60等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: Atl开发,不用MFC,有没有类似MFC中的CArray、CList、CMap等集合类呀,我用的是VC60
描述:

rt


解决方案1:

stl 个人感觉比MFC提供的要好

解决方案2:

ATL 提供了许多存储和访问数据的类。在确定使用哪个类时有几个因素起决定作用,其中包括: 
要存储的数据量 
访问数据时的效率/性能比 
按索引或按键访问数据的能力 
数据的排序方式 
个人喜好 
小集合类
ATL 提供了下列处理少量对象的数组类。不过,这些类受到限制,仅供 ATL 在内部使用。建议您在程序中不要使用它们。
类 数据存储的类型 
CSimpleArray 实现处理少量对象的数组类。 
CSimpleMap 实现处理少量对象的映射类。 
通用用途集合类
下面的类实现数组、列表和映射,并且以通用用途集合类的形式提供:
类 数据存储的类型 
CAtlArray 实现数组。 
CAtlList 实现列表。 
CAtlMap 实现映射结构,通过该结构可以按键或按值引用数据。 
CRBMap 使用“红/黑”算法来实现映射结构。 
CRBMultiMap 实现“红/黑”多映射结构。 

解决方案3:

template< 
   typename E,
   class ETraits = CElementTraits< E > 
>
class CAtlArray
Parameters
E 
The type of data to be stored in the array. 
ETraits 
The code used to copy or move elements. 
Remarks
CAtlArray provides methods for creating and managing an array of elements of a user-defined type. Although similar to standard C arrays, the CAtlArray object can dynamically shrink and grow as necessary. The array index always starts at position 0, and the upper bound can be fixed, or allowed to expand as new elements are added.
For arrays with a small number of elements, the ATL class CSimpleArray can be used.
CAtlArray is closely related to MFC's CArray class and will work in an MFC project, albeit without serialization support.
template<
   typename E,
   class ETraits = CElementTraits< E >
>
class CAtlList
Parameters
E 
The element type. 
ETraits 
The code used to copy or move elements. See CElementTraits Class for more details. 
Remarks
The CAtlList class supports ordered lists of nonunique objects accessible sequentially or by value. CAtlList lists behave like doubly linked lists. Each list has a head and a tail, and new elements (or lists in some cases) can be added to either end of the list, or inserted before or after specific elements.
Most of the CAtlList methods make use of a position value. This value is used by the methods to reference the actual memory location where the elements are stored, and should not be calculated or predicted directly. If it is necessary to access the nth element in the list, the method CAtlList::FindIndex will return the corresponding position value for a given index. The methods CAtlList::GetNext and CAtlList::GetPrev can be used to iterate through the objects in the list.
This class provides methods for creating and managing a map object.
template<
   typename K,
   typename V,
   class KTraits = CElementTraits< K >,
   class VTraits = CElementTraits< V >
>
class CAtlMap
Parameters
K 
The key element type. 
V 
The value element type. 
KTraits 
The code used to copy or move key elements. See CElementTraits Class for more details. 
VTraits 
The code used to copy or move value elements. 
Remarks
CAtlMap provides support for a mapping array of any given type, managing an unordered array of key elements and their associated values. Elements (consisting of a key and a value) are stored using a hashing algorithm, allowing a large amount of data to be efficiently stored and retrieved.
The KTraits and VTraits parameters are traits classes that contain any supplemental code needed to copy or move elements.
An alternative to CAtlMap is offered by the CRBMap class. CRBMap also stores key/value pairs, but exhibits different performance characteristics. The time taken to insert an item, look up a key, or delete a key from a CRBMap object is of order log(n), where n is the number of elements. For CAtlMap, all of these operations typically take a constant time, although worst-case scenarios might be of order n. Therefore, in a typical case, CAtlMap is faster.
The other difference between CRBMap and CAtlMap becomes apparent when iterating through the stored elements. In a CRBMap, the elements are visited in a sorted order. In a CAtlMap, the elements are not ordered, and no order can be inferred.

解决方案4:

,对,用stl的.
有vector,list,map 等东西给你用.

解决方案5:

同意 tlg2003(tlg2003) ,stl一样也可用!

解决方案6:

C++的STL。

解决方案7:

stl库有

解决方案8:

界面可以用wtl
数据结构使用stl
抛开

分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • ATL开发指南第2版为什么所有的书店都没有卖的?电子版也没有
  • 请问哪位老大有<ATL开发指南>这本书?你还需要吗?如果不用的话能不能转让给我啊,最近在搞ATL,苦于没有好的指导书或者借我复印一下也
  • 再次100分求atl开发指南电子书
  • 谁有《ATL开发指南》第二版源代码?
  • 哪位有《ATL开发指南》这本书的源码,发给我一份?或者给一个能用的链接
  • 求<ATL开发指南>电子书
  • 再求<<ATL开发指南>>电子书籍
  • ATL开发COM如何区别是运行时态还是设计时态
  • 想把MSWORD嵌入到ATL开发的窗口中,谁能把关于CAxWindow的代码贴出来呀,十分感谢,着急!!!
  • 求ATL开发指南源代码

相关文章

  • 2017-06-04 搜索了好久,未果,高分求助(菜鸟级),如何获得正确的返回值。
  • 2017-06-05 在大数据量线程计算过程中,我不希望其占用100%的系统资源,程序能响应其它的消息,该怎么办?
  • 2017-06-04 用ATL向导生成的COM组件中,如何注册组件的类别信息
  • 2017-06-05 vc处理CAD文件
  • 2017-06-04 有没有MediaService9方面开发的例子?给一个,多谢!
  • 2017-06-04 编写OCX控件,如何设定其初始大小?甚至做出固定大小的控件。
  • 2017-06-04 编程关闭WINDOWS更新
  • 2017-06-05 C#工程如何添加64位的OCX组件
  • 2017-06-05 一个软件同时联接两个端口
  • 2017-06-04 msnet的到来,com,com+还有明天吗?

文章分类

  • JavaScript
  • ASP.NET
  • PHP
  • 正则表达式
  • AJAX
  • JSP
  • ASP
  • Flex
  • XML
  • 编程技巧
  • Android
  • swift
  • C#教程
  • vb
  • vb.net
  • C语言
  • Java
  • Delphi
  • 易语言
  • vc/mfc
  • 嵌入式开发
  • 游戏开发
  • ios
  • 编程问答
  • 汇编语言
  • 微信小程序
  • 数据结构
  • OpenGL
  • 架构设计
  • qt
  • 微信公众号

最近更新的内容

    • 组件消息的问题
    • 奇怪的问题--DLL多线程使用COM出错能解决定送分
    • com初学者的疑惑?
    • excel作报表
    • vc++操作word,在word中生成柱状图,饼状图,请专家帮忙,在线等
    • 如何在IE中浏览TIF文件,就像我们在IE中浏览PDF文件一样?
    • vc2005与Excel
    • 请问如何用程序修改DCOM的属性?
    • 屡败屡战,难题征高手解。
    • 关于模糊搜索的问题

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有