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

và bộ nhớ nó chiếm được trả lại cho heap. NewL () và NewLC () chức năng có thể, tất nhiên, các thông số để khởi tạo đối tượng. Đây có thể được thông qua để các nhà xây dựng đơn giản trong giai đoạn đầu ConstructL giai đoạn II () chức năng, hoặc cả hai. Nếu lớp học của bạn xuất phát từ một cơ sở | Simpo PDF Merge and Split UnregisteredsVersion- http It looks complex but I ll explain how it all fits together throughout this chapter and you ll probably want to refer back to it later. The following list summarizes the responsibilities of an active object As I described in Chapter 8 the priority of an active object must be set on construction. The priority generally defaults to EPriorityStandard 0 from class CActive or EActivePriorityDefault 0 if using the TActivePriority enumeration defined in for use with application code . This is the standard priority for an active object and should be used unless there is a good reason to set its priority to some other value for example to EActivePriority-WsEvents 100 for handling user input responsively. An active object provides at least one method for clients to initiate requests to its encapsulated asynchronous service provider. The active object always passes its own iStatus object to the asynchronous function so does not need to include a TRequestStatus reference among the parameters to the request issuer method unless it is acting as a secondary provider of asynchronous services. After submitting a request to an asynchronous service provider the active object must call SetActive upon itself. This sets the iActive flag which indicates an outstanding request. This flag is used by the active scheduler upon receipt of an event and by the base class upon destruction to determine whether the active object can be removed from the active scheduler. An active object should only submit one asynchronous request at a time. The active scheduler has no way of managing event-handling for multiple requests associated with one active object. An active object should pass its iStatus object to an asynchronous service function. It should not reuse that object until the asynchronous function has completed and been handled. The active scheduler inspects the TRequestStatus of each active object to determine its .

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.