Presentation is loading. Please wait.

Presentation is loading. Please wait.

Windows Development Dynadata Copyright, 2014 © DynaData S.A. 1/11.

Similar presentations


Presentation on theme: "Windows Development Dynadata Copyright, 2014 © DynaData S.A. 1/11."— Presentation transcript:

1 Windows Development Dynadata Copyright, 2014 © DynaData S.A. 1/11

2 Dynadata Software Development with MFC Library
Copyright, 2014 © DynaData S.A. 2/11

3 Collections MFC provides collection classes based on C++ templates, which makes it easier to derive one's own type-safe collection classes. MFC provided two types of collection classes to manage groups of objects: collection classes that are created from C++ templates; and Collection classes that are not created from templates. Dynadata Copyright, 2014 © DynaData S.A. 3/11

4 Dynadata Collections II
A collection class is characterized by its shape and by the types of its elements. The shape refers to the way the objects are organized and stored by the collection. Dynadata Copyright, 2014 © DynaData S.A. 4/11

5 Dynadata Collections III MFC provides three basic collection shapes:
Lists Arrays Maps (also known as dictionaries) Dynadata Copyright, 2014 © DynaData S.A. 5/11

6 Lists The list class provides an ordered, non indexed list of elements, implemented as a doubly linked list. A list has a "head" and a "tail," and adding or removing elements from the head or tail, or inserting or deleting elements in the middle, is very fast. Dynadata Copyright, 2014 © DynaData S.A. 6/11

7 Arrays The array class provides a dynamically sized, ordered, and integer-indexed array of objects. Dynadata Copyright, 2014 © DynaData S.A. 7/11

8 Maps A map is a collection that associates a key object with a value object. Dynadata Copyright, 2014 © DynaData S.A. 8/11

9 Templates The easiest way to implement a type-safe collection that contains objects of any type is to use one of the MFC template-based classes. Dynadata Copyright, 2014 © DynaData S.A. 9/11

10 Templates II To create a dynamically sized array of "doubles," or a list of CPerson objects use C++ template syntax: CArray<double, double> myArray; CList<CPerson, CPerson&> myList; Dynadata Copyright, 2014 © DynaData S.A. 10/11

11 Collection Shape Features
Dynadata Copyright, 2014 © DynaData S.A. 11/11


Download ppt "Windows Development Dynadata Copyright, 2014 © DynaData S.A. 1/11."

Similar presentations


Ads by Google