Sysprog 7

57 %
43 %
Information about Sysprog 7
Technology

Published on April 27, 2009

Author: linuxawy

Source: slideshare.net

C/C++ For Linux Session 7 C++ - Session 1

Session 7

C++ - Session 1

Outline Why C++? New easier way to code old concepts Classes More on old concepts renewed Automake example

Why C++?

New easier way to code old concepts

Classes

More on old concepts renewed

Automake example

Object-Oriented Concepts Instance vs type Isa Not centered on procedure (flow control) Centered on object: flow possibilities explode on global level Consider IPC example – is OO doable in C?

Instance vs type

Isa

Not centered on procedure (flow control)

Centered on object: flow possibilities explode on global level

Consider IPC example – is OO doable in C?

Central Axes of our Discussion Abstraction/hiding made easier Object behavior modification common/specific Generic programming type independence Inter-object interaction Design

Abstraction/hiding made easier

Object behavior modification

common/specific

Generic programming

type independence

Inter-object interaction

Design

References An object naming Declaration Lvalue assignment from const, non-const

An object naming

Declaration

Lvalue assignment from const, non-const

Remember Functions? Overloading Function signature const Default arguments Ambiguity with overloading

Overloading

Function signature

const

Default arguments

Ambiguity with overloading

Remember Scopes? Namespaces A scope unrelated to any instances Declaration Using Scoping operator Can be nested

Namespaces

A scope unrelated to any instances

Declaration

Using

Scoping operator

Can be nested

Class An object type A scope

An object type

A scope

Class as Object type Define behavior/interface: Member variables Member methods Can define creation/deletion behavior

Define behavior/interface:

Member variables

Member methods

Can define creation/deletion behavior

Class as a Scope Private - Not accessible from outside that class Public - Accessible from outside the class :: on class-wide things .,-> on instance Enumerations, consts, nested classes/structures

Private - Not accessible from outside that class

Public - Accessible from outside the class

:: on class-wide things

.,-> on instance

Enumerations, consts, nested classes/structures

Creation/Deletion Constructors Destructors How they get invoked Declaration scoping Malloc/free with an attitude: new delete

Constructors

Destructors

How they get invoked

Declaration

scoping

Malloc/free with an attitude:

new

delete

Static Members Class-wide, do not operate on an instance “public”ness still applies (outside initialization) Variables must be initialized Methods can not operate on an instance, i.e. can not access non-static members.

Class-wide, do not operate on an instance

“public”ness still applies (outside initialization)

Variables must be initialized

Methods can not operate on an instance, i.e. can not access non-static members.

Structures with an attitude Now object types Now have member methods No access level Anonymous structures and unions To be continued

Now object types

Now have member methods

No access level

Anonymous structures and unions

To be continued

Automake example Write your code Makefile.am SUBDIRS Building Libraries Building executables Linking against your library Including your headers autoscan

Write your code

Makefile.am

SUBDIRS

Building Libraries

Building executables

Linking against your library

Including your headers

autoscan

Automake example-cont'd Modify output Rename to configure.ac AM_INIT_AUTOMAKE AC_PROG_LIBTOOL autoreconf --install ./configure Make

Modify output

Rename to configure.ac

AM_INIT_AUTOMAKE

AC_PROG_LIBTOOL

autoreconf --install

./configure

Make

Add a comment

Related presentations

Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...

In this presentation we will describe our experience developing with a highly dyna...

Presentation to the LITA Forum 7th November 2014 Albuquerque, NM

Un recorrido por los cambios que nos generará el wearabletech en el futuro

Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...

Microsoft finally joins the smartwatch and fitness tracker game by introducing the...

Related pages

www.Pi-sysprog.de - Pi-Sysprog

In Deutschland, rangiert Pi-sysprog.de auf Platz 7.867.472, mit geschätzten < 300 Besuchern im Monat. Klicken Sie hier um mehr Informationen zu dieser ...
Read more

WinCDEmu - the easiest way to mount an ISO. And more...

Open source CD and DVD emulator for Windows which supports ISO, CUE, BIN/RAW/IMG file formats as well as SMB network shares.
Read more

Sysprog | Define Sysprog at Dictionary.com

Sysprog definition at Dictionary.com, a free online dictionary with pronunciation, ... system 7.5; system account manager; system administration;
Read more

sysprog (@sysprog3) | Twitter

The latest Tweets from sysprog (@sysprog3) Home; About; Search query Search Twitter. Saved searches. ... 7:46 AM - 10 Oct 2015 · Details. 20 retweets 4 ...
Read more

CA-7 3.3 Systems Programmer Guide - John Miller ...

7.6.1.4 Requesting the Reports..... 7-39 7.6.1.5 Recovery Aid Procedures..... 7-40 Chapter 8. Log and History Data Set Management..... 8-1 8.1 Log ...
Read more

A sysprog view of z/OS 64- bit Virtual Application Support

A sysprog view of z/OS 64-bit Virtual Application Support Thomas Petrolino ... (V1.7) y#pragma runopts - C program source, C/C++ compiler builds CELQUOPT
Read more

8.7.1 Formated Input

8.8 Options Up: 8.7 Input Previous: 8.7 Input. 8.7.1 Formated Input. int scanw(fmt, ...) int wscanw(win, fmt, ...) int mvscanw(y, x, fmt, ...) int mvwscanw ...
Read more