CSE687 - Object Oriented Design
Lecture #6 - Templates
Revised: 01 February 2009
Web Resources:
Stroustrup's Home Page,
Assoc. of C/C++ Users,
C++ at Microsoft,
Code Project,
Sells Brothers,
Guru of the Week,
C/C++ User's Journal,
devCentral,
Dr. Dobb's Journal,
Boost Library,
techNetCast
Content:
This lecture covers template functions and template classes. We will discuss a HashTable example.
-
Syllabus
Describes topics to be covered,
reading material for you to digest before coming to class, and due dates
for the assigned projects.
-
Uploading Project Submissions
-
Project #1,
Project #2
-
Templates Presentation
Templates are one of the terrific features of the C++ language. They are the basis of the Standard
Template Library (STL) and are useful in day-to-day programming.
-
Template Code Examples
Basic and some more advanced template examples.
-
STL Template-based Container Examples
Illustrates use of vectors, lists, sets, and maps.
-
Functor examples
-
HashTable Project
HashTables are fundamental and very useful data structures. At this time there are no hash-based containers
in the STL. So here is my implementation - it's a good example of the use of templates.
-
Design of Hash Table and Iterators
-
Template Policies and Traits
-
Design Strategies
Discusses styles of design and binding.
-
Design Rules
Design rules and idioms that transcend Object Oriented Design.