Presentation is loading. Please wait.

Presentation is loading. Please wait.

Modern C++ in practice.

Similar presentations


Presentation on theme: "Modern C++ in practice."— Presentation transcript:

1 Modern C++ in practice

2 Goals Practical experience of C++ best practices, idioms and details
Design patterns in C++ Generic, functional and template programming Using boost and STL Utilize APIs, books and mailing lists Coherent coding style and get to know each other

3 Why bother with details?
Cons More than 20 years old Backwards compatible with C Lots of mistakes in both language and library Very complex Pros Powerful features Well spread Vivid community Rapidly developing

4 Polymorphism in C++ Virtual keyword Function pointers
Function overloading Implicit type conversion Concepts Policy classes Argument dependent lookup (ADL) Partial template specialization

5 C++ programming Object oriented programming Generic programming
Functional programming Template metaprogramming Blend these paradigms to acheive code that is Simple and easily read Decoupled and testable Robust to change Reusable

6 Roadmap Very unclear Start today and see how it evolves Think about:
What you want to learn? Should we add or remove goals?

7 Today boost::variant boost::signals
Discuss slots n’ signals relation to bind and function My observable class Pair-wise design of a toy problem Discuss design differences

8 Toy problem: Cat n’ Rat Design logical interfaces and concepts for a simple game 2D discrete coordinate world Contains cats, rats, cheese and obstacles Move events appear for cats and rats Collision detection, not handling

9 Toy problem: Focus Focus the design on When working try to
Low coupling, high cohesion Robustness to future changes Event driven information flow When working try to Use boost and STL Push error checking towards compile and link time Write generic code when it doesn’t complicate design

10 Future suggestions Implement logical model Design and maybe implement:
Text view Collision handling Serialization Simple client/server Extend game functionality Implement message distributor


Download ppt "Modern C++ in practice."

Similar presentations


Ads by Google