Symbian OS ExplainedEffective C++ Programming for Smartphones phần 1 docx

40 277 0
Symbian OS ExplainedEffective C++ Programming for Smartphones phần 1 docx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

[...]... Summary 18 1 18 2 18 2 18 3 18 6 18 6 18 6 18 7 18 9 19 0 19 1 19 8 203 205 213 214 214 217 217 218 220 223 226 226 228 230 14 ECOM 233 14 .1 14.2 14 .3 14 .4 14 .5 14 .6 14 .7 233 236 237 240 242 245 246 ECOM Architecture Features of an ECOM Interface Factory Methods Implementing an ECOM Interface Resource Files Example Client Code Summary 15 Panics 247 15 .1 15.2 248 249 Just-In-Time Debugging Good Panic Style CONTENTS 15 .3... 15 .3 15 .4 15 .5 15 .6 Symbian OS Panic Categories Panicking Another Thread Faults, Leaves and Panics Summary 16 Bug Detection Using Assertions 16 .1 16.2 16 .3 ix 250 2 51 253 253 255 ASSERT_DEBUG ASSERT_ALWAYS Summary 256 2 61 263 17 Debug Macros and Test Classes 265 17 .1 17.2 17 .3 17 .4 Heap-Checking Macros Object Invariance Macros Console Tests Using RTest Summary 18 Compatibility 18 .1 18.2 18 .3 18 .4 18 .5... CONTENTS 11 .11 How Does Client–Server Communication Use Threads? 11 .12 What Are the Implications of Server-Side Active Objects? 11 .13 What Are the Advantages of a Local (Same-Process) Server? 11 .14 What Are the Overheads of Client–Server Communication? 11 .15 How Many Outstanding Requests Can a Client Make to a Server? 11 .16 Can Server Functionality Be Extended? 11 .17 Example Code 11 .18 Summary 12 The... Summary 12 The Client–Server Framework in Practice 12 .1 12.2 12 .3 12 .4 12 .5 12 .6 12 .7 12 .8 Client–Server Request Codes Client Boilerplate Code Starting the Server and Connecting to It from the Client Server Startup Code Server Classes Server Shutdown Accessing the Server Summary 13 Binary Types 13 .1 13.2 13 .3 13 .4 13 .5 13 .6 13 .7 13 .8 Symbian OS EXEs Symbian OS DLLs Writable Static Data Thread-Local Storage... Stack Memory Carefully Eliminate Sub-Expressions to Maximize Code Efficiency 300 3 01 303 309 312 314 315 317 317 320 325 328 x CONTENTS 21. 5 21. 6 Optimize Late Summary Appendix Code Checklist 330 3 31 333 Glossary 339 Bibliography and Online Resources 347 Index 3 51 Foreword Charles Davies, Chief Technical Officer, Symbian Software engineers live in interesting times: software is becoming pervasive We all... 18 .1 18.2 18 .3 18 .4 18 .5 18 .6 18 .7 18 .8 Forward and Backward Compatibility Source Compatibility Binary Compatibility Preventing Compatibility Breaks What Can I Change Without Breaking Binary Compatibility? Best Practice: Planning for Future Changes Compatibility and the Symbian OS Class Types Summary 265 270 273 276 277 278 279 280 2 81 287 289 2 91 292 19 Thin Templates 293 20 Expose a Comprehensive and... understand the essential Symbian OS concepts About this Book Developing good C++ code on Symbian OS requires a clear understanding of the underlying concepts and the nature of the operating system This book explains the key features of Symbian OS and shows how you can use this knowledge most effectively It also focuses on some aspects of good C++ style that particularly apply to Symbian OS With understanding... in C++ It does not assume in-depth knowledge of Symbian OS and covers the basics such as descriptors (Chapters 5 and 6) and active objects (Chapters 8 and 9) as well as more complex features such as the Symbian OS client–server architecture (Chapters 11 and 12 ) and ECOM (Chapter 14 ) The book focuses upon the core of the operating system, which should be equally applicable to all versions of Symbian OS, ... 20 .1 20.2 20.3 20.4 20.5 20.6 20.7 Class Layout IMPORT_C and EXPORT_C Parameters and Return Values Member Data and Functional Abstraction Choosing Class, Method and Parameter Names Compiler-Generated Functions Summary 21 Good Code Style 21. 1 21. 2 21. 3 21. 4 Reduce the Size of Program Code Use Heap Memory Carefully Use Stack Memory Carefully Eliminate Sub-Expressions to Maximize Code Efficiency 300 3 01. .. in C++ To quote from Scott Meyers ,1 whose book inspired me to write this one, ”In this book you’ll find advice on what you should do, and why, and what you should not do, and why not” 1 Scott Meyers, Effective C++: 50 specific ways to improve your programs and designs, 19 97 See the Bibliography for further details xiv ABOUT THIS BOOK Who Is It For? The book assumes a reasonable understanding of programming . Client 19 8 12 .4 Server Startup Code 203 12 .5 Server Classes 205 12 .6 Server Shutdown 213 12 .7 Accessing the Server 214 12 .8 Summary 214 13 Binary Types 217 13 .1 Symbian OS EXEs 217 13 .2 Symbian OS. 14 3 9 .12 Class CIdle 14 6 9 .13 Class CPeriodic 14 8 9 .14 Common Mistakes 14 9 9 .15 Summary 15 0 10 Symbian OS Threads and Processes 15 1 10 .1 Class RThread 15 2 10 .2 Thread Priorities 15 5 10 .3 Stopping a. Requests Differ? 17 9 11 .6 How Is a Server Started? 17 9 11 .7 How Many Connections Can a Client Have? 18 0 11 .8 What Happens When a Client Disconnects? 18 0 11 .9 What Happens If a Client Dies? 18 1 11 .10 What

Ngày đăng: 14/08/2014, 12:20

Từ khóa liên quan

Mục lục

  • Symbian OS Explained

    • Cover

    • Contents

    • 1 Class Name Conventions on Symbian OS

      • 1.1 Fundamental Types

      • 1.2 T Classes

      • 1.3 C Classes

      • 1.4 R Classes

      • 1.5 M Classes

      • 1.6 Static Classes

      • 1.7 Buyer Beware

      • Team-kB

Tài liệu cùng người dùng

Tài liệu liên quan