Sysprog 8
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,001
On Slideshare
999
From Embeds
2
Number of Embeds
2

Actions

Shares
Downloads
10
Comments
0
Likes
0

Embeds 2

http://www.linkedin.com 1
https://www.linkedin.com 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. C/C++ For Linux
      • Session 8
      • C++ - Session 2
  • 2. Outline
    • Automake example
    • More on OO in C++ (Classes Cont'd)
    • ISA in C++ - Inheritance
    • Polymorphism
    • Next session
  • 3. Automake example
    • Write your code
    • Makefile.am
      • SUBDIRS
      • Building Libraries
      • Building executables
        • Linking against your library
        • Including your headers
    • autoscan
  • 4. Automake example-cont'd
    • Modify output
      • Rename to configure.ac
      • AM_INIT_AUTOMAKE
      • AC_PROG_LIBTOOL
    • autoreconf --install
    • ./configure
    • Make
  • 5. Operator Overloading
    • Why?
      • New behavior for a new type
      • Some use cases: assignment, addition, subscript.
    • Syntax
      • Within class (this)
      • Outside (to be continued)
  • 6. Some new operators
    • Stream operators
      • <<, >>
      • iostream, cin, and cout
    • new and delete
      • Overloading
  • 7. Exceptions
    • OO error handling
    • Syntax: try, throw, catch
    • What happens?
    • -fexceptions/-fno-exceptions
    • stdexcept logic_error
    • Mixed environment: structural/OO
    • Unhandled exceptions in Linux
  • 8. Friends
    • Access to private data
    • Friend functions/classes
    • Use and abuse of friends
    • Friend operator overloading
  • 9. Inheritance
    • ISA in C++
    • Base Class – Derived Classes
    • Inheritance hierarchy – tree
  • 10. More Data Hiding
    • Types
      • Public, Private, Protected
    • Role of protected
    • Syntax
    • To be continued
  • 11. The ISA
    • Construction
    • this is a base and is a derived
      • External access to public base class members
      • access to base method
    • Method Overriding
      • Same signature (vs overloading)
  • 12. Multiple Inheritance
    • Why?
    • Syntax
    • Diamond Shape
  • 13. Polymorphism
    • Pointers to base and derived
    • virtual methods
    • Pure virtual methods
  • 14. Interface
    • Abstract vs Concrete
    • Use of private inheritance
    • Multiple Inheritance
    • In design patterns:
      • Factory
      • Strategy – in IPC e.g.
  • 15. Next Session
    • Some design patterns
    • A design problem
      • Some device(s) has no nvram for settings
      • A program that always syncs it and is used to manage it
        • Underlying interface to device can change