CSE687 - Object Oriented Design

Lecture #7 - Template Policies and Traits

Revised: 10 February 2008
Home Courses Code Handouts CoreTech Books Articles Math Research Masters Projects SWDev WebDev News OtherLinks SiteDesign Graduates AllPages Office Hours Notices Contents

CSE681-SWMAA CSE686-IP CSE687-OOD CSE775-DO CSE776-DP CSE778-AWP CSE784-SWS

Lecture #01 Lecture #02 Lecture #03 Lecture #04 Lecture #05 Lecture #06 Lecture #07
Lecture #08 Lecture #09 Lecture #10 Lecture #11 Lecture #12 Lecture #13 Lecture #14
Lecture #15 Lecture #16 Lecture #17 Lecture #18 Lecture #19 Lecture #20 Lecture #21
Lecture #22 Lecture #23 Lecture #24 Lecture #25 Lecture #26 Lecture #27 Lecture #28

Contents Syllabus SG - Design SG - Templates SG - Class Relationships

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

Office Hours: Instructor & TAs

Content:

This lecture covers template template policies and template traits. We will continue discussing the HashTable example.
  1. Syllabus
    Describes topics to be covered, reading material for you to digest before coming to class, and due dates for the assigned projects.
  2. Project #1
    Profiling, Due on Monday.
  3. Project #2 - due midnight tonight
    Graphs with Depth-First-Search and Strong Component Algorithm.
  4. Policy for due date extensions - only for certified illness and work or interview trips out of town: one week extension, with proof. Only one extension per project.
  5. On Friday, March 21st the "Surviving OOD" help session will move to CST 3-224, for that week only.
  6. 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.
  7. small template examples
  8. STL Template-based Container Examples
    Illustrates use of vectors, lists, sets, and maps.
  9. 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.
  10. Design of Containers with Iterators
    Look at HashTable<key,value,Hash> and HashIterator<key,value,Hash> classes. Draw some fairly general conclusions.
  11. Template Policies and Traits
    Discusses policies and traits in the context of our HashTable project.
  12. Template Techniques
    Template members, template template parameters, partial template specialization and more...
  13. Smart Pointers with Reference Counting
  14. Design Strategies
    Discusses styles of design and binding.
  15. Design Issues
  16. Namespaces
    Basic information about how namespaces work. We will discuss why you want to use them.
  17. Design Rules
    Design rules and idioms that transcend Object Oriented Design.
  18. Lecture #7 folder
    Contains a page of links to presentations and code discussed in this class. The Lecture folders will occasionally hold physical files of interest as well. Usually, however, all the materials of interest to the class are in the presentations and code folders. The contents of these folders will grow as you progress through the course.