Concepts of object-oriented programming with Visual Basic
Résumé
Summary of contents
- The basics of object-oriented programming
- handling object errors
- Turing machines - a simple object-oriented application
- OLE automation objects
Table of contents :
Preface ..... vii
Introduction ..... 1
1 The Basics of Object-Oriented Programming .....
5
- Data Types ..... 5
Encapsulation ..... 7
Abstract Data Types ..... 9
Classes ..... 12
Defining a Class in Visual Basic ..... 12
Defining a Property in Visual Basic ..... 14
Defining a Method in Visual Basic ..... 14
Exposing Properties Through the Property Let/Set/Get Procedures ..... 15
Objects ..... 17
Explicit Object Creation ..... 17
Instance Variables and Member Variables ..... 18
The As Object Syntax ..... 20
Implicit Object Creation ..... 21
Referencing Public Variables and Procedures ..... 22
The Object/Message Model ..... 23
The Me Keyword ..... 24
Object Properties and Object Hierarchies ..... 25
Creating and Destroying Objects ..... 31
Creating Objects ..... 32
Destroying Objects ..... 33
Reference Counts ..... 35
Circular References ..... 36
The Notorious End Statement ..... 42
How to Control a Circular Reference -A Linked List Example ..... 43
Form Modules ..... 48
Properties and Methods in a Form Module ..... 49
Collection Classes ..... 50
Constructing a Collection Class ..... 52
Polymorphism and Overloading ..... 65
Overloading ..... 66
Polymorphism ..... 66
Inheritance ..... 68
- Error Detection and Error Handling ..... 71
Types of Errors ..... 72
The Error Object ..... 73
Dealing with Run-Time Errors ..... 74
Where to Handle a Run-Time Error ..... 76
Dealing with Logical Errors ..... 80
Detecting Logical Errors ..... 80
Where to Handle a Logical Error ..... 81
Handling the Error in the Calling Procedure ..... 86
Errors Occurring in Events ..... 87
An Error-Handling Example ..... 88
- What Is an Algorithm? ..... 97
What Is a Turing Machine? ..... 99
Informal Definition of a Turing Machine ..... 99
Describing a Turing Machine ..... 102
Coding a Turing Machine ..... 104
Error Handling ..... 106
The Symbol Class ..... 108
The Symbols Collection Class ..... 108
The State Class ..... 110
The States Collection Class ..... 111
The Transition Class ..... 113
The Transitions Collection Class ..... 115
The Machine Class ..... 118
The User Interface ..... 128
The Standard Module ..... 133
A Final Comment ..... 134
- What Is OLE Automation? ..... 137
Public Really Means Public ..... 138
The Plan for This Chapter ..... 139
Communication Between OLE Automation Clients and Servers ..... 140
The Communication Problem ..... 141
Supplying Information to the Client ..... 142
What Is an Interface? ..... 143
The Vtable Interface ..... 143
Type Libraries ..... 143
OLE Interfaces ..... 144
The IUnknown Interface ..... 144
The IDispatch Interface ..... 145
Binding ..... 146
Putting It All Together..... 146
In-Process and Out-of-Process Servers ..... 152
Creating a Simple OLE Automation Server ..... 154
Creating a Simple Server ..... 154
A Small Client and the Three Forms of Binding ..... 157
Referencing the Server's Type Library ..... 159
Registering and Unregistering a Server ..... 160
How Servers Are Started and Ended ..... 161
Reference Counts for Servers ..... 162
Servers with a Visual Interface ..... 166
Servers with Dialog Boxes ..... 167
OLE Servers That Also Function as Stand-Alone Applications ..... 167
Handling Errors ..... 169
Be Nice ..... 171
Errors from Your Server's Servers ..... 171
Externally Creatable and Dependent Objects - The Object Hierarchy ..... 172
In-Process Issues ..... 176
Version Compatibility ..... 178
How Compatibility Can Be Affected ..... 178
How Visual Basic Handles Compatibility ..... 180
The Reference Server and Interim Builds ..... 183
L'auteur - Steven Roman
Steven Roman is Professor Emeritus of mathematics at the California State University, Fullerton. Dr. Roman has authored 32 books, including a number of books on mathematics, such as Coding and Information Theory, Advanced Linear Algebra, and Field Theory, published by Springer-Verlag. He has also written a series of 15 small books entitled Modules in Mathematics, designed for thegeneral college-level liberal arts student.
Caractéristiques techniques
PAPIER | |
Éditeur(s) | Springer |
Auteur(s) | Steven Roman |
Parution | 31/01/1997 |
Nb. de pages | 200 |
EAN13 | 9780387948898 |
Avantages Eyrolles.com
Consultez aussi
- Les meilleures ventes en Graphisme & Photo
- Les meilleures ventes en Informatique
- Les meilleures ventes en Construction
- Les meilleures ventes en Entreprise & Droit
- Les meilleures ventes en Sciences
- Les meilleures ventes en Littérature
- Les meilleures ventes en Arts & Loisirs
- Les meilleures ventes en Vie pratique
- Les meilleures ventes en Voyage et Tourisme
- Les meilleures ventes en BD et Jeunesse