找回密码
 注册
搜索
查看: 2124|回复: 6

[讨论] Nokia主推的手机操作系统的好书:《Symbian OS Explained Effective C++ Programm

[复制链接]
发表于 2006-1-4 07:48:00 | 显示全部楼层 |阅读模式
【文件名】:0614@52RD_Symbian OS Explained Effective C++ Programming for Smartphones.pdf
【简 介】:This book explains the key features of Symbian OS and will help you to write effective C++ code. It focuses on aspects of good C++ style that apply particularly to Symbian OS.
21 items are used to target particular aspects of the operating system and provide a simple and straightforward exploration of coding fundamentals. Using example code and descriptions of best practice to deconstruct Symbian OS, the items guide you to what you should and should not do (and why), pointing out commonly-made mistakes along the way.
Technologies covered include:
client-server architecture
descriptors and dynamic containers
active objects, threads and processes
leaves, cleanup stack and 2-phase construction
thin templates, good API design, memory optimization, debug and test macros
the ECOM plug-in framework
Symbian OS Explained can be read cover-to-cover or dipped into as a reference that will improve your code style when programming with Symbian OS.

【目 录】:Foreword xi
About This Book xiii
Who Is It For? xiv
How to Use This Book xiv
Notation and Code Conventions Used in This Book xv
Introduction to Symbian OS xvii
Author Biography xxi
Author’s Acknowledgments xxiii
Symbian Press Acknowledgments xxv
1 Class Name Conventions on Symbian OS 1
1.1 Fundamental Types 1
1.2 T Classes 3
1.3 C Classes 4
1.4 R Classes 6
1.5 M Classes 7
1.6 Static Classes 11
1.7 Buyer Beware 11
1.8 Summary 12
2 Leaves: Symbian OS Exceptions 13
2.1 Leaving Functions 13
2.2 Heap Allocation Using new (ELeave) 16
2.3 Constructors and Destructors 17
vi CONTENTS
2.4 Working with Leaving Functions 18
2.5 Trapping a Leave Using TRAP and TRAPD 20
2.6 LeaveScan 26
2.7 Summary 27
3 The Cleanup Stack 29
3.1 Using the Cleanup Stack 31
3.2 How Does the Cleanup Stack Work? 35
3.3 Using the Cleanup Stack with Non-CBase Classes 38
3.4 Using TCleanupItem for Customized Cleanup 44
3.5 Portability 46
3.6 An Incidental Note on the Use of Casts 46
3.7 Summary 47
4 Two-Phase Construction 49
5 Descriptors: Symbian OS Strings 55
5.1 Non-Modifiable Descriptors 56
5.2 Modifiable Descriptors 58
5.3 Pointer Descriptors 60
5.4 Stack-Based Buffer Descriptors 63
5.5 Heap-Based Buffer Descriptors 65
5.6 Literal Descriptors 69
5.7 Summary 72
6 Good Descriptor Style 75
6.1 Descriptors as Parameters and Return Types 75
6.2 Common Descriptor Methods 78
6.3 The Use of HBufC Heap Descriptors 82
6.4 Externalizing and Internalizing Descriptors 84
6.5 The Overuse of TFileName 86
6.6 Useful Classes for Descriptor Manipulation 87
6.7 Summary 88
7 Dynamic Arrays and Buffers 91
7.1 CArrayX Classes 92
7.2 RArray<class T> and RPointerArray<class T> 97
7.3 Why Use RArray Instead of CArrayX? 102
7.4 Dynamic Descriptor Arrays 103
7.5 Fixed-Length Arrays 104
7.6 Dynamic Buffers 106
7.7 Summary 109
8 Event-Driven Multitasking Using Active Objects 111
8.1 Multitasking Basics 111
CONTENTS vii
8.2 Event-Driven Multitasking 112
8.3 Working with Active Objects 115
8.4 Example Code 120
8.5 Threads Without an Active Scheduler 123
8.6 Application Code and Active Objects 123
8.7 Summary 124
9 Active Objects under the Hood 127
9.1 Active Object Basics 128
9.2 Responsibilities of an Active Object 131
9.3 Responsibilities of an Asynchronous Service Provider 133
9.4 Responsibilities of the Active Scheduler 134
9.5 Starting the Active Scheduler 135
9.6 Nesting the Active Scheduler 135
9.7 Extending the Active Scheduler 136
9.8 Cancellation 137
9.9 Request Completion 138
9.10 State Machines 138
9.11 Long-Running Tasks 143
9.12 Class CIdle 146
9.13 Class CPeriodic 148
9.14 Common Mistakes 149
9.15 Summary 150
10 Symbian OS Threads and Processes 151
10.1 Class RThread 152
10.2 Thread Priorities 155
10.3 Stopping a Running Thread 157
10.4 Inter-Thread Data Transfer 162
10.5 Exception Handling 163
10.6 Processes 164
10.7 Summary 166
11 The Client–Server Framework in Theory 167
11.1 Why Have a Client–Server Framework? 168
11.2 How Do the Client and Server Fit Together? 168
11.3 How Do the Client and Server Communicate? 170
11.4 What Classes Does the Client–Server Framework Use? 170
11.5 How Do Synchronous and Asynchronous Requests
Differ? 179
11.6 How Is a Server Started? 179
11.7 How Many Connections Can a Client Have? 180
11.8 What Happens When a Client Disconnects? 180
11.9 What Happens If a Client Dies? 181
11.10 What Happens If a Server Dies? 181
viii CONTENTS
11.11 How Does Client–Server Communication Use Threads? 181
11.12 What Are the Implications of Server-Side Active
Objects? 182
11.13 What Are the Advantages of a Local (Same-Process)
Server? 182
11.14 What Are the Overheads of Client–Server
Communication? 183
11.15 How Many Outstanding Requests Can a Client Make to
a Server? 186
11.16 Can Server Functionality Be Extended? 186
11.17 Example Code 186
11.18 Summary 187
12 The Client–Server Framework in Practice 189
12.1 Client–Server Request Codes 190
12.2 Client Boilerplate Code 191
12.3 Starting the Server and Connecting to It from the Client 198
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 DLLs 218
13.3 Writable Static Data 220
13.4 Thread-Local Storage 223
13.5 The DLL Loader 226
13.6 UIDs 226
13.7 The targettype Specifier 228
13.8 Summary 230
14 ECOM 233
14.1 ECOM Architecture 233
14.2 Features of an ECOM Interface 236
14.3 Factory Methods 237
14.4 Implementing an ECOM Interface 240
14.5 Resource Files 242
14.6 Example Client Code 245
14.7 Summary 246
15 Panics 247
15.1 Just-In-Time Debugging 248
15.2 Good Panic Style 249
CONTENTS ix
15.3 Symbian OS Panic Categories 250
15.4 Panicking Another Thread 251
15.5 Faults, Leaves and Panics 253
15.6 Summary 253
16 Bug Detection Using Assertions 255
16.1 __ASSERT_DEBUG 256
16.2 __ASSERT_ALWAYS 261
16.3 Summary 263
17 Debug Macros and Test Classes 265
17.1 Heap-Checking Macros 265
17.2 Object Invariance Macros 270
17.3 Console Tests Using RTest 273
17.4 Summary 276
18 Compatibility 277
18.1 Forward and Backward Compatibility 278
18.2 Source Compatibility 279
18.3 Binary Compatibility 280
18.4 Preventing Compatibility Breaks 281
18.5 What Can I Change Without Breaking Binary
Compatibility? 287
18.6 Best Practice: Planning for Future Changes 289
18.7 Compatibility and the Symbian OS Class Types 291
18.8 Summary 292
19 Thin Templates 293
20 Expose a Comprehensive and
Comprehensible API 299
20.1 Class Layout 300
20.2 IMPORT_C and EXPORT_C 301
20.3 Parameters and Return Values 303
20.4 Member Data and Functional Abstraction 309
20.5 Choosing Class, Method and Parameter Names 312
20.6 Compiler-Generated Functions 314
20.7 Summary 315
21 Good Code Style 317
21.1 Reduce the Size of Program Code 317
21.2 Use Heap Memory Carefully 320
21.3 Use Stack Memory Carefully 325
21.4 Eliminate Sub-Expressions to Maximize Code
Efficiency 328
x CONTENTS
21.5 Optimize Late 330
21.6 Summary 331
Appendix Code Checklist 333
Glossary 339
Bibliography and Online Resources 347
Index 351
【格 式】:pdf
【大 小】:2618K


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
发表于 2006-11-2 09:38:00 | 显示全部楼层
[em11]
点评回复

使用道具 举报

发表于 2007-6-22 13:01:00 | 显示全部楼层
meiyouqianle,za ban?
点评回复

使用道具 举报

发表于 2007-7-13 11:33:00 | 显示全部楼层
还要钱的
点评回复

使用道具 举报

发表于 2007-11-13 15:49:00 | 显示全部楼层
需要RD币啊?[em01][em01]
点评回复

使用道具 举报

发表于 2007-12-21 11:23:00 | 显示全部楼层
啊啊啊....米钱啊
点评回复

使用道具 举报

发表于 2008-10-13 19:51:00 | 显示全部楼层
下了,只能说一般!
点评回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-11-25 20:16 , Processed in 0.050390 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表