Web Resources:
CppReference.com, CPlusPlus.com, C++ TechLinksGoing Native 2013 - many experts
Herb Sutter's Blog, Herb Sutter on C++11, Herb Sutter keynote - Going Native 2012
Scott Meyer's Blog, S.M. on thread suspension, S.M.: C++11 Sampler
Stroustrup's Home Page, Code Project, Boost Library
Content:
This lecture presents the Open/Closed Principle, an ideal model for software development. We discuss how the C++ language can be used to build software following the principle.-
Syllabus
Describes topics to be covered, reading material for you to digest before coming to class, and due dates for the assigned projects. -
Readings for this Lecture:
Class Text, CPPP:- review Chapter 15 - Object Oriented Programming, Chapter 16 - Templates
-
Projects:
Project #2 , Project2HelpS17, Tree Walk Demo
Parsing with Abstract Syntax Tree container Project #3
Code Publisher - new style casts demo, const pointers demo
-
Callable Objects:
Simple Demo of Callable Objects, Callable Objects Examples
Illustrates use of functions, function pointers, std::function<R(A...)>, lambdas, and lamda closures. -
Applications of Inheritance
The Command Pattern is an interesting application of inheritance: -
Open/Closed Principle
Open/Closed Principle
Another fundamental OOD principle that argues for using inheritance "hooks" and template-based classes. Extensible Parsing, from Project #2, Blog on Parser
This demonstrates the Open/Closed Principle by binding rules and actions to interfaces, used by the parser. The Adapter Pattern
This pattern, one of about 30 we discuss in CSE776 - Design Patterns, illustrates one way to adhere to the Open/Closed Principle. Heterogeneous List Structure
Unusual use of Liskov Substitution Satisfying the Open/Closed Principle
Protocols, Hooks, Policies, Inheriting Concrete Classes. -
Run-Time Type Indentification Presentation
RTTI is, perhaps, the antithesis of the Open/Closed Principle. Paradoxically, I used it building the trace class. - Exceptions
- Exception demo
- Enforcements
- Software Design
-
Design Presentation
Summarizes design issues for modules and classes. -
Design Guidelines
Design rules and idioms that transcend Object Oriented Design. -
Design Summary
Design rules and idioms that transcend Object Oriented Design. -
These are the most important items from today's lecture:
Callable Objects
Illustrates use of functions, function pointers, std::function<R(A...)>, lambdas, and lamda closures. Open/Closed Principle
Another fundamental OOD principle that argues for using inheritance "hooks" and template-based classes. Extensible Parsing, from Project #1, Blog on Parser
This demonstrates the Open/Closed Principle by binding rules and actions to interfaces, used by the parser.