Delphi XE2 Foundations
Home
About the author
Editions
Errata
FAQ
Feedback
Screenshots
Table of contents Chapter 1 – Language basics Chapter 2 – Simple types: enumerations, numbers and date/times Chapter 3 – OOP fundamentals Chapter 4 – Going further with classes and records Chapter 5 – String handling Chapter 6 – Arrays, collections and enumerators Chapter 7 – Basic I/O: writing console applications and working with the file system Chapter 8 – Advanced I/O: streams Chapter 9 – ZIP, XML, Registry and INI file support Chapter 10 – Packages Chapter 11 – Dynamic typing and expressions Chapter 12 – Runtime type information (RTTI) Chapter 13 – Working with native APIs Chapter 14 – Writing and using dynamic libraries Chapter 15 – Multithreading
Chapter 1 – Language basics
Chapter 2 – Simple types: enumerations, numbers and date/times
Chapter 3 – OOP fundamentals
Chapter 4 – Going further with classes and records
Chapter 5 – String handling
Chapter 6 – Arrays, collections and enumerators
Chapter 7 – Basic I/O: writing console applications and working with the file system
Chapter 8 – Advanced I/O: streams
Chapter 9 – ZIP, XML, Registry and INI file support
Chapter 10 – Packages
Chapter 11 – Dynamic typing and expressions
Chapter 12 – Runtime type information (RTTI)
Chapter 13 – Working with native APIs
Chapter 14 – Writing and using dynamic libraries
Chapter 15 – Multithreading
From classes to metaclasses Defining class methods Explicit class references The implicit Self parameter Static class members Static members vs. metaclass members proper Class constructors and destructors Metaclass usage scenarios Class factories: an example
What an interface is Defining an interface GUIDs Implementing an interface Method resolution clauses Inheriting interface implementations Reference counting Avoiding cyclic references: using ‘weak’ references Interface querying: as, is, hard casts and Supports
The IInterface type Interfaces vs. components? Interface aggregation: the ‘implements’ keyword Aggregation hassles The COM aggregation pattern
Introducing generics Sorts of generic Defining constraints Constraint syntax True strong typing: no type erasure Generics and polymorphism Constraining constraints The constructor constraint Beyond the constructor constraint
Basic syntax Predefined method reference types Method references as a more flexible sort of callback type Referencing variables, not copying values Variable capturing Constructor functions Anonymous methods under the bonnet: bona fide ‘methods’ after all Anonymous methods as classes
Syntax Implementing assignments or typecasts from or to a record type Example: a string type with a minimum and maximum length Implementing TBoundedString Go forth and multiply?