- 博客(0)
- 资源 (3)
- 收藏
- 关注
advanced_RArray.pdf
This document covers intermediate and advanced usage of the RArray classes. It gives explanations and examples for some of the most frequently asked questions and encountered problems that have appeared on the Symbian forums.
On embedded systems, understanding arrays is critical to getting the best performance and smallest memory footprint out of applications, and hence to improving the user experience.
RArray and its companion RPointerArray provide the fastest and most efficient way to safely access arrays of structures and objects on Symbian OS. They offer range checking, type safety, and reliable pre-built functions to assist in sorting, searching, and modifying items, whilst at the same time offering superior performance and usability over generic implementations or legacy APIs.
Starting from Symbian OS v9, RArray has been upgraded to make it safer for resource management by leaving if functions fail, adding support so that it can be used in the kernel, and adding functions to reserve memory.
As the RArray classes are highly optimized to use the ARM processor, the items need to be 32-bits wide to make the best use of the processor. Even if the object is less than four bytes it will still consume four bytes. One and two byte arrays should be handled using the descriptor classes (such as TPtr and TDes) as these are more amenable to working with byte and word type structures.
The RArray classes have been designed to look and behave as any Symbian C++ ‘R’ class would. They provide excellent examples of the design and application of coding standards in Symbian C++. More on Symbian C++ coding standards can be found in the booklets available to download at the end of this article.
2010-03-01
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人