tailieunhanh - Symbian OS Explained Effective C++ Programming for Smartphones phần 2

Bất cứ khi nào bạn đi qua một lớp mới, trị giá so sánh nó với các quy tắc trên để xem nếu nó phù hợp với và, nếu không, xem xét lý do tại sao nó không. Bạn sẽ có thể để thêm một tập hợp các trường hợp ngoại lệ tốt để các quy tắc vào danh sách của bạn | Simpo PDF Merge and SplitUnregisterecE Version -http are classes in Symbian OS code itself which do not fit the ideals I ve put to you above. There are a few classes in Symbian OS which don t even conform to the naming conventions. Two well-documented exceptions are the kernel-side driver classes and the heap descriptor HBufC which is discussed further in Chapter 5. This doesn t mean that the code is wrong - in many cases there are good reasons why they do not fit the theory. In the lower-level code in particular you ll find cases which may have been written before the name conventions were fully established or which for efficiency reasons have different characteristics and behavior. Whenever you come across a new class it s worth comparing it to the rules above to see if it fits and if not considering why it doesn t. You ll be able to add a set of good exceptions to the rules to your list of cunning Symbian OS tricks while discarding any code that unnecessarily contravenes the conventions - thus learning from others mistakes. Summary This chapter reviewed the major class types used when coding for Symbian OS and described their main features such as any special requirements when constructing or destroying objects of the class whether they can be stack- or heap-based and typical member data contained by the class if any . In particular the chapter discussed the use of the class name conventions to indicate the cleanup characteristics of objects of the class in the event of a leave. The guidelines within this chapter should be useful when writing a class - they can help you save time when coding and testing it if only by cutting down on the rewrite time. If you can stick as closely as possible to Symbian OS conventions your clients will know how you mean your class to be constructed used and destroyed. This naturally benefits them but can also help you reduce documentation and support-time further down the track. Simpo PDF Merge and Split .

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.