═══ 1. Application Control Classes ═══ Provide support for the application, threads, timers, profiles, and the resources used by the applications you develop. ═══ 1.1. Class Hierarchy ═══ IBase ├─ICritSec ├─IHandle │ ├─IContextHandle │ ├─IProcessId │ ├─IProfileHandle │ ├─ISemaphoreHandle │ └─IThreadId ├─IProcedureAddress ├─IResourceId └─IVBase ├─IApplication │ └─ICurrentApplication ├─IClipboard ├─IClipboard::Cursor ├─IHandler │ └─IClipboardHandler ├─IProfile::Cursor ├─IProfile ├─IRefCounted │ ├─IThreadFn │ │ └─IThreadMemberFn │ └─ITimerFn │ ├─ITimerMemberFn │ └─ITimerMemberFn0 ├─IResource │ ├─IPrivateResource │ └─ISharedResource ├─IResourceLibrary │ └─IDynamicLinkLibrary ├─IResourceLock ├─IThread │ └─ICurrentThread ├─IThread::Cursor ├─ITimer └─ITimer::Cursor ═══ 1.2. IApplication ═══ Description Derivation Public Functions Protected Functions Protected Data Nested Types To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - IApplication ═══ IBase │ IVBase │ IApplication Inherited by: ICurrentApplication ═══ Class Description - IApplication ═══ iapp.hpp The IApplication class represents processes. The User Interface Class Library only supports the currently executing application, the single object of the derived class ICurrentApplication. IApplication::current provides access to that object. This class maintains a static pointer to the C++ object representing the currently executing application. It does so to implement the static member function current, which returns a reference to the ICurrentApplication object. The set of functions that you can apply to the current application is different from the set of functions you can apply to other applications. ICurrentApplication defines these functions. ═══ Public Functions - IApplication ═══ Diagnostics asDebugInfo asString Priority adjustPriority setPriority Process Information current currentPID id Inherited Members IVBase asDebugInfo asString IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ IApplication - Constructors ═══ The constructors and destructor for this class are protected. You must derive from this class if you want to use it to represent an application. ═══ IApplication - Diagnostics ═══ Use these members for diagnostic purposes. They return an IString representation of an object of this class. ═══ IApplication - Priority ═══ Use these members to control the priority of the application (and its threads). Note: While you can set priorities using this class, only threads actually have a priority. As a result, you need to use functions of the IThread class to query the priority of an application's threads. ═══ IApplication - Process Information ═══ Use these members to get additional information about a process, such as the process identifier, or to access the object for the current process. ═══ IApplication - Setting Process Information ═══ Use these members to set the information on a process, such as the process identifier of this object. ═══ Protected Functions - IApplication ═══ Constructors IApplication ~IApplication Setting Process Information setId ═══ Protected Data - IApplication ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.2.1. IApplication::adjustPriority ═══ Adjusts the priority level of all of the application's threads by some amount. An optional flag specifies whether the library also modifies the priority of descendent processes. public: virtual IApplication& adjustPriority( long adjustment, Boolean setDescendents = false); adjustment Long value that represents the adjustment delta. This value must be in the range of -31 to 31. setDescendents Boolean that determines whether the library also modifies the priority of descendent processes. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Motif: This member function calls IThread::adjustPriority for the current (and only) thread. The AIX release of the User Interface Class Library does not support multiple threads or thread priorities; thus, IThread::adjustPriority and IApplication::adjustPriority have no effect. Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The priority was not adjusted. The │ │ │adjustment delta must be in the range of│ │ │-31 to 31. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.2.2. IApplication::asDebugInfo ═══ Returns a representation of the application as debug information. The representation is returned as an IString with the following contents: IApplication(IVBase(@addr),id=pid) This represents the following: addr The address of the object (in hexadecimal). pid The process ID (in hexadecimal). public: virtual IString asDebugInfo() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.2.3. IApplication::asString ═══ Returns the string "IApplication(process identifier value)". public: virtual IString asString() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.2.4. IApplication::current ═══ Returns a reference to the current application, which is an object of the class ICurrentApplication. public: static ICurrentApplication& current(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Used in samples: Hello World Sample - Version 1: ahellow1.cpp Hello World Sample - Version 2: ahellow2.cpp Hello World Sample - Version 3: ahellow3.cpp Hello World Sample - Version 4: ahellow4.cpp Hello World Sample - Version 5: ahellow5.cpp ═══ 1.2.5. IApplication::currentPID ═══ Returns the current process identifier value. public: static IProcessId currentPID(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.2.6. IApplication::IApplication ═══ You can only construct objects of this class with the process identifier for the process that the object will represent. protected: IApplication(const IProcessId& id); id Reference to the process identifier for the process that the object will represent. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.2.7. IApplication::id ═══ Returns this object's process identifier value. public: virtual IProcessId id() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.2.8. IApplication::setId ═══ Sets this object's process identifier. You call this function in your derived class when you start a process in order to save the process identifier for this object. protected: virtual IApplication& setId(const IProcessId& id); id Reference to the process identifier to save. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.2.9. IApplication::setPriority ═══ Sets the priority class and level of all of the application's threads to the specified value. An optional flag specifies whether the library also modifies the priority of descendent processes. public: virtual IApplication& setPriority( PriorityClass priorityClass, long priorityLevel = 0, Boolean setDescendents = false); priorityClass Enumeration that identifies the priority class to set. priorityLevel Long value that represents the new priority level of all the application's threads for the priority class. This value must be in the range of -31 to 31. setDescendents Boolean that determines whether the library also modifies the priority of descendent processes. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Motif: This member function calls IThread::setPriority for the current (and only) thread. The AIX release of the User Interface Class Library does not support multiple threads or thread priorities; thus, IThread::setPriority and IApplication::setPriority have no effect. Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The priority was not set. The priority │ │ │level may be invalid. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.2.10. IApplication::~IApplication ═══ protected: virtual ~IApplication(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ Nested Types - IApplication ═══ Enumerations PriorityClass ═══ Enums - PriorityClass ═══ enum PriorityClass { noChange, idleTime, regular, timeCritical, foregroundServer }; These enumerators specify one of the priority classes, such as when using setPriority: noChange Specifies no change to the thread priority. idleTime Specifies the lowest priority. This priority only gets processing time when there is no other work to do. regular Specifies the default priority. Most threads belong to this class. timeCritical Specifies the highest priority. Use this priority when response time is critical. foregroundServer Specifies that a program running on a server takes precedence over other processes on the server. Presentation Manager Information For additional information, see the OS/2 2.1 Technical Library Programming Guide Volume I. Motif InformationThe library provides this enumeration for portability purposes only. The AIX release of the User Interface Class Library does not support priority adjustment. ═══ 1.3. IClipboard ═══ Description Derivation Constructors Public Functions Protected Functions Public Data Protected Data Nested Types Public Data includes Styles and Notification IDs if they exist. To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - IClipboard ═══ IBase │ IVBase │ IClipboard Inherited by none. ═══ Class Description - IClipboard ═══ iclipbrd.hpp The IClipboard class provides support for writing data to and reading data from the system clipboard. While you can only store a single item of data in the clipboard, you can store this item in multiple formats. IClipboard predefines several system clipboard formats. In addition, any application can create and register additional private formats. Before you can write any data to, or read any data from, the clipboard, you first open it. Only a single application at a time can open the clipboard. If an application tries to open the clipboard but another application already has it open, it waits until the clipboard is available. Therefore, the default behavior of the clipboard classes minimizes the time the clipboard is open. If you use the default behavior of IClipboard, the clipboard functions that require an open clipboard, will open it when needed and close it when finished. You turn off the default behavior of IClipboard when you explicitly open the clipboard by calling IClipboard::open. If you open the clipboard in this manner, IClipboard functions will not close the clipboard. If you explicitly open the clipboard, close the clipboard by calling IClipboard::close . You can turn off the default behavior of IClipboard to place several different formats of your data on the clipboard without opening and closing it to write each format. All clipboard operations must be associated with a window. You provide this window on the IClipboard constructor. If necessary, IClipboard makes this window the owner of the clipboard. The clipboard owner is the window responsible for the data put on the clipboard. It is also the window that the operating system sends messages to for events relating to the clipboard. The IClipboard object establishes this window as the system clipboard owner when you call IClipboard::empty. If you call IClipboard::owner before calling empty, your window will not be returned because it is not yet the system clipboard owner. You process clipboard events by creating and attaching an IClipboardHandler object to your clipboard owner window. In particular, if you use delayed rendering, you must attach an IClipboardHandler object to your clipboard's window (the owner window). The window dispatcher calls this handler when a request is made to the clipboard for data that has not been placed there yet. Because the clipboard should only be kept open for a short time, create IClipboard objects as temporary objects with a short lifetime. This helps ensure that the clipboard is only open for the time necessary. The IClipboard destructor always closes the clipboard if it is still open. ═══ Public Functions - IClipboard ═══ Clipboard Data Transfer bitmap data hasBitmap hasData hasText setBitmap setData setHandle setText text Clipboard Formats format formatAsHandle formatCount primaryFormat registerFormat Clipboard Ownership owner Clipboard Setup close empty isOpen open Constructors IClipboard ~IClipboard Inherited Members IVBase asDebugInfo asString IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ IClipboard - Clipboard Data Transfer ═══ These members move data to and from the clipboard. You can request delayed rendering of data by calling setText, setBitmap, setHandle, or setData with a 0 data pointer or handle. For delayed rendering, create an IClipboard handler and attach it to the clipboard owner window to process requests to render the data when it is needed. Use delayed rendering when you have complex data formats or multiple data formats. It allows you to postpone moving the data to the clipboard until it is needed. These members open the clipboard as needed and close it after transferring data, unless you have explicitly opened the clipboard by calling open. ═══ IClipboard - Clipboard Formats ═══ Use these members to register and query the clipboard formats. Register all private clipboard formats before using them. ═══ IClipboard - Clipboard Ownership ═══ The clipboard owner is the window responsible for the data on the clipboard. IClipboard::empty establishes the window you provided on the IClipboard constructor as the clipboard owner. If you use delayed rendering, attach a handler to the clipboard owner window to process the delayed request to put the data on the clipboard. ═══ IClipboard - Clipboard Predefined Formats ═══ IClipboard provides a number of predefined clipboard formats that you can use for many standard data formats. You can use these formats without first registering them. You can also define additional clipboard formats by calling registerFormat. before using them. ═══ IClipboard - Clipboard Setup ═══ The clipboard setup members handle opening and closing the clipboard and clearing the initial contents of the clipboard. ═══ IClipboard - Constructors ═══ Use these members to construct and destruct clipboard objects. ═══ IClipboard - Hidden Members ═══ IClipboard does not support the copy or assignment of objects. ═══ Protected Functions - IClipboard ═══ Clipboard Ownership setOwner ═══ Public Data - IClipboard ═══ Clipboard Predefined Formats bitmapFormat displayBitmapFormat displayMetafileFormat displayTextFormat metafileFormat paletteFormat textFormat ═══ Protected Data - IClipboard ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.3.1. IClipboard::bitmap ═══ If data of the format IClipboard::bitmapFormat exists on the clipboard, this function creates a copy of the bitmap and returns its IBitmapHandle. An IInvalidRequest exception occurs if the format does not exist on the clipboard. You should call the function hasBitmap prior to calling this function to ensure that a bitmap exists on the clipboard. public: virtual IBitmapHandle bitmap(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.3.2. IClipboard::bitmapFormat ═══ Defines a bitmap format for data on the clipboard. public: static const char * const * const bitmapFormat; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Presentation Manager: This format is implemented by the OS/2 format SZFMT_BITMAP. ═══ 1.3.3. IClipboard::close ═══ Closes the clipboard. If you manually open the clipboard by calling open , you must also close the clipboard when you are finished transferring data. If you do not close the clipboard, other applications will wait indefinitely when they try to open the clipboard. public: virtual IClipboard& close(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The operating system request to close │ │ │the clipboard failed. See the text of │ │ │the exception for further information. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.3.4. IClipboard::data ═══ Returns a void* value. This value can either be a pointer or handle to the data returned from the clipboard. It is your responsibility to know the type of the value because it is based on the format of the data. This function always leaves the clipboard open. You must copy the data before closing the clipboard since you lose access to the data after you close the clipboard. public: virtual void* data(const char* format); format A valid clipboard format. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IInvalidRequest │No data of the requested format exists │ │ │on the clipboard. │ └────────────────────┴────────────────────────────────────────┘ Used in sample: Container Clipboard Sample: clipbrd.cpp ═══ 1.3.5. IClipboard::displayBitmapFormat ═══ Defines a bitmap representation of a private data format for clipboard data displayed in a Clipboard Viewer window. The data on the clipboard is identical to bitmapFormat. Support this format if you do not support any of the standard clipboard formats. public: static const char * const * const displayBitmapFormat; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Presentation Manager: This format is implemented by the OS/2 format SZFMT_DSPBITMAP. ═══ 1.3.6. IClipboard::displayMetafileFormat ═══ Defines a metafile representation of a private data format displayed in a Clipboard Viewer window. The data on the clipboard is identical to metafileFormat. Support this format if you do not support any of the standard clipboard formats. public: static const char * const * const displayMetafileFormat; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Presentation Manager: This format is implemented by the OS/2 format SZFMT_DSPMETAFILE. ═══ 1.3.7. IClipboard::displayTextFormat ═══ Defines a text representation of a private data format displayed in a Clipboard Viewer window. The data on the clipboard is identical to textFormat. Support this format if you do not support any of the standard clipboard formats. public: static const char * const * const displayTextFormat; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Presentation Manager: This format is implemented by the OS/2 format SZFMT_DSPTEXT. ═══ 1.3.8. IClipboard::empty ═══ Clears the clipboard of all formats of data and establishes the window provided on the constructor as the clipboard owner. This function opens the clipboard if it is not already open. It also closes it after use unless you have explicitly opened the clipboard by calling open. public: virtual IClipboard& empty(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The operating system request to empty │ │ │the clipboard failed. See the text of │ │ │the exception for further information. │ ├────────────────────┼────────────────────────────────────────┤ │IAccessError │The operating system request to │ │ │establish the owner of the clipboard │ │ │failed. │ └────────────────────┴────────────────────────────────────────┘ Used in sample: Container Clipboard Sample: clipbrd.cpp ═══ 1.3.9. IClipboard::format ═══ Returns the requested clipboard format. Use the returned format to query or set data on the clipboard. Overload 1 public: static IString format(const FormatHandle& handle); Returns the clipboard format of the format handle. handle The handle of a valid clipboard format. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IInvalidRequest │No data of the format handle exists on │ │ │the clipboard. Ensure that the handle is│ │ │valid. │ └────────────────────┴────────────────────────────────────────┘ Overload 2 public: static IString format(const Cursor& cursor); Returns the format of the data at the cursor location. cursor A valid clipboard cursor. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IInvalidParameter │The cursor is not valid. │ ├────────────────────┼────────────────────────────────────────┤ │IInvalidRequest │No data of the format indicated by the │ │ │cursor exists on the clipboard. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.3.10. IClipboard::formatAsHandle ═══ Returns a clipboard format as a handle. Use this handle to perform clipboard operations that are not supported by the IClipboard class. public: static FormatHandle formatAsHandle(const char* format); format A valid clipboard format. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IInvalidRequest │No data of the requested format exists │ │ │on the clipboard. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.3.11. IClipboard::formatCount ═══ Returns the number of clipboard formats in the clipboard. public: unsigned long formatCount() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.3.12. IClipboard::hasBitmap ═══ If the clipboard has data with the format IClipboard::bitmapFormat, returns true. public: virtual Boolean hasBitmap() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.3.13. IClipboard::hasData ═══ If the clipboard has data of the requested format, returns true. public: virtual Boolean hasData(const char* format) const; format A valid clipboard format. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Used in sample: Container Clipboard Sample: clipbrd.cpp ═══ 1.3.14. IClipboard::hasText ═══ If the clipboard has data with the format IClipboard::textFormat, returns true. public: virtual Boolean hasText() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.3.15. IClipboard::IClipboard ═══ Use these members to construct and destruct clipboard objects. public: IClipboard(const IWindowHandle& clipboardWindow); Creates clipboard objects. You can construct an IClipboard object by providing the window handle for the object to use for the owner of the clipboard. clipboardWindow A valid window handle used for clipboard data transfer. If you call empty , it will establish this window as the owner of the clipboard. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IInvalidParameter │The clipboard window handle is not │ │ │valid. │ └────────────────────┴────────────────────────────────────────┘ Used in sample: Container Clipboard Sample: clipbrd.cpp ═══ 1.3.16. IClipboard::isOpen ═══ Returns true if this IClipboard object has opened the clipboard. public: virtual Boolean isOpen() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.3.17. IClipboard::metafileFormat ═══ Defines a metafile format for data on the clipboard. public: static const char * const * const metafileFormat; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Presentation Manager: This format is implemented by the OS/2 format SZFMT_METAFILE. ═══ 1.3.18. IClipboard::open ═══ Opens the clipboard. This function prevents other threads or processes from changing or examining the contents of the clipboard. Therefore, only keep the clipboard open for the time needed to place data on or remove data from the clipboard. All IClipboard functions open the clipboard when needed. Unless you call this function to open the clipboard, they also close the clipboard when they are finished transferring data. Therefore, if you use this function to open the clipboard you must also explicitly close the clipboard by calling close. public: virtual IClipboard& open(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The operating system request to open the│ │ │clipboard failed. See the exception text│ │ │for further information about the │ │ │failure. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.3.19. IClipboard::owner ═══ Returns the current clipboard owner window. The owner of the clipboard is established when the clipboard is emptied. If you have provided a clipboard window on the IClipboard constructor but have not yet emptied the clipboard, this function does not return your owner window unless your owner window was already the clipboard owner. public: IWindowHandle owner() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.3.20. IClipboard::paletteFormat ═══ Defines a palette format for data on the clipboard. public: static const char * const * const paletteFormat; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Presentation Manager: This format is implemented by the OS/2 format SZFMT_PALETTE. ═══ 1.3.21. IClipboard::primaryFormat ═══ Returns the primary format of the data on the clipboard. The primary format is the first format you place on the clipboard after you call empty. An IInvalidRequest results if there is no data on the clipboard. public: static IString primaryFormat(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.3.22. IClipboard::registerFormat ═══ Registers privateFormat as a private format and returns its format handle. public: static FormatHandle registerFormat( const char* privateFormat); privateFormat The text string that identifies your private clipboard format. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The operating system request to register│ │ │the format failed. See the exception │ │ │text provided with the exception for │ │ │further details about the failure. │ └────────────────────┴────────────────────────────────────────┘ Used in sample: Container Clipboard Sample: clipbrd.cpp ═══ 1.3.23. IClipboard::setBitmap ═══ Copies the passed bitmap and places the handle on the clipboard with the format IClipboard::bitmapFormat. This function opens the clipboard if it is not already open. It also closes it after placing the bitmap on the clipboard unless you have explicitly opened the clipboard by calling open. public: virtual IClipboard& setBitmap(const IBitmapHandle& bitmap); bitmap The handle of a valid bitmap. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.3.24. IClipboard::setData ═══ Copies the passed data buffer and places it on the clipboard with the format specified. Register any private formats, before placing data of the indicated format on the clipboard by calling registerFormat . If the pointer to the data is 0, create an IClipboardHandler object to process requests to render the data. This function opens the clipboard if it is not already open. It also closes it after placing the data on the clipboard unless you have explicitly opened the clipboard by calling open. public: virtual IClipboard& setData( const char* format, const void* data, unsigned long dataLength); format A valid clipboard format. data A pointer to a buffer containing the data of the indicated format. dataLength The length of the buffer stored in the data argument. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The operating system request to acquire │ │ │shared storage failed. │ ├────────────────────┼────────────────────────────────────────┤ │IAccessError │The operating system request to put the │ │ │data on the clipboard failed. │ └────────────────────┴────────────────────────────────────────┘ Used in sample: Container Clipboard Sample: clipbrd.cpp ═══ 1.3.25. IClipboard::setHandle ═══ Makes handle shareable (so that it can be accessed by other processes), and places it on the clipboard. Use this function to copy bitmaps and metafiles to the clipboard. setBitmap uses this function to place the bitmap on the clipboard. This function opens the clipboard if it is not already open. It also closes it after placing the handle on the clipboard unless you have explicitly opened the clipboard by calling open. public: virtual IClipboard& setHandle( const char* format, unsigned long handle); format A valid clipboard format. handle A handle to the object identified by the format parameter. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The operating system request to place │ │ │the handle on the clipboard failed. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.3.26. IClipboard::setOwner ═══ Establishes the owner of the clipboard. The owner of the clipboard controls the data on the clipboard and is responsible for responding to clipboard messages to render clipboard data. empty calls this function to establish the clipboard window you provide on the IClipboard constructor as the clipboard owner. protected: virtual IClipboard& setOwner(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The operating system request to update │ │ │the owner window failed. See the │ │ │exception text for further details of │ │ │the failure. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.3.27. IClipboard::setText ═══ Copies text and places it on the clipboard with the format IClipboard::textFormat. This function opens the clipboard if it is not already open. It also closes it after placing the text on the clipboard unless you have explicitly opened the clipboard by calling open. public: virtual IClipboard& setText(const char* text); text A null-terminated character string. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Used in sample: Container Clipboard Sample: clipbrd.cpp ═══ 1.3.28. IClipboard::text ═══ Returns IClipboard::textFormat data as an IString object. If IClipboard::textFormat data exists on the clipboard, it returns the data as an IString object. An IInvalidRequest exception occurs if the format does not exist on the clipboard. Call hasText before calling this function to ensure that text exists on the clipboard. This function opens the clipboard if it is not already open. It also closes it after retrieving the text from the clipboard unless you have explicitly opened the clipboard by calling open. public: virtual IString text(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.3.29. IClipboard::textFormat ═══ Defines a text format for data on the clipboard. The data is an array of text characters with a terminating null character. public: static const char * const textFormat; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Presentation Manager: This format is implemented by the OS/2 format SZFMT_TEXT. ═══ 1.3.30. IClipboard::~IClipboard ═══ Calls close to close the clipboard if it is open. public: virtual ~IClipboard(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ Nested Types - IClipboard ═══ Classes IClipboard::Cursor Type Definitions FormatHandle ═══ Type Definition - IClipboard::FormatHandle ═══ typedef unsigned long FormatHandle; A FormatHandle is a unique number (typically an atom) used by the operating system to identify a clipboard format. ═══ 1.4. IClipboard::Cursor ═══ Description Derivation Constructors Public Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - IClipboard::Cursor ═══ IBase │ IVBase │ IClipboard::Cursor Inherited by none. ═══ Class Description - IClipboard::Cursor ═══ iclipbrd.hpp The IClipboard::Cursor class is a nested cursor class used to iterate through the available formats of data in the clipboard. Unlike many other cursor classes, IClipboard::Cursor only supports movement in a forward direction. When you use a cursor loop like the one in the following example, the clipboard formats are returned in the same order that they were added. // Iterate over clipboard formats... IClipboard clipboard(mleHandle); IClipboard::Cursor(clipboard); for ( cursor.setToFirst(); cursor.isValid(); cursor.setToNext() ) { // Do something with each format cout << "The format is: " << clipboard.format(cursor); } ═══ Public Functions - IClipboard::Cursor ═══ Constructors Cursor ~Cursor Cursor Movement setToFirst setToNext Cursor Validation invalidate isValid Inherited Members IVBase asDebugInfo asString IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ IClipboard::Cursor - Constructors ═══ You can construct objects of this class from a reference to the window whose child windows are iterated. You can also destruct objects of this class. ═══ IClipboard::Cursor - Cursor Movement ═══ You use the cursor movement members to position the clipboard cursor. ═══ IClipboard::Cursor - Cursor Validation ═══ You use the cursor validation members to determine if the clipboard cursor is valid or to indicate that it is no longer valid. ═══ IClipboard::Cursor - Hidden Members ═══ The IClipboard::Cursor class does not support copying or assigning clipboard cursors. ═══ Protected Data - IClipboard::Cursor ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.4.1. IClipboard::Cursor::Cursor ═══ You can construct objects of this class from a reference to an IClipboard object. public: Cursor(IClipboard& clipboard); clipboard Reference to a clipboard object. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.4.2. IClipboard::Cursor::invalidate ═══ Puts the cursor in an invalid state. public: virtual void invalidate(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.4.3. IClipboard::Cursor::isValid ═══ If the cursor is valid, returns true. public: virtual Boolean isValid() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.4.4. IClipboard::Cursor::setToFirst ═══ Positions the cursor on the first format in the clipboard. public: virtual Boolean setToFirst(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.4.5. IClipboard::Cursor::setToNext ═══ Positions the cursor on the next format in the clipboard. If you call setToNext before calling setToFirst, it positions the cursor on the first format in the clipboard. public: virtual Boolean setToNext(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.4.6. IClipboard::Cursor::~Cursor ═══ public: virtual ~Cursor(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.5. IClipboardHandler ═══ Description Derivation Constructors Public Functions Protected Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - IClipboardHandler ═══ IBase │ IVBase │ IHandler │ IClipboardHandler Inherited by none. ═══ Class Description - IClipboardHandler ═══ icliphdr.hpp The IClipboardHandler class processes the events that the clipboard sends to its owner. This includes requests to render clipboard data for formats that were put on the clipboard with delayed rendering. The handler processes these events by creating an IEvent object and routing it to the appropriate virtual function. The virtual function allows you to supply your own specialized processing of the event. The return values from the virtual function specify whether the clipboard event is passed on to another handler object to be processed, as follows: Value Meaning true The IEvent has been handled and requires no additional processing. false The IEvent is passed to the next handler, as follows:  If there is another handler for the window, the event is passed on to the next handler.  If this is the last handler for the window, the event is passed on a call to the window's defaultProcedure function. ═══ Public Functions - IClipboardHandler ═══ Constructors IClipboardHandler ~IClipboardHandler Inherited Members IHandler asDebugInfo asString disable enable handleEventsFor isEnabled stopHandlingEventsFor IVBase asDebugInfo asString IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ IClipboardHandler - Constructors ═══ Use these members to construct and destruct clipboard handler objects. ═══ IClipboardHandler - Event Dispatching ═══ Event dispatching members evaluate the event to determine if it is appropriate for this handler object to process. If it is, the member calls the virtual function used to process the event. ═══ IClipboardHandler - Event Processing ═══ These members are pure virtual functions that derived classes must implement. There is no default behavior for these functions. ═══ Protected Functions - IClipboardHandler ═══ Event Dispatching dispatchHandlerEvent Event Processing clipboardEmptied renderAllFormats renderFormat Inherited Members IHandler defaultProcedure dispatchHandlerEvent ═══ Protected Data - IClipboardHandler ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.5.1. IClipboardHandler::clipboardEmptied ═══ Called when the current clipboard owner needs to clean up data in the clipboard because another application window has requested ownership by clearing the data in the clipboard. protected: virtual Boolean clipboardEmptied(IEvent& event) = 0; event Reference to an event object. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.5.2. IClipboardHandler::dispatchHandlerEvent ═══ Calls the appropriate virtual function to process clipboard events. protected: virtual Boolean dispatchHandlerEvent(IEvent& event); event Reference to an event object. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.5.3. IClipboardHandler::IClipboardHandler ═══ Creates IClipboardHandler objects. Construct objects of this class only by using the default constructor, which does not take any arguments. public: IClipboardHandler(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.5.4. IClipboardHandler::renderAllFormats ═══ Implemented by derived classes to render the data for all formats with delayed rendering. Place the data for all delayed formats into the clipboard with calls to setText, setBitmap, setMetafile, and setData. Note: Do not open the clipboard during the processing of this function as you can hang the system. You can put data on the clipboard during the processing of this function without explicitly opening the clipboard. protected: virtual Boolean renderAllFormats(IEvent& event) = 0; event Reference to an event object. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.5.5. IClipboardHandler::renderFormat ═══ Implemented by derived classes to render the data for a format with delayed rendering. Place data into the clipboard with setText, setBitmap, or setData. Note: Do not open the clipboard during the processing of this function as you can hang the system. You can put data on the clipboard during the processing of this function without explicitly opening the clipboard. protected: virtual Boolean renderFormat( IEvent& event, const IString& format) = 0; event Reference to an event object. format A valid clipboard format. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.5.6. IClipboardHandler::~IClipboardHandler ═══ public: virtual ~IClipboardHandler(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.6. IContextHandle ═══ Description Derivation Constructors Public Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - IContextHandle ═══ IBase │ IHandle │ IContextHandle Inherited by none. ═══ Class Description - IContextHandle ═══ ihandle.hpp Objects of the IContextHandle class access and manage the application context. Motif Information IContextHandle is an alias for the X Toolkit type XtAppContext. ═══ Public Functions - IContextHandle ═══ Constructors IContextHandle Operators operator _XtAppStruct * Inherited Members IHandle asDebugInfo asString asUnsigned operator Value IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ IContextHandle - Constructors ═══ You can construct objects of this class. ═══ IContextHandle - Operators ═══ This operator allows you to use IContextHandle where an XtAppContext structure is expected. ═══ Protected Data - IContextHandle ═══ Inherited Members IHandle handle IBase recoverable unrecoverable ═══ 1.6.1. IContextHandle::IContextHandle ═══ You can construct objects of this class from an XtAppContext (a value of type IHandle::Value), which defaults to 0. public: IContextHandle(_XtAppStruct* value = 0); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │No │Yes │ └────────────┴────────────┘ ═══ 1.6.2. IContextHandle::operator _XtAppStruct * ═══ Returns the IContextHandle value. public: operator _XtAppStruct *() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │No │Yes │ └────────────┴────────────┘ ═══ 1.7. ICritSec ═══ Description Derivation Constructors Public Functions Public Data Protected Data Public Data includes Styles and Notification IDs if they exist. To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - ICritSec ═══ IBase │ ICritSec Inherited by none. ═══ Class Description - ICritSec ═══ icritsec.hpp The ICritSec class isolates blocks of code you consider to be critical sections. Such blocks usually manipulate static data and need to do so without interruption from code that is executing in other threads. Objects of this class guarantee that no other thread in the current process executes between the object's construction and destruction. Typically, code that must execute without interruption by other threads is partitioned into a separate block, delimited by braces ({}). You create an object of this class within that block. Note: While the critical section is executing, avoid actions having the potential to interrupt it, such as system calls. If you must preserve locks beyond the scope of a critical section object, use semaphores as implemented by the class IResourceLock. Motif Information Use this class to temporarily block signals from the current process. The constructor sets the process signal mask to block all maskable signals except SIGTRAP. SIGTRAP is not masked to allow debug tracing through a critical section. The destructor restores the process signal mask to the value it had before creation of the object. Because signals are masked, some services might not operate correctly inside a critical section. An example of this is timer signals. If you attempt to lock an ISharedResource inside a critical section, any timeout you specify will be ineffective because the timer signal is masked. ═══ Public Functions - ICritSec ═══ Constructors ICritSec ~ICritSec Inherited Members IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ ICritSec - Constructors ═══ Use these members to construct and destruct objects of this class. The constructor and destructor implement all of the function of this class. The constructor causes a critical section to be entered. The corresponding destructor exits the critical section. ═══ ICritSec - Diagnostics ═══ Use these members for diagnostic purposes. They contain additional information on the critical section. ═══ ICritSec - Hidden Members ═══ You cannot access these members. ═══ Public Data - ICritSec ═══ Diagnostics count ═══ Protected Data - ICritSec ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.7.1. ICritSec::count ═══ Tracks the total number of critical sections entered but not yet exited. It is equivalent to the number of ICritSec objects in existence. public: static unsigned long count; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.7.2. ICritSec::ICritSec ═══ Use these members to construct and destruct objects of this class. The constructor and destructor implement all of the function of this class. The constructor causes a critical section to be entered. The corresponding destructor exits the critical section. public: ICritSec(); Creates a critical section object, and enters a critical section within the block of code where you create the object. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.7.3. ICritSec::~ICritSec ═══ Exits a critical section within the block of code where you create the critical section object and deletes the object. public: ~ICritSec(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.8. ICurrentApplication ═══ Description Derivation Public Functions Protected Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - ICurrentApplication ═══ IBase │ IVBase │ IApplication │ ICurrentApplication Inherited by none. ═══ Class Description - ICurrentApplication ═══ iapp.hpp The ICurrentApplication class represents the program that is currently running. You are limited to a single object of this class. To obtain a reference to the object, use the static function IApplication::current. The object of this class contains information that the User Interface Class Library maintains for each running application. ═══ Public Functions - ICurrentApplication ═══ Arguments argc argv setArgs Diagnostics asDebugInfo Resource Libraries resourceLibrary setResourceLibrary setUserResourceLibrary userResourceLibrary Starting and Stopping exit run Inherited Members IApplication adjustPriority asDebugInfo asString current currentPID id setPriority IVBase asDebugInfo asString IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ ICurrentApplication - Arguments ═══ Use these members to access or set the program arguments that can be passed to a program when it is executed. ═══ ICurrentApplication - Constructors ═══ The constructors of this class are protected to ensure that the static function IApplication::current returns the correct reference to the only object of this class. Also, the destructor is protected. ═══ ICurrentApplication - Diagnostics ═══ Use these members for diagnostic purposes. They return an IString representation of an object of this class. ═══ ICurrentApplication - Process Information ═══ Use these members to access process information. ═══ ICurrentApplication - Resource Libraries ═══ Use these members to access the user's default application resource library and the User Interface Class Library resource library. ═══ ICurrentApplication - Starting and Stopping ═══ Use these members to start or stop the current process. ═══ Protected Functions - ICurrentApplication ═══ Constructors ICurrentApplication ~ICurrentApplication Process Information pib Inherited Members IApplication setId ═══ Protected Data - ICurrentApplication ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.8.1. ICurrentApplication::argc ═══ Obtains the number of application arguments. public: virtual int argc() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.8.2. ICurrentApplication::argv ═══ Obtains the specified argument that is passed to the application. public: virtual IString argv(int argumentNumber) const; argumentNumber Integer value that represents the specified argument. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.8.3. ICurrentApplication::asDebugInfo ═══ Use this function to return a diagnostic representation of the object. The information that is returned is  User Interface Class Library resource library name  User-defined resource library name  Number of arguments  Argument list public: virtual IString asDebugInfo() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Presentation Manager: A pointer to the process information block is also returned as an unsigned long value. ═══ 1.8.4. ICurrentApplication::exit ═══ Ends the current thread of execution. If the current thread is thread 1, the process is ended. public: virtual ICurrentApplication& exit(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.8.5. ICurrentApplication::ICurrentApplication ═══ You can only construct objects of this class with the default constructor, which does not require any arguments. protected: ICurrentApplication(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.8.6. ICurrentApplication::pib ═══ Returns a pointer to the current process' process information block. protected: struct pib_s& pib(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.8.7. ICurrentApplication::resourceLibrary ═══ Obtains a reference to the User Interface Class Library's resource library. Resources required by the base library code are loaded from this resource library. If ICurrentApplication::setResourceLibrary has been called with the name of a dynamic link library (DLL), the handle of this library is returned. Otherwise, the environment variable ICLUI RESLIB is checked for the name of a DLL, and its handle is returned. You can set the environment variable using the statement SET ICLUI RESLIB=myappdll from an operating system command line. public: virtual IResourceLibrary& resourceLibrary() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Presentation Manager: If you call ICurrentApplication::setResourceLibrary with the name of a dynamic link library (DLL), the handle of this library is returned. Otherwise, the library checks the environment variable ICLUI RESLIB for the name of a DLL, and its handle is returned. Set the environment variable by using the following: SET ICLUI RESLIB=myappdll If you have not set the environment variable, the default User Interface Class Library resource DLL, cppoor3u.dll, is used. ═══ 1.8.8. ICurrentApplication::run ═══ Starts the processing of events in the current process. public: virtual ICurrentApplication& run(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Used in samples: Hello World Sample - Version 1: ahellow1.cpp Hello World Sample - Version 2: ahellow2.cpp Hello World Sample - Version 3: ahellow3.cpp Hello World Sample - Version 4: ahellow4.cpp Hello World Sample - Version 5: ahellow5.cpp ═══ 1.8.9. ICurrentApplication::setArgs ═══ Sets the program arguments. Call this member function from your application's main function, passing its argc and argv argument values. public: virtual ICurrentApplication& setArgs( int argc, const char * const argv [ ]); argc Integer value that states the number of arguments. argv Pointer to an array of arguments. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.8.10. ICurrentApplication::setResourceLibrary ═══ Sets the resource library from which the User Interface Class Library's resources are loaded. You specify the resource library as the name of the dynamic link library (DLL) without the file extension. If you pass a 0 instead of a DLL name, the resources are loaded from the application's executable file. Note: When you rename the User Interface Class Library resource DLL, cppoor3u.dll, to ship with your application (per the licensing agreement), you should call this function to specify the new resource DLL name. public: virtual ICurrentApplication& setResourceLibrary( const char* resLibName); resLibName Pointer to the resource library name. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Presentation Manager: You must specify the resource library as the name of the dynamic link library without the file extension. If you specify 0, the application loads the resources from the application's executable file. Motif: The AIX environment uses the standard X resource database; therefore, this function has no effect. ═══ 1.8.11. ICurrentApplication::setUserResourceLibrary ═══ Sets the user resource library from which you obtain application resources. The default is the executable file. Note: You can use an argument of 0 for resLibName parameter to reset the user resource library to the executable file. public: virtual ICurrentApplication& setUserResourceLibrary( const char* resLibName); resLibName Pointer to the resource library name. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Presentation Manager: The default is IResourceId. If you specify 0 for resLibName, the application uses the executable file. Motif: The AIX environment uses the standard X resource database; therefore, this function has no effect. Used in sample: List Box Sample: alistbox.cpp ═══ 1.8.12. ICurrentApplication::userResourceLibrary ═══ Obtains a reference to the default user resource library for this application. The default is the executable file. If you do not explicitly specify a resource library, IResourceId uses this resource library. public: virtual IResourceLibrary& userResourceLibrary() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Used in samples: List Box Sample: alistbox.cpp Multi-Line Entry Field Sample: amle.cpp Container Sample: acnr.cpp Multi Cell Canvas Sample: amcelcv.cpp Lancelot - A Valiant Example: lmainwin.cpp ═══ 1.8.13. ICurrentApplication::~ICurrentApplication ═══ protected: virtual ~ICurrentApplication(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.9. ICurrentThread ═══ Description Derivation Public Functions Protected Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - ICurrentThread ═══ IBase │ IVBase │ IThread │ ICurrentThread Inherited by none. ═══ Class Description - ICurrentThread ═══ ithread.hpp The ICurrentThread class represents the current thread of execution. An object of this class contains information that the User Interface Class Library maintains for the current thread of execution. You are limited to a single object of this class. This class provides functions that you can only apply to the current thread of execution. To obtain a reference to the object, use the static function IThread::current. ═══ Public Functions - ICurrentThread ═══ Current Thread Information id Current Thread Support exit isTopLevelShell isXerrorCodeAvailable remainingStack sleep waitFor waitForAllThreads waitForAnyThread Graphical User Interface (GUI) Support anchorBlock appContext appShell initializeGUI isGUIInitialized messageQueue processMsgs terminateGUI Implementation setTopLevelShell setXerrorCode XerrorCode Suspending Threads suspend Inherited Members IThread adjustPriority asDebugInfo asString autoInitGUI current currentId defaultAutoInitGUI defaultQueueSize defaultStackSize id isStarted messageQueue priorityClass priorityLevel queueSize relatedHandlesList resume setAutoInitGUI setDefaultAutoInitGUI setDefaultQueueSize setDefaultStackSize setPriority setQueueSize setRelatedHandlesList setStackSize setVariable setWindowList stackSize start stop stopProcessingMsgs suspend variable windowList IVBase asDebugInfo asString IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ ICurrentThread - Constructors ═══ Use these protected constructors to construct objects of this class. ═══ ICurrentThread - Current Thread Information ═══ Use these members to access general information on the current thread. ═══ ICurrentThread - Current Thread Support ═══ Use these members to enable thread operations that only apply to the current thread. ═══ ICurrentThread - Graphical User Interface (GUI) Support ═══ Use these members to support GUI activities on the current thread. ═══ ICurrentThread - Hidden Members ═══ You cannot access these members. ═══ ICurrentThread - Implementation ═══ These members provide utilities used to implement this class. They are used by the User Interface Class Library. ═══ ICurrentThread - Obsolete Members ═══ Use these members to provide basic OS/2 Presentation Manager (PM) support for the current thread. Note: Please note that these members are obsolete, and have been replaced with new members due to portability requirements. These new members are described in the group, Graphical User Interface (GUI) Support We provide you with the name of the new member you should be using in the documentation for each of the members in this group. ═══ ICurrentThread - Suspending Threads ═══ Use these members to suspend your current thread of execution, if the thread is a non-GUI thread. Use IThread::resume to resume execution of the thread. ═══ Protected Functions - ICurrentThread ═══ Constructors ICurrentThread Implementation startedThread Inherited Members IThread newStartedThread operator = startedThread ═══ Protected Data - ICurrentThread ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.9.1. ICurrentThread::anchorBlock ═══ Obtains the anchor block handle for the current thread. If the anchor block handle is not initialized, 0 is returned. public: virtual IAnchorBlockHandle anchorBlock() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Used in sample: Hello World Sample - Version 6: atimehdr.cpp ═══ 1.9.2. ICurrentThread::appContext ═══ Obtains the application context handle for the current thread. If the application context handle is not initialized, 0 is returned. public: virtual IContextHandle appContext() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │No │Yes │ └────────────┴────────────┘ ═══ 1.9.3. ICurrentThread::appShell ═══ Obtains the application shell handle for the current thread. If the application shell handle is not initialized, 0 is returned. public: virtual IWindowHandle appShell() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │No │Yes │ └────────────┴────────────┘ ═══ 1.9.4. ICurrentThread::exit ═══ Ends the current thread with the specified return value. public: virtual void exit(unsigned long returnCode); returnCode Unsigned long value that specifies the return value for termination. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.9.5. ICurrentThread::ICurrentThread ═══ The constructor is protected to prevent the accidental creation of objects of this class. Creation of objects of this class is restricted to IThread::current. protected: ICurrentThread(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.9.6. ICurrentThread::id ═══ Obtains the current thread's identifier (ID). public: virtual IThreadId id() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Motif: The AIX release of the User Interface Class Library supports only one thread. Therefore, this function returns the value 1. Used in sample: Multi-Line Entry Field Sample: amle.cpp ═══ 1.9.7. ICurrentThread::initializeGUI ═══ Initializes the graphical user interface (GUI) environment on the current thread. public: virtual void initializeGUI(long queueSize = 30); queueSize Long value that represents the queue size for the GUI environment. The User Interface Class Library default queue size is 30. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Presentation Manager: Sets up a Presentation Manager environment (anchor block and message queue). Motif: Initializes the X library environment by calling XtAppInitialize to establish a connection to the display. This function also creates an application context and an initial application shell. Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The graphical user interface (GUI) was │ │ │not initialized. The window │ │ │initialization failed. │ ├────────────────────┼────────────────────────────────────────┤ │IAccessError │The graphical user interface (GUI) was │ │ │not initialized. The message queue │ │ │creation failed. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.9.8. ICurrentThread::isGUIInitialized ═══ Determines if the graphical user interface (GUI) environment is active for this thread. If the GUI is active, true is returned. public: virtual Boolean isGUIInitialized() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.9.9. ICurrentThread::isTopLevelShell ═══ Determines if the application shell window is completely initialized. If it is, true is returned. public: virtual Boolean isTopLevelShell() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │No │Yes │ └────────────┴────────────┘ ═══ 1.9.10. ICurrentThread::isXerrorCodeAvailable ═══ Determines if an X library error code is available for querying. If one is available, true is returned. This function uses XerrorCode to retrieve the error code, which resets this flag. public: virtual Boolean isXerrorCodeAvailable() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │No │Yes │ └────────────┴────────────┘ ═══ 1.9.11. ICurrentThread::messageQueue ═══ Obtains the message queue handle for the current thread. A 0 is returned if the handle is not initialized or is invalid. Overload 1 public: virtual IMessageQueueHandle messageQueue(); Use this version of the function if you want to reset an invalid message queue handle to 0. Do this if the handle is determined to be invalid. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Overload 2 public: virtual IMessageQueueHandle messageQueue() const; Use this version of the function if you want the invalid message queue handle to remain invalid. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.9.12. ICurrentThread::processMsgs ═══ Gets messages from the message queue and dispatches them to the appropriate handlers. public: virtual void processMsgs(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Presentation Manager: Messages are dispatched until the WM_QUIT message is received. Motif: ICurrentThread dispatches messages until it receives the client message WM_QUIT or the application is terminated through the Motif Window Manager. ═══ 1.9.13. ICurrentThread::remainingStack ═══ Obtains an approximation of the number of available bytes that remain on the stack. If the stack is not initialized, 0 is returned. public: virtual unsigned long remainingStack() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Ignored │ └────────────┴────────────┘ ═══ 1.9.14. ICurrentThread::setTopLevelShell ═══ Called when the application shell window has been initialized. The User Interface Class Library calls this function to prevent multiple initializations of the graphical user interface. Note: A user of the User Interface Class Library should never call this member function. public: virtual void setTopLevelShell() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │No │Yes │ └────────────┴────────────┘ ═══ 1.9.15. ICurrentThread::setXerrorCode ═══ Sets the error code that the last call to an X library function reported. Typically, you use this function to save the error code detected by the handler set by XSetErrorHandler in IThread. The error handler is set by IThread so that the error codes are maintained on a per thread basis. Note: A user of the User Interface Class Library should never call this member function. public: virtual void setXerrorCode(int errorCode); errorCode Integer value that specifies the error code to set. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │No │Yes │ └────────────┴────────────┘ ═══ 1.9.16. ICurrentThread::sleep ═══ Suspends the thread for a specified number of milliseconds. public: virtual ICurrentThread& sleep(unsigned long milliseconds); milliseconds Unsigned long value that specifies the number of milliseconds to sleep. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Motif: The granularity for sleeping on AIX is in seconds. The number of milliseconds is divided by 1000 to determine the number of seconds the process will sleep. If the number of milliseconds is less than 1 second, the process will not sleep. ═══ 1.9.17. ICurrentThread::startedThread ═══ Returns a pointer to the object of the IStartedThread class that corresponds to the current thread. protected: virtual IStartedThread* startedThread() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.9.18. ICurrentThread::suspend ═══ Suspends the current thread of execution only if the graphical user interface (GUI) is not initialized for the thread. Suspending a GUI-initialized thread causes your application to hang. public: virtual void suspend(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Ignored │ └────────────┴────────────┘ Motif: You cannot suspend or resume AIX threads because the AIX release of the User Interface Class Library has a single-thread limitation. Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IInvalidRequest │The current thread was not suspended. A│ │ │GUI thread cannot be suspended, or the │ │ │application will hang. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.9.19. ICurrentThread::terminateGUI ═══ Terminates the graphical user interface (GUI) environment. If you start a thread with IThread::autoInitGUI and the function returns true, this function is called automatically by the User Interface Class Library once IThreadFn::run completes. If you do the following, the User Interface Class Library does not call this function automatically, and it is your responsibility to do so:  Start the thread with IThread::autoInitGUI and the function returns false  Stop the thread using IThread::stop  Stop the thread using ICurrentThread::exit Note: If you do not call this function and it is your responsibility to do so, you can tie up system resources until your application ends. public: virtual void terminateGUI(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Presentation Manager: Before calling WinTerminate, the application must destroy all windows and the message queue. This function destroys the message queue, but it is still the application's responsibility to destroy (that is, delete) all of the window objects for the thread. If it does not, the return value of WinTerminate and any subsequent calls is indeterminate. ═══ 1.9.20. ICurrentThread::waitFor ═══ Allows the current thread to wait for a specified thread to end. public: virtual ICurrentThread& waitFor( const IThread& anotherThread); anotherThread Reference to an IThread object that represents the specified thread. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Ignored │ └────────────┴────────────┘ Motif: The AIX release of the User Interface Class Library supports a single-threaded environment; therefore, there are no other threads to wait for. This function immediately returns a reference to the ICurrentThread object. Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IInvalidParameter │The current thread did not wait for the │ │ │specified thread to end. The specified │ │ │thread is the current thread, which │ │ │cannot wait on itself. │ ├────────────────────┼────────────────────────────────────────┤ │IAccessError │The current thread did not wait for the │ │ │specified thread to end. The specified │ │ │thread may have been invalid or an │ │ │interrupt may have occurred. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.9.21. ICurrentThread::waitForAllThreads ═══ Allows the current thread to wait for all secondary threads to end. public: virtual ICurrentThread& waitForAllThreads(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Ignored │ └────────────┴────────────┘ Motif: The AIX release of the User Interface Class Library supports a single-threaded environment; therefore, there are no other threads to wait for. This function immediately returns a reference to the ICurrentThread object. Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IInvalidParameter │The current thread did not wait for all │ │ │secondary threads to end. The current │ │ │thread is not the primary thread. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.9.22. ICurrentThread::waitForAnyThread ═══ Allows the current thread to wait for the first termination to occur of any other threads in the current process. The terminated thread's identifier (ID) is returned. public: virtual IThreadId waitForAnyThread(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Ignored │ └────────────┴────────────┘ Motif: The AIX release of the User Interface Class Library supports a single-threaded environment; therefore, there are no other threads to wait for. This function immediately returns a reference to the ICurrentThread object. Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The current thread did not wait for the │ │ │next thread in the process to terminate.│ │ │No thread terminated or an interrupt may│ │ │have occurred. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.9.23. ICurrentThread::XerrorCode ═══ Returns the X library error code set by the member function ICurrentThread::setXerrorCode. You can retrieve the error code until a new X library error code is set by ICurrentThread::setXerrorCode, but the flag indicating that an error code is available is reset on the first invocation. The class IXLibErrorInfo uses this function to obtain information about the last X library error code detected. Note: A user of the User Interface Class Library should never call this member function. public: virtual int XerrorCode() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │No │Yes │ └────────────┴────────────┘ ═══ 1.10. IDynamicLinkLibrary ═══ Description Derivation Constructors Public Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - IDynamicLinkLibrary ═══ IBase │ IVBase │ IResourceLibrary │ IDynamicLinkLibrary Inherited by none. ═══ Class Description - IDynamicLinkLibrary ═══ ireslib.hpp The IDynamicLinkLibrary class supports the loading of resources from a dynamic link library (DLL). Motif Information The AIX release of the User Interface Class Library does not support this class. ═══ Public Functions - IDynamicLinkLibrary ═══ Constructors IDynamicLinkLibrary operator = ~IDynamicLinkLibrary Diagnostics asDebugInfo asString Dynamic Link Library Information fileName handle isOpen Opening and Closing close open Procedure Address Loading isEntryPoint32Bit procAddress Inherited Members IResourceLibrary asDebugInfo asString fileName handle isOpen loadAccelTable loadBitmap loadDialog loadHelpTable loadIcon loadMenu loadMessage loadPointer loadString operator = sizeBitmapTo tryToLoadBitmap tryToLoadIcon tryToLoadMessage tryToLoadString IVBase asDebugInfo asString IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ IDynamicLinkLibrary - Constructors ═══ Use these members to construct, copy, assign, and destruct objects of this class. You can construct objects of this class using either a dynamic link library name, module handle, or a reference to an existing object of this class. ═══ IDynamicLinkLibrary - Diagnostics ═══ Use these members for diagnostic purposes. They return an IString representation of an object of this class. ═══ IDynamicLinkLibrary - Dynamic Link Library Information ═══ Use these members to query general dynamic link library information. ═══ IDynamicLinkLibrary - Opening and Closing ═══ Use these members to open or close a dynamic link library (DLL). Note: DLL objects are reference-counted. When a DLL is opened, the reference count is incremented, and when it is closed, the reference count is decremented. When the reference count reaches 0, the DLL is unloaded from memory. ═══ IDynamicLinkLibrary - Procedure Address Loading ═══ Use these members to get a procedure address from a dynamic link library or to test the memory model of an entry point. ═══ Protected Data - IDynamicLinkLibrary ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.10.1. IDynamicLinkLibrary::asDebugInfo ═══ Provides textual information about the class object. It returns a string that contains the file name of the dynamic link library. public: virtual IString asDebugInfo() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.10.2. IDynamicLinkLibrary::asString ═══ Provides textual information about the class object. It returns a string that contains the file name of the dynamic link library. public: virtual IString asString() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.10.3. IDynamicLinkLibrary::close ═══ Closes a dynamic link library and decrements the reference count. public: virtual IDynamicLinkLibrary& close(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.10.4. IDynamicLinkLibrary::fileName ═══ Returns the fully qualified file name of the dynamic link library. public: virtual IString fileName() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The file name was not returned. The │ │ │module handle may be invalid. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.10.5. IDynamicLinkLibrary::handle ═══ Returns the module handle of the dynamic link library. public: virtual IModuleHandle handle() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.10.6. IDynamicLinkLibrary::IDynamicLinkLibrary ═══ Use these members to construct, copy, assign, and destruct objects of this class. You can construct objects of this class using either a dynamic link library name, module handle, or a reference to an existing object of this class. Overload 1 public: IDynamicLinkLibrary(const IModuleHandle& moduleHandle); moduleHandle Reference to a module handle of a DLL that has been loaded explicitly. Use this version of the constructor if you have an IModuleHandle obtained by loading the dynamic link library (DLL) explicitly. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The dynamic link library object was not │ │ │created. The module handle may be │ │ │invalid. │ └────────────────────┴────────────────────────────────────────┘ Overload 2 public: IDynamicLinkLibrary(const char* resourceFileName); resourceFileName Pointer to the dynamic link library name. Use this version of the constructor if you know the name of the dynamic link library (DLL). If you want to search the LIBPATH for the DLL, specify resourceFileName without the path or extension. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Overload 3 public: IDynamicLinkLibrary(const IDynamicLinkLibrary& dllLibrary); dllLibrary Reference to an existing dynamic link library object. Creates a dynamic link library object using a reference to an existing dynamic link library object. This is commonly know as a copy constructor. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.10.7. IDynamicLinkLibrary::isEntryPoint32Bit ═══ If the entry point is a 32-bit function, returns true. Overload 1 public: Boolean isEntryPoint32Bit( unsigned long procedureOrdinal) const; procedureOrdinal Unsigned long value that represents the procedure ordinal. Use this version of the function if you know the entry point's ordinal. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The entry point was not queried. The │ │ │procedure ordinal may be invalid. │ └────────────────────┴────────────────────────────────────────┘ Overload 2 public: Boolean isEntryPoint32Bit(const char* procedureName) const; procedureName Pointer to the procedure name. Use this version of the function if you know the entry point's name. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The entry point was not queried. The │ │ │procedure name may be invalid. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.10.8. IDynamicLinkLibrary::isOpen ═══ Returns true if the dynamic link library is open. public: virtual Boolean isOpen() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.10.9. IDynamicLinkLibrary::open ═══ Opens a dynamic link library and increments the reference count. public: virtual IDynamicLinkLibrary& open(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.10.10. IDynamicLinkLibrary::operator = ═══ Assigns the member data of an object of this class to another object of this class. public: IDynamicLinkLibrary& operator =( const IDynamicLinkLibrary& dllLibrary); dllLibrary Reference to an existing dynamic link library object. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.10.11. IDynamicLinkLibrary::procAddress ═══ Loads the specified procedure address from a dynamic link library. Overload 1 public: void* procAddress(unsigned long procedureOrdinal) const; procedureOrdinal Unsigned long value that represents the procedure ordinal. Use this version of the function if you know the procedure ordinal. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The procedure address was not loaded. │ │ │The procedure ordinal may be invalid. │ └────────────────────┴────────────────────────────────────────┘ Overload 2 public: void* procAddress(const char* procedureName) const; procedureName Pointer to the procedure name. Use this version of the function if you know the procedure name. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The procedure address was not loaded. │ │ │The procedure name may be invalid. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.10.12. IDynamicLinkLibrary::~IDynamicLinkLibrary ═══ The dynamic link library is unloaded from memory if it is no longer being referenced. public: virtual ~IDynamicLinkLibrary(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.11. IPrivateResource ═══ Description Derivation Constructors Public Functions Protected Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - IPrivateResource ═══ IBase │ IVBase │ IResource │ IPrivateResource Inherited by none. ═══ Class Description - IPrivateResource ═══ ireslock.hpp The IPrivateResource class defines a resource that is used within a single process. IResource, and its inherited classes represent resources in the user's problem domain. Objects of these classes name a particular resource. For example, a user wants to serialize access to the data in a window list collection. The user creates an IResource inherited class to represent the window list and then uses IResourceLock (preferred) or a function of IResource itself to lock and unlock the resource to serialize the access. You can use this class either alone (lock and unlock) or in combination with an IResourceLock, whose constructor locks the resource and whose destructor unlocks the resource. If you need the lock only for a block of code, use IResourceLock. Use static objects because you only need a single object of a particular IResource. The static object pointer discussions exist because there is no language-defined way to ensure that static objects are constructed when needed. Also, they are always constructed even if they are never needed. Combining a static pointer to an object with a static function to reference the object and then creating the object, if necessary, defers creating the object until it is needed. Use this class for resources that are limited to the same process (as opposed to a public resource that is used by more than one process via its name). You can use this class as a static key to serialize access to a private resource. You can also use this class as a mechanism to ensure that the static resource is constructed prior to being used. Some basic guidelines include the following:  Use a static pointer to the resource rather than a static object.  Always access the resource using a static function rather than accessing it directly with the static pointer.  When the resource is accessed through the static function, allocate it if the static pointer is 0.  Provide a new class that represents the static pointers for a particular class or component. This new class does not require a constructor, but it does require a destructor that destroys the static objects used by the component. ═══ Public Functions - IPrivateResource ═══ Constructors IPrivateResource ~IPrivateResource Inherited Members IResource lock unlock IVBase asDebugInfo asString IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ IPrivateResource - Constructors ═══ Use these members to construct and destruct objects of this class. ═══ IPrivateResource - Hidden Members ═══ You cannot access these functions. ═══ IPrivateResource - Resource Handle ═══ Use these members to obtain a handle to the private resource. ═══ Protected Functions - IPrivateResource ═══ Resource Handle handle Inherited Members IResource handle ═══ Protected Data - IPrivateResource ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.11.1. IPrivateResource::handle ═══ Returns the handle for the private resource. protected: ISemaphoreHandle& handle(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.11.2. IPrivateResource::IPrivateResource ═══ The only way to construct objects of this class is with this, the default constructor, which does not accept any parameters. public: IPrivateResource(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The private resource object was not │ │ │created. The memory may be exhausted or│ │ │the semaphore handle limit on your │ │ │platform may be exceeded. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.11.3. IPrivateResource::~IPrivateResource ═══ public: virtual ~IPrivateResource(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The private resource object was not │ │ │deleted. The semaphore handle may be │ │ │invalid. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.12. IProcedureAddress ═══ Description Derivation Constructors Public Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - IProcedureAddress ═══ IBase │ IProcedureAddress Inherited by none. ═══ Class Description - IProcedureAddress ═══ iprocadr.hpp The IProcedureAddress class is a wrapper for dynamic link library (DLL) entry points. This User Interface Class Library uses an operating system function to do a runtime link to the DLL, and it uses another operating system function to acquire the runtime address of a specified function in the DLL. When the link is established and the address is acquired, you can call code that was not accessible to the linker when the executable module was built. This class provides for the following:  Constructing objects from entry point names (or ordinal entry point numbers) and DLL objects (or DLL names)  Calling the entry point without having to cast the generic function type supported by the operating system function that is used to acquire the runtime address  Managing, along with DynamicLinkLibrary, the loading and freeing of the associated DLL module. Presentation Manager Information Customization (Template Argument) IProcedureAddress is a template class. Construct objects of this class with the following template argument: PtrToFnType Type of the entry point to load or call; this must be a pointer-to-function type. Motif Information AIX does not support this class or dynamic link libraries. ═══ Public Functions - IProcedureAddress ═══ Constructors IProcedureAddress ~IProcedureAddress Memory Model is32Bit Pointers to Functions operator PtrToFnType Inherited Members IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ IProcedureAddress - Constructors ═══ You must provide the following two pieces of information to construct objects of this template class:  The entry point. You can specify either an entry point name (const char *) or entry point ordinal (unsigned).  The dynamic link library (DLL) from which to load the entry point. You can specify the DLL either as a reference to an existing IDynamicLinkLibrary object or by the DLL name. You can also destruct objects of this class. ═══ IProcedureAddress - Memory Model ═══ These members help you determine if you are using a 32-Bit or a 16-Bit memory model. ═══ IProcedureAddress - Pointers to Functions ═══ These operators permit objects of this class to be used as regular function names. ═══ Protected Data - IProcedureAddress ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.12.1. IProcedureAddress::IProcedureAddress ═══ You must provide the following two pieces of information to construct objects of this template class:  The entry point. You can specify either an entry point name (const char *) or entry point ordinal (unsigned).  The dynamic link library (DLL) from which to load the entry point. You can specify the DLL either as a reference to an existing IDynamicLinkLibrary object or by the DLL name. You can also destruct objects of this class. Overload 1 public: IProcedureAddress( const char* entryPoint, const char* dllName); entryPoint Pointer that identifies the name of the entry point within the DLL. dllName Pointer that identifies the DLL name. Create an object to dynamically load an entry point using the specified entry point name and DLL name. If you know the name of the entry point and have not already loaded the DLL, use this constructor. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Overload 2 public: IProcedureAddress( const char* entryPoint, IDynamicLinkLibrary& aDLL); entryPoint Pointer that identifies the name of the entry point within the DLL. aDLL Reference to an IDynamicLinkLibrary object that wrappers the DLL. Create an object to dynamically load an entry point using the specified entry point name and a reference to an existing IDynamicLinkLibrary object. If you know the name of the entry point and have already loaded the DLL, use this constructor. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Overload 3 public: IProcedureAddress( unsigned long ordinal, const char* dllName); ordinal Unsigned long value that represents the entry point within the DLL. dllName Pointer that identifies the DLL name. Create an object to dynamically load an entry point using the specified entry point ordinal and DLL name. If you know the ordinal of the entry point and have not already loaded the DLL, use this constructor. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Overload 4 public: IProcedureAddress( unsigned long ordinal, IDynamicLinkLibrary& aDLL); ordinal Unsigned long value that represents the entry point within the DLL. aDLL Reference to an IDynamicLinkLibrary object that wrappers the DLL. Create an object to dynamically load an entry point using the specified entry point ordinal and a reference to an existing IDynamicLinkLibrary object. If you know the ordinal of the entry point and have already loaded the dynamic link library, use this constructor. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.12.2. IProcedureAddress::is32Bit ═══ Determines the memory model that the entry point resides within. If the entry point is 32-bit, this function returns true, and if the entry point is 16-bit, it returns false. public: Boolean is32Bit() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.12.3. IProcedureAddress::operator PtrToFnType ═══ Permits objects of this template class to be used in the same way as pointers to functions, which are like regular function names. public: operator PtrToFnType() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.12.4. IProcedureAddress::~IProcedureAddress ═══ This destructor frees the IDynamicLinkLibrary object that this class creates during construction. If you need to use the dynamic link library after the IDynamicLinkLibrary object is freed, construct an object of this class using an explicitly created IDynamicLinkLibrary object instead of the dynamic link library name. public: ~IProcedureAddress(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.13. IProcessId ═══ Description Derivation Constructors Public Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - IProcessId ═══ IBase │ IHandle │ IProcessId Inherited by none. ═══ Class Description - IProcessId ═══ ihandle.hpp Objects of the IProcessId class access numeric identifiers for processes. Presentation Manager Information IProcessId is an alias for the OS/2 Programmer's Toolkit type PID. Motif Information IProcessId is an alias for the system type pid_t. ═══ Public Functions - IProcessId ═══ Constructors IProcessId Inherited Members IHandle asDebugInfo asString asUnsigned operator Value IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ IProcessId - Constructors ═══ You can construct objects of this class. ═══ Protected Data - IProcessId ═══ Inherited Members IHandle handle IBase recoverable unrecoverable ═══ 1.13.1. IProcessId::IProcessId ═══ You can construct objects of this class from a process ID (a value of type IHandle::Value), which defaults to 0. public: IProcessId(Value pid = 0); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.14. IProfile ═══ Description Derivation Constructors Public Functions Protected Data Nested Types To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - IProfile ═══ IBase │ IVBase │ IProfile Inherited by none. ═══ Class Description - IProfile ═══ iprofile.hpp The IProfile class represents profile data sets. This class provides functions to query and set persistent application data based on application-defined keys. The profile data set stores information using the following two keys:  Application name, which is stored as a string  Key name, which is stored as either a string or an integer Profile data can be stored in text, binary, or integer format. Presentation Manager Information The objects representing profile data sets are .ini files. Note: The number of .ini files that OS/2 Presentation Manager lets you open at one time varies depending on system limitations. Motif Information The objects representing profile data sets are Xrm database files. The profile data set stores information using the following two keys:  Application name, which is stored as a string  Key name, which is stored as a string Both of these names must be stored as strings with no imbedded spaces. You cannot store key names as integers. You can store the profile data itself as text and integer values using the keys. ═══ Public Functions - IProfile ═══ Constructors IProfile operator = ~IProfile Default Application Name defaultApplicationName setDefaultApplicationName Profile Information applicationOrKeyAt handle name numberOfApplications numberOfKeys Reading and Writing Data addOrReplaceElementWithKey deleteElementWithApplication deleteElementWithKey elementWithKey integerWithKey Special Profiles systemProfile userProfile Testing containsApplication containsKeyName Inherited Members IVBase asDebugInfo asString IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ IProfile - Constructors ═══ Use these members to construct, copy, assign, and destruct objects of this class. You can construct objects of this class by using the name of the profile data set or by using the copy constructor to copy one profile to another. ═══ IProfile - Default Application Name ═══ Use these members to get or set the default application name. The default application name is a component of the keys that are used to access the profile. This name is used by default for all reads and writes to the profile. ═══ IProfile - Hidden Members ═══ You cannot access these members. ═══ IProfile - Profile Information ═══ Use these members to access general profile information. ═══ IProfile - Reading and Writing Data ═══ Use these members to read or write application data for an application. ═══ IProfile - Special Profiles ═══ Use these members to return the special objects of this class that correspond to the system and user profiles. ═══ IProfile - Testing ═══ Use these members to test a profile for an application name or an application and key name pair. ═══ Protected Data - IProfile ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.14.1. IProfile::addOrReplaceElementWithKey ═══ Writes the specified numeric, text, or binary data. You must specify text and binary data as an IString. Overload 1 public: virtual IProfile& addOrReplaceElementWithKey( const char* key, long data, const char* applName = 0); key Pointer to a key name. data Long integer numeric to use for a write. applName Pointer to an application name. If you do not supply a name, the default application name is used. Use this version of the function if your data is numeric. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Motif: AIX does not support the writing of binary data. Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IInvalidParameter │The application data was not written. │ │ │The key name is missing. │ ├────────────────────┼────────────────────────────────────────┤ │IInvalidParameter │The application data was not written. │ │ │The application name is missing and a │ │ │default has not been specified. │ ├────────────────────┼────────────────────────────────────────┤ │IAccessError │The application data was not written. │ │ │The application name or key may be │ │ │invalid. │ └────────────────────┴────────────────────────────────────────┘ Used in sample: Hello World Sample - Version 6: ahellow6.cpp Overload 2 public: virtual IProfile& addOrReplaceElementWithKey( const char* key, const IString& data, const char* applName = 0); key Pointer to a key name. data Reference to an IString that contains text or binary data to use for a write. applName Pointer to an application name. If you do not supply a name, the default application name is used. Use this version of the function if your data is in a text or binary format. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Motif: AIX does not support the writing of binary data. Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IInvalidParameter │The application data was not written. │ │ │The key name is missing. │ ├────────────────────┼────────────────────────────────────────┤ │IInvalidParameter │The application data was not written. │ │ │The application name is missing and a │ │ │default has not been specified. │ ├────────────────────┼────────────────────────────────────────┤ │IAccessError │The application data was not written. │ │ │The application name or key may be │ │ │invalid. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.14.2. IProfile::applicationOrKeyAt ═══ Returns the application name or key at the specified cursor. public: virtual IString applicationOrKeyAt( const Cursor& cursor) const; cursor Reference to a nested cursor that has been defined for this class. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IInvalidParameter │The application name or key was not │ │ │returned. The cursor is invalid. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.14.3. IProfile::containsApplication ═══ If the profile contains data for the specified application name, returns true. public: virtual Boolean containsApplication( const char* applName) const; applName Pointer to an application name. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IInvalidParameter │The profile query was not returned. The│ │ │application name is missing. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.14.4. IProfile::containsKeyName ═══ If the profile contains data for the specified application and key pair, returns true. public: virtual Boolean containsKeyName( const char* key, const char* applName = 0) const; key Pointer to a key name. applName Pointer to an application name. If you do not supply a name, the default application name is used. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.14.5. IProfile::defaultApplicationName ═══ Returns the default application name. public: virtual IString defaultApplicationName() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.14.6. IProfile::deleteElementWithApplication ═══ Removes the data for all keys for the specified application name. public: virtual IProfile& deleteElementWithApplication( const char* applName = 0); applName Pointer to an application name. If you do not supply a name, the default application name is used. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IInvalidParameter │The application data was not removed. │ │ │The application name is missing and a │ │ │default has not been specified. │ ├────────────────────┼────────────────────────────────────────┤ │IAccessError │The application data was not removed. │ │ │The application name may be invalid. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.14.7. IProfile::deleteElementWithKey ═══ Removes the data at the specified application and key name pair. public: virtual IProfile& deleteElementWithKey( const char* key, const char* applName = 0); key Pointer to a key name. applName Pointer to an application name. If you do not supply a name, the default application name is used. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IInvalidParameter │The application data was not removed. │ │ │The key name is missing. │ ├────────────────────┼────────────────────────────────────────┤ │IInvalidParameter │The application data was not removed. │ │ │The application name is missing and a │ │ │default has not been specified. │ ├────────────────────┼────────────────────────────────────────┤ │IAccessError │The application data was not removed. │ │ │The application name or key may be │ │ │invalid. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.14.8. IProfile::elementWithKey ═══ Reads the application data and returns it as an IString. public: virtual IString elementWithKey( const char* key, const char* applName = 0) const; key Pointer to a key name. applName Pointer to an application name. If you do not supply a name, the default application name is used. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IInvalidParameter │The application data was not read. The │ │ │key name is missing. │ ├────────────────────┼────────────────────────────────────────┤ │IInvalidParameter │The application data was not read. The │ │ │application name is missing and a │ │ │default has not been specified. │ ├────────────────────┼────────────────────────────────────────┤ │IAccessError │The application data was not read. The │ │ │application name or key may be invalid. │ ├────────────────────┼────────────────────────────────────────┤ │IInvalidRequest │The application data was not read. The │ │ │application name or key may be invalid. │ └────────────────────┴────────────────────────────────────────┘ Used in sample: Hello World Sample - Version 6: ahellow6.cpp ═══ 1.14.9. IProfile::handle ═══ Returns the profile handle. public: virtual IProfileHandle handle() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.14.10. IProfile::integerWithKey ═══ Reads the application data and returns it as a long integer. public: virtual long integerWithKey( const char* key, const char* applName = 0) const; key Pointer to a key name. applName Pointer to an application name. If you do not supply a name, the default application name is used. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IInvalidParameter │The application data was not read. The │ │ │key name is missing. │ ├────────────────────┼────────────────────────────────────────┤ │IInvalidParameter │The application data was not read. The │ │ │application name is missing and a │ │ │default has not been specified. │ ├────────────────────┼────────────────────────────────────────┤ │IAccessError │The application data was not read. The │ │ │application name or key may be invalid. │ └────────────────────┴────────────────────────────────────────┘ Used in sample: Hello World Sample - Version 6: ahellow6.cpp ═══ 1.14.11. IProfile::IProfile ═══ Use these members to construct, copy, assign, and destruct objects of this class. You can construct objects of this class by using the name of the profile data set or by using the copy constructor to copy one profile to another. Overload 1 public: IProfile(const char* profileName); profileName Pointer to the profile name. Create a profile object with the specified profile name. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IInvalidParameter │The IProfile object was not constructed.│ │ │The profile name is missing. │ ├────────────────────┼────────────────────────────────────────┤ │IAccessError │The IProfile object was not constructed.│ │ │The profile name may be invalid. │ └────────────────────┴────────────────────────────────────────┘ Used in samples: Hello World Sample - Version 6: ahellow6.cpp Lancelot - A Valiant Example: lancelot.cpp Overload 2 public: IProfile(const IProfile& aProfile); aProfile Reference to an existing profile object. Create a profile object using a reference to an existing profile object. Use this constructor if you want to make a copy of an existing profile object. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The IProfile object was not constructed.│ │ │The profile name may be invalid. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.14.12. IProfile::name ═══ Returns the profile's file name. public: virtual IString name() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.14.13. IProfile::numberOfApplications ═══ Returns the number of application names in the profile. public: virtual unsigned long numberOfApplications() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Ignored │ └────────────┴────────────┘ ═══ 1.14.14. IProfile::numberOfKeys ═══ Returns the number of keys for the application name. public: virtual unsigned long numberOfKeys( const char* applName = 0) const; applName Pointer to an application name. If you do not supply a name, the default application name is used. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IInvalidParameter │The number of keys was not returned. │ │ │The application name is missing and a │ │ │default has not been specified. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.14.15. IProfile::operator = ═══ Assigns the member data of an object of this class to another object of this class. public: IProfile& operator =(const IProfile& aProfile); aProfile Reference to an existing profile object. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The IProfile object was not assigned. │ │ │The profile name may be invalid. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.14.16. IProfile::setDefaultApplicationName ═══ Sets the default application name. All subsequent calls that do not supply an application name to functions of this class use this default name. public: virtual IProfile& setDefaultApplicationName( const char* applName); applName Pointer to an application name. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Used in sample: Hello World Sample - Version 6: ahellow6.cpp ═══ 1.14.17. IProfile::systemProfile ═══ Returns the system profile. public: static IProfile systemProfile(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.14.18. IProfile::userProfile ═══ Returns the user profile. public: static IProfile userProfile(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.14.19. IProfile::~IProfile ═══ This destructor closes the profile data set. public: virtual ~IProfile(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ Nested Types - IProfile ═══ Classes IProfile::Cursor ═══ 1.15. IProfile::Cursor ═══ Description Derivation Constructors Public Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - IProfile::Cursor ═══ IBase │ IVBase │ IProfile::Cursor Inherited by none. ═══ Class Description - IProfile::Cursor ═══ iprofile.hpp The IProfile::Cursor class creates and manages the cursor for an IProfile object. IProfile uses this cursor to iterate through the application names or keys in a profile. In the same way that you can use a cursor to iterate through the objects in a collection, you can use this cursor to iterate through a profile one item at a time. ═══ Public Functions - IProfile::Cursor ═══ Constructors Cursor ~Cursor Profile Iteration invalidate isValid setToFirst setToLast setToNext setToPrevious Inherited Members IVBase asDebugInfo asString IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ IProfile::Cursor - Constructors ═══ Use these members to construct and destruct objects of this nested class. You can construct objects of this class by using a reference to the profile, or a reference to the profile data and an application name. ═══ IProfile::Cursor - Profile Iteration ═══ Use these members to iterate through the application names or keys in a profile. ═══ Protected Data - IProfile::Cursor ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.15.1. IProfile::Cursor::Cursor ═══ Note: The cursor object is invalidated for the current state of application names or key names in the profile data set. Overload 1 public: Cursor(IProfile& profile); profile Reference to the profile object. You can construct an object of this class by using a reference to the profile. Use this constructor to create a cursor to iterate through the application names. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Overload 2 public: Cursor(IProfile& profile, const char* applName); profile Reference to the profile object. applName Pointer to an application name. You can construct an object of this class by using a reference to the profile and an application name. Use this constructor to create a cursor to iterate through the keys. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.15.2. IProfile::Cursor::invalidate ═══ Marks the cursor as invalid. public: virtual void invalidate(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.15.3. IProfile::Cursor::isValid ═══ Determines if the cursor is still valid. If the cursor is valid, returns true. If the parameter, checkFile, is set to true, this function checks to see if the data set's application and key information has been changed by another application while your application still has the data set open. public: virtual Boolean isValid(Boolean checkFile = false) const; checkFile Boolean flag to query if another application has changed the application and key information, thus rendering the cursor invalid. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Presentation Manager: If checkFile is set to true, this function determines whether the file application and key information have been changed by another application while your application still has them open. Motif: AIX does not support checkFile. ═══ 1.15.4. IProfile::Cursor::setToFirst ═══ Sets the cursor's position to the first application or key. public: virtual Boolean setToFirst(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.15.5. IProfile::Cursor::setToLast ═══ Sets the cursor's position to the last application or key. public: virtual Boolean setToLast(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.15.6. IProfile::Cursor::setToNext ═══ Sets the cursor's position to the next application or key. public: virtual Boolean setToNext(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.15.7. IProfile::Cursor::setToPrevious ═══ Set the cursor's position to the previous application or key. public: virtual Boolean setToPrevious(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.15.8. IProfile::Cursor::~Cursor ═══ public: virtual ~Cursor(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.16. IProfileHandle ═══ Description Derivation Constructors Public Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - IProfileHandle ═══ IBase │ IHandle │ IProfileHandle Inherited by none. ═══ Class Description - IProfileHandle ═══ ihandle.hpp Objects of the IProfileHandle class access profiles. Presentation Manager Information IProfileHandle is an alias for the OS/2 Programmer's Toolkit type HINI. Motif Information IProfileHandle is an alias for the X/Motif types XrmHashBucket and XrmDatabase. ═══ Public Functions - IProfileHandle ═══ Constructors IProfileHandle Operators operator _XrmHashBucketRec * Inherited Members IHandle asDebugInfo asString asUnsigned operator Value IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ IProfileHandle - Constructors ═══ You can construct objects of this class. ═══ IProfileHandle - Operators ═══ These members are the operators for this class. ═══ Protected Data - IProfileHandle ═══ Inherited Members IHandle handle IBase recoverable unrecoverable ═══ 1.16.1. IProfileHandle::IProfileHandle ═══ You can construct objects of this class. Overload 1 public: IProfileHandle(Value hini = 0); You can construct objects of this class from a profile handle (a value of type IHandle::Value), which defaults to 0. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Overload 2 public: IProfileHandle(_XrmHashBucketRec* hini); You can construct objects of this class from a profile handle. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │No │Yes │ └────────────┴────────────┘ Overload 3 public: IProfileHandle(int hini); You can construct objects of this class from a profile handle. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │No │Yes │ └────────────┴────────────┘ ═══ 1.16.2. IProfileHandle::operator _XrmHashBucketRec * ═══ Returns the handle value as a native X-Toolkit handle object. public: operator _XrmHashBucketRec *() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │No │Yes │ └────────────┴────────────┘ ═══ 1.17. IResource ═══ Description Derivation Constructors Public Functions Protected Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - IResource ═══ IBase │ IVBase │ IResource Inherited by: IPrivateResource ISharedResource ═══ Class Description - IResource ═══ ireslock.hpp The IResource class is the virtual base resource class. Use a derived class to identify a serially reusable resource. These resources can be limited to the current process, as described by the IPrivateResource class, or they can be shared across multiple processes, as described by ISharedResource class. ═══ Public Functions - IResource ═══ Constructors IResource ~IResource Resource Locking lock unlock Inherited Members IVBase asDebugInfo asString IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ IResource - Constructors ═══ You cannot construct or destruct objects of this class. Derive a new class from this class to identify a serially reusable resource if the derived User Interface Class Library classes do not meet your needs. ═══ IResource - Hidden Members ═══ You cannot access these members. ═══ IResource - Resource Handle ═══ Use these members to obtain a handle to the resource. ═══ IResource - Resource Locking ═══ Use resource locking members to acquire or release a serialized access to this resource. ═══ Protected Functions - IResource ═══ Resource Handle handle ═══ Protected Data - IResource ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.17.1. IResource::handle ═══ Returns the handle for the resource. protected: virtual ISemaphoreHandle& handle() = 0; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.17.2. IResource::IResource ═══ This function is the default constructor for this class. public: IResource(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.17.3. IResource::lock ═══ Acquires serialized access to the resource, preventing other threads of execution from accessing it. You can specify the value for timeout in milliseconds with -1 indicating an indefinite wait and 0 requesting an immediate return. public: virtual IResource& lock(long timeOut = - 1); timeOut Long value that represents in milliseconds how long to wait for this resource. The default value is an indefinite wait. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Motif: The X timer services used to implement the resource lock timeout have a resolution of one second. The lock function rounds up the specified timeout value to the next one-second interval. ═══ 1.17.4. IResource::unlock ═══ Releases access to the resource, allowing other threads of execution to access it. public: virtual IResource& unlock(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.17.5. IResource::~IResource ═══ public: virtual ~IResource(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.18. IResourceId ═══ Description Derivation Constructors Public Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - IResourceId ═══ IBase │ IResourceId Inherited by none. ═══ Class Description - IResourceId ═══ ireslib.hpp The IResourceId class is a wrapper class for a resource identifier. You can use the information contained in this class to determine the location of the resources, if the resources reside in either an IResourceLibrary or an IDynamicLinkLibrary. Most classes in the User Interface Class Library typically accept an IResourceId as input to describe resources and to provide the resource loading themselves. ═══ Public Functions - IResourceId ═══ Constructors IResourceId Diagnostics asDebugInfo asString Resources id operator unsigned long resourceLibrary Inherited Members IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ IResourceId - Constructors ═══ You can construct objects of this class by providing a resource identifier, a resource identifier and a reference to an IResourceLibrary, or a resource identifier and a reference to an IDynamicLinkLibrary. You can also construct or initialize an object of this class from another IResourceId object. ═══ IResourceId - Diagnostics ═══ Use these members for diagnostic purposes. They return an IString representation of an object of this class. ═══ IResourceId - Hidden Members ═══ These members are hidden to prevent you from using them. ═══ IResourceId - Resources ═══ Use these members to get the resource identifier or a reference to the resource library object for this class. ═══ Protected Data - IResourceId ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.18.1. IResourceId::asDebugInfo ═══ Provides debugging information about the class object. It returns a string that contains the resource identifier as well as the results of a call to IResourceLibrary::asDebugInfo for its resource library. public: IString asDebugInfo() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.18.2. IResourceId::asString ═══ Provides textual information about the class object. It returns the resource identifier. public: IString asString() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.18.3. IResourceId::id ═══ Returns the identifier used for the resource. public: unsigned long id() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Used in sample: Lancelot - A Valiant Example: lmainwin.cpp ═══ 1.18.4. IResourceId::IResourceId ═══ You can construct objects of this class by providing a resource identifier, a resource identifier and a reference to an IResourceLibrary, or a resource identifier and a reference to an IDynamicLinkLibrary. You can also construct or initialize an object of this class from another IResourceId object. Overload 1 public: IResourceId( unsigned long resourceId, const IDynamicLinkLibrary& dllLibrary); resourceId Unsigned long value that represents the resource identifier. dllLibrary Reference to the dynamic link library where the resource resides. Create an object to load the resource using the resource identifier and a reference to an IDynamicLinkLibrary. If have already loaded the dynamic link library that contains the resource, use this constructor. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Overload 2 public: IResourceId( unsigned long resourceId, const IResourceLibrary& resourceLibrary); resourceId Unsigned long value that represents the resource identifier. resourceLibrary Reference to the resource library where the resource resides. Create an object to load the resource using the resource identifier and a reference to an IResourceLibrary. If you have already loaded the resource library that contains the resource, use this constructor. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Overload 3 public: IResourceId(unsigned long resourceId); resourceId Unsigned long value that represents the resource identifier. Create an object to load the resource using only the resource identifier. The constructor uses the resource library returned by a call to ICurrentApplication::userResourceLibrary . This is the recommended use of the class. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Used in samples: Hello World Sample - Version 4: adialog4.cpp Hello World Sample - Version 5: adialog5.cpp Hello World Sample - Version 6: ahellow6.cpp Multi-Line Entry Field Sample: amle.cpp Message Box Sample: msgbox.cpp ═══ 1.18.5. IResourceId::operator unsigned long ═══ Returns the identifier used for the resource. Using this operator is the same as calling IResourceId::id. public: operator unsigned long() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.18.6. IResourceId::resourceLibrary ═══ Returns a const reference to the resource library. public: const IResourceLibrary& resourceLibrary() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.19. IResourceLibrary ═══ Description Derivation Constructors Public Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - IResourceLibrary ═══ IBase │ IVBase │ IResourceLibrary Inherited by: IDynamicLinkLibrary ═══ Class Description - IResourceLibrary ═══ ireslib.hpp The IResourceLibrary class loads most of the system resources. The default location for the resources is the executable file. Use the IDynamicLinkLibrary class to load resources that are stored in a dynamic link library. Typically, you only need to use this class when constructing objects of the IResourceId class. You can also use it to obtain either the User Interface Class Library's resource library or the default user resource library using ICurrentApplication::resourceLibrary or ICurrentApplication::userResourceLibrary respectively. ═══ Public Functions - IResourceLibrary ═══ Constructors IResourceLibrary operator = ~IResourceLibrary Diagnostics asDebugInfo asString Resource Information fileName handle isOpen Resource Loading loadAccelTable loadBitmap loadDialog loadHelpTable loadIcon loadMenu loadMessage loadPointer loadString sizeBitmapTo tryToLoadBitmap tryToLoadIcon tryToLoadMessage tryToLoadString Inherited Members IVBase asDebugInfo asString IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ IResourceLibrary - Constructors ═══ Use these members to construct, copy, assign, and destruct objects of this class. You can construct objects of this class by using the default constructor, which does not accept any parameters, or by using the copy constructor to copy one resource library to another. ═══ IResourceLibrary - Diagnostics ═══ Use these members for diagnostic purposes. They return an IString representation of an object of this class. ═══ IResourceLibrary - Resource Information ═══ Use these members to query general resource information. ═══ IResourceLibrary - Resource Loading ═══ Use these members to load specific resources from a resource file. ═══ Protected Data - IResourceLibrary ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.19.1. IResourceLibrary::asDebugInfo ═══ Provides debugging information about the class object. It returns a string that contains the file name of the resource library. public: virtual IString asDebugInfo() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.19.2. IResourceLibrary::asString ═══ Provides textual information about the class object. It returns a string that contains the file name of the resource library. public: virtual IString asString() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.19.3. IResourceLibrary::fileName ═══ Returns the fully qualified file name of the resource library. public: virtual IString fileName() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.19.4. IResourceLibrary::handle ═══ Returns the handle used to load resources. public: virtual IModuleHandle handle() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Presentation Manager: This is always 0 for an IResourceLibrary. ═══ 1.19.5. IResourceLibrary::IResourceLibrary ═══ Use these members to construct, copy, assign, and destruct objects of this class. You can construct objects of this class by using the default constructor, which does not accept any parameters, or by using the copy constructor to copy one resource library to another. Overload 1 public: IResourceLibrary(); Creates a resource library object using this, the default constructor. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Used in sample: 2D Graphics Sample: 2d-draw.cpp Overload 2 public: IResourceLibrary(const IResourceLibrary& resLibrary); resourceLibrary Reference to an existing resource library object. Creates a resource library object using a reference to an existing resource library object. This is commonly known as a copy constructor. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.19.6. IResourceLibrary::isOpen ═══ Returns the open state of the resource file. Note: True is always returned for an object of this class. public: virtual Boolean isOpen() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.19.7. IResourceLibrary::loadAccelTable ═══ Loads an accelerator table from a resource file. Overload 1 public: virtual IAccelTblHandle loadAccelTable( unsigned long accelTableId) const; accelTableId Unsigned long value that represents the accelerator table identifier. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The accelerator table was not loaded. │ │ │The accelerator table identifier may be │ │ │invalid. │ └────────────────────┴────────────────────────────────────────┘ Overload 2 public: virtual void loadAccelTable( unsigned long accelTableId, const IWindowHandle& menu) const; accelTableId Unsigned long value that represents the accelerator table identifier. menu Reference to the handle of the window where the menu exists. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │No │Yes │ └────────────┴────────────┘ ═══ 1.19.8. IResourceLibrary::loadBitmap ═══ Loads a bitmap from a resource file. If the cached argument is true, the bitmap is reference counted. Therefore, if multiple requests are made for the bitmap, the reference count is incremented, and the same copy of the bitmap is used. When all of the references to the bitmap are deleted, the User Interface Class Library deletes the bitmap. If you set the cached argument to false, you create a new copy of the bitmap that is never deleted. Overload 1 public: virtual IBitmapHandle loadBitmap( unsigned long bitmapId, Boolean cached = true) const; bitmapId Unsigned long value that represents the bitmap identifier. cached Boolean value that determines caching. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Overload 2 public: virtual IBitmapHandle loadBitmap( unsigned long bitmapId, const ISize& bitmapSize, Boolean cached = true) const; bitmapId Unsigned long value that represents the bitmap identifier. bitmapSize Reference to a size object that determines at which size the bitmap is loaded. cached Boolean value that determines caching. Use this version of the function if you want to specify the size at which the bitmap is loaded. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The bitmap was not loaded. The bitmap │ │ │identifier may be invalid. │ └────────────────────┴────────────────────────────────────────┘ Used in sample: Notebook Sample: notebook.cpp ═══ 1.19.9. IResourceLibrary::loadDialog ═══ Loads a dialog resource, creates a frame window, and sets the dialog as the client of the frame window. public: virtual IWindowHandle loadDialog( unsigned long dialogId, IWindow* dialogParent, IWindow* dialogOwner, IWinProc* dialogProcedure, void* dialogCreateParameters) const; dialogId Unsigned long value that represents the dialog identifier. dialogParent Pointer to a window object that is the dialog's parent. dialogOwner Pointer to a window object that is the dialog's owner. dialogProcedure Pointer to a dialog procedure for the dialog you are loading. dialogCreateParameters Pointer to an application-defined data area. The first 2 bytes of the data referenced by the pointer should be the total size of the data. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Motif: AIX does not support dialogs. Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The dialog was not loaded. The dialog │ │ │identifier, parent, owner, procedure, or│ │ │create parameters may be invalid. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.19.10. IResourceLibrary::loadHelpTable ═══ Loads a help table from a resource file. The IHelpWindow class provides more information on help windows. public: virtual IResourceLibrary& loadHelpTable( IWindow* helpInstance, unsigned long helpTableId) const; helpInstance Pointer to the window object for the help instance. helpTableId Unsigned long value that represents the help table identifier. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The help table was not loaded. The help│ │ │table identifier or the help table │ │ │instance may be invalid. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.19.11. IResourceLibrary::loadIcon ═══ Loads an icon from a resource file. If the cached argument is true, the icon is reference counted. Therefore, if multiple requests are made for the icon, the reference count is incremented, and the same copy of the icon is used. When all of the references to the icon are deleted, the User Interface Class Library deletes the icon. If you set the cached argument to false, you create a new copy of the icon that is never deleted. public: virtual IPointerHandle loadIcon( unsigned long iconId, Boolean cached = true) const; iconId Unsigned long value that represents the icon identifier. cached Boolean value that determines caching. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The icon was not loaded. The icon │ │ │identifier may be invalid. │ └────────────────────┴────────────────────────────────────────┘ Used in sample: Container Sample: acnr.cpp ═══ 1.19.12. IResourceLibrary::loadMenu ═══ Loads a menu resource from a resource file. Overload 1 public: virtual IWindowHandle loadMenu( unsigned long menuId, IWindow* menuOwner) const; menuId Unsigned long value that represents the menu identifier. menuOwner Pointer to a window object that is the menu's owner. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The menu was not loaded. The menu │ │ │identifier or the menu owner may be │ │ │invalid. │ └────────────────────┴────────────────────────────────────────┘ Overload 2 public: virtual void loadMenu( unsigned long menuId, const IWindowHandle& menuHandle, IMenu* parentMenu) const; menuId Unsigned long value that represents the menu identifier. menuHandle Reference to the handle of the menu owner window. parentMenu Pointer to a menu object that is the menu's parent. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │No │Yes │ └────────────┴────────────┘ Motif: This member function calls a private IMenuBld class to read the menu resource from the Motif resource database, parses it, and calls the appropriate IMenu member function to create the menu items under parentMenu. ═══ 1.19.13. IResourceLibrary::loadMessage ═══ Loads a message resource from a resource file using the specified message identifier. public: virtual IString loadMessage(unsigned long messageId) const; messageId Unsigned long value that represents the message identifier. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.19.14. IResourceLibrary::loadPointer ═══ Loads a pointer from a resource file. If the cached argument is true, the pointer is reference counted. Calling this function is the same as calling IResourceLibrary::loadIcon. public: virtual IPointerHandle loadPointer( unsigned long iconId, Boolean cached = true) const; iconId Unsigned long value that represents the icon identifier. cached Boolean value that determines caching. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Used in sample: 2D Graphics Sample: 2d-draw.cpp ═══ 1.19.15. IResourceLibrary::loadString ═══ Loads a string resource from a resource file using the specified string identifier. public: virtual IString loadString(unsigned long stringId) const; stringId Unsigned long value that represents the string identifier. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Used in samples: List Box Sample: alistbox.cpp Multi-Line Entry Field Sample: amle.cpp Multi Cell Canvas Sample: amcelcv.cpp Lancelot - A Valiant Example: lmainwin.cpp ═══ 1.19.16. IResourceLibrary::operator = ═══ Use this operator to assign the member data of an object of this class to another object of this class. public: IResourceLibrary& operator =( const IResourceLibrary& resLibrary); resLibrary Reference to an existing resource library object. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.19.17. IResourceLibrary::sizeBitmapTo ═══ Scales the bitmap to the size specified by the newSize parameter. public: static IBitmapHandle sizeBitmapTo( const IBitmapHandle& currentHandle, const ISize& newSize); currentHandle Reference to the handle of the bitmap to resize. newSize Reference to a size object that contains the new bitmap size. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │No │Yes │ └────────────┴────────────┘ ═══ 1.19.18. IResourceLibrary::tryToLoadBitmap ═══ Attempts to load a bitmap from a resource file. If this function cannot load the bitmap, it returns an IBitmapHandle with a 0 handle value rather than throwing an exception. If the cached argument is true, the bitmap is reference counted. Therefore, if multiple requests are made for the bitmap, the reference count is incremented, and the same copy of the bitmap is used. When all of the references to the bitmap are deleted, the User Interface Class Library deletes the bitmap. If you set the cached argument to false, you create a new copy of the bitmap that is never deleted. Overload 1 public: virtual IBitmapHandle tryToLoadBitmap( unsigned long bitmapId, const ISize& bitmapSize, Boolean cached = true) const; bitmapId Unsigned long value that represents the bitmap identifier. bitmapSize Reference to a size object that determines at which size the bitmap is loaded. cached Boolean value that determines caching. Use this version of the function if you want to specify the size at which the bitmap is loaded. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Overload 2 public: virtual IBitmapHandle tryToLoadBitmap( unsigned long bitmapId, Boolean cached = true) const; bitmapId Unsigned long value that represents the bitmap identifier. cached Boolean value that determines caching. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.19.19. IResourceLibrary::tryToLoadIcon ═══ Attempts to load an icon from a resource file. If this function cannot load the icon, it returns an IPointerHandle with a 0 handle value rather than throwing an exception. If the cached argument is true, the icon is reference counted. Therefore, if multiple requests are made for the icon, the reference count is incremented, and the same copy of the icon is used. When all of the references to the icon are deleted, the User Interface Class Library deletes the icon. If you set the cached argument to false, you create a new copy of the icon that is never deleted. public: virtual IPointerHandle tryToLoadIcon( unsigned long iconId, Boolean cached = true) const; iconId Unsigned long value that represents the icon identifier. cached Boolean value that determines caching. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.19.20. IResourceLibrary::tryToLoadMessage ═══ Attempts to load a message resource from a resource file. If this function cannot load the message, it returns an empty IString rather than throwing an exception. public: virtual IString tryToLoadMessage( unsigned long messageId) const; messageId Unsigned long value that represents the message identifier. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.19.21. IResourceLibrary::tryToLoadString ═══ Attempts to load a string resource from a resource file. If this function cannot load the string, it returns an empty IString rather than throwing an exception. public: virtual IString tryToLoadString( unsigned long stringId) const; stringId Unsigned long value that represents the string identifier. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.19.22. IResourceLibrary::~IResourceLibrary ═══ public: virtual ~IResourceLibrary(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.20. IResourceLock ═══ Description Derivation Constructors Public Functions Protected Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - IResourceLock ═══ IBase │ IVBase │ IResourceLock Inherited by none. ═══ Class Description - IResourceLock ═══ ireslock.hpp The IResourceLock class locks a resource for a specified period of time. A simple yet effective use of this class is to declare a local object of this class that is in scope for the period of time that the resource needs to be locked. The lock is automatically removed when the block of code is exited, thereby forcing the object out of scope. If the specified period of time is reached before the resource can be acquired, an IResourceExhausted exception is thrown. ═══ Public Functions - IResourceLock ═══ Constructors IResourceLock ~IResourceLock Inherited Members IVBase asDebugInfo asString IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ IResourceLock - Constructors ═══ Use these members to construct and destruct objects of this class. ═══ IResourceLock - Hidden Members ═══ You cannot access these members. ═══ IResourceLock - Resource Locking ═══ Use these members to acquire or release a lock on the resource. ═══ Protected Functions - IResourceLock ═══ Resource Locking clearLock setLock ═══ Protected Data - IResourceLock ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.20.1. IResourceLock::clearLock ═══ Releases the resource. protected: virtual IResourceLock& clearLock(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The resource object was not released. │ │ │The semaphore handle may be invalid, │ │ │there may be too many release requests, │ │ │the release request was interrupted, or │ │ │the process which owns the semaphore │ │ │died. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.20.2. IResourceLock::IResourceLock ═══ The only way to construct objects of this class is with this constructor. You specify a reference to an IResource and an optional value for the timeOut parameter. You can specify timeOut in milliseconds with -1 indicating an indefinite wait and 0 requesting an immediate return. public: IResourceLock(IResource& resource, long timeOut = - 1); resource Reference to the resource being locked. timeOut Long value that represents in milliseconds how long to wait for the lock request. The default value is an indefinite wait. Optional. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Motif: The AIX timer services used to implement the resource lock timeOut have a resolution of one second. The timeout values you provide are rounded up to the next one-second interval. ═══ 1.20.3. IResourceLock::setLock ═══ Acquires the resource. You can specify the value for timeOut in milliseconds with -1 indicating an indefinite wait and 0 requesting an immediate return. The constructor calls this function to lock the resource; IResourceLock::clearLock can then be called to clear the lock, and this function can be called to reset it. This is not the normal use of this class. Normally, you use the constructor and scope it to the instruction that requires serialization. protected: virtual IResourceLock& setLock(long timeOut = - 1); timeOut Long value that represents in milliseconds how long to wait for the lock request. The default value is an indefinite wait. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Motif: The AIX timer services used to implement the resource lock timeOut have a resolution of one second. This function rounds up the specified timeout value to the next one-second interval. Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IOutOfSystemResource│The resource object was not acquired. │ │ │The available semaphores may be │ │ │exhausted, because the request for a │ │ │lock timed out. │ ├────────────────────┼────────────────────────────────────────┤ │IAccessError │The resource object was not acquired. │ │ │The semaphore handle may be invalid, │ │ │there may be too many lock requests, the│ │ │lock request was interrupted, or the │ │ │process which owns the semaphore died. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.20.4. IResourceLock::~IResourceLock ═══ public: virtual ~IResourceLock(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.21. ISemaphoreHandle ═══ Description Derivation Constructors Public Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - ISemaphoreHandle ═══ IBase │ IHandle │ ISemaphoreHandle Inherited by none. ═══ Class Description - ISemaphoreHandle ═══ ibhandle.hpp Objects of the ISemaphoreHandle class access semaphores. An example of a semaphore is a flag in a multiple-user application that prevents simultaneous access to a file. ═══ Public Functions - ISemaphoreHandle ═══ Constructors ISemaphoreHandle Inherited Members IHandle asDebugInfo asString asUnsigned operator Value IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ ISemaphoreHandle - Constructors ═══ You can construct objects of this class. ═══ Protected Data - ISemaphoreHandle ═══ Inherited Members IHandle handle IBase recoverable unrecoverable ═══ 1.21.1. ISemaphoreHandle::ISemaphoreHandle ═══ You can construct objects of this class from a semaphore handle (a value of type IHandle::Value), which defaults to 0. public: ISemaphoreHandle(Value hsem = 0); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.22. ISharedResource ═══ Description Derivation Constructors Public Functions Protected Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - ISharedResource ═══ IBase │ IVBase │ IResource │ ISharedResource Inherited by none. ═══ Class Description - ISharedResource ═══ ireslock.hpp The ISharedResource class defines a resource that can be shared across multiple processes. Use the name you provide on construction to distinguish between shared resources. Portability Considerations Use a keyName value that is a valid file name in all of the target environments. Motif Information You might use ISharedResource objects to serialize resource access with applications that were not written using the User Interface Class Library. To make this work correctly, your non-User Interface Class Library application needs to use the AIX semaphore object in a manner consistent with the User Interface Class Library. To help you understand how the semaphore object is used by the User Interface Class Library, the basic interaction with the system's subroutines is described below. The AIX semop subroutine is used for the semaphore lock and release operations. The ISharedResource constructor uses the semget subroutine to allocate a set containing two semaphores. The first semaphore in this set represents the state of the lock. The constructor initializes the semval field to free (value of 0). A lock operation increments the value, while an unlock operation decrements the value. Recursive lock operations by the same process are allowed. In this case, the resource remains owned by the process until an equal number of unlock operations are done or the object is deleted. The second semaphore in the set is used as a reference counter to indicate the number of ISharedResource objects that are referencing this semaphore set. The constructor increments this counter and the destructor decrements it. When the counter reaches 0, the destructor calls the semctl subroutine to delete the semaphore set. The constructor determines the semaphore identifier to use in the semget subroutine by using the ftok system subroutine. If the parameter provided on the constructor begins with a slash (/) or is an existing file, the parameter is used as a file name for the ftok call and is the basis of the semaphore identifier token. If the parameter is not the name of an existing file, the constructor interprets the string as the name of a file in the /tmp directory. If this file does not exist, it is created. You can use keyName to obtain the file name used on the ftok subroutine call. The constructor always uses a value of 1 for the second parameter of ftok. ═══ Public Functions - ISharedResource ═══ Constructors ISharedResource ~ISharedResource Resource Information keyName Inherited Members IResource lock unlock IVBase asDebugInfo asString IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ ISharedResource - Constructors ═══ Use these members to construct and destruct objects of this class. ═══ ISharedResource - Hidden Members ═══ You cannot access these members. ═══ ISharedResource - Resource Handle ═══ Use these members to obtain a handle to the shared resource. ═══ ISharedResource - Resource Information ═══ Use these members to access shared resource information. ═══ Protected Functions - ISharedResource ═══ Resource Handle handle Inherited Members IResource handle ═══ Protected Data - ISharedResource ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.22.1. ISharedResource::handle ═══ Returns the handle for the shared resource. protected: ISemaphoreHandle& handle(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.22.2. ISharedResource::ISharedResource ═══ You can only construct objects of this class by providing a name that uniquely identifies the resource to be shared. public: ISharedResource(const char* keyName); keyName Pointer to the name that uniquely identifies the resource. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The shared resource object was not │ │ │created. The memory may be exhausted, │ │ │the handle limit on your platform may be│ │ │exceeded, or the keyName may be invalid.│ └────────────────────┴────────────────────────────────────────┘ ═══ 1.22.3. ISharedResource::keyName ═══ Returns the name used to identify this shared resource. public: IString keyName() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.22.4. ISharedResource::~ISharedResource ═══ public: virtual ~ISharedResource(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The shared resource object was not │ │ │deleted. The semaphore handle may be │ │ │invalid. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.23. IThread ═══ Description Derivation Constructors Public Functions Protected Functions Protected Data Nested Types To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - IThread ═══ IBase │ IVBase │ IThread Inherited by: ICurrentThread ═══ Class Description - IThread ═══ ithread.hpp The IThread class represents threads of execution within the current program. You can use this class to implement multithreaded applications. Objects of this class give you access to all of the tasking APIs of the operating system. In addition, these objects serve as the anchor for thread-specific information. Generally, you use objects of this class in one of the following ways:  To apply thread functions to the current thread. In most cases, these functions are applied to the IThread object reference returned by the static member function IThread::current.  To create additional threads of execution by creating new objects of this class and starting them.  To manipulate threads of execution initiated using alternate means, and for which only the thread's identifier is known. Portability Considerations The AIX release of the User Interface Class Library does not presently support multiple threads per process. Portable applications must be limited to a single thread. The OS/2 version of IThread has functions to control the size of the message queue and the stack size associated with a thread. These functions are not needed in the AIX environment and have no affect on the execution of a thread. You can call these functions in the AIX environment with no adverse side effects. Therefore, they have been left in the interface for ease of porting applications to multiple platforms. Presentation Manager Information Compile multithreaded programs (those that call the IThread::start member function) with /Gm+ to avoid unresolved externals at link time. Motif Information The AIX release of the User Interface Class Library does not support multithreading. The only access that an AIX application should need to IThread is exported through the class IApplication with the call to IApplication::current().run(). This call starts the processing of messages for the application. You cannot control the priority of the AIX thread. The main thread of execution is a process. The only control that a user has over the priority of a process is using the nice values, which are not supported at this time. ═══ Public Functions - IThread ═══ Constructors IThread ~IThread Diagnostics asDebugInfo asString Graphical User Interface (GUI) Support autoInitGUI defaultAutoInitGUI setAutoInitGUI setDefaultAutoInitGUI stopProcessingMsgs Implementation relatedHandlesList setRelatedHandlesList setWindowList windowList Message Queue defaultQueueSize messageQueue queueSize setDefaultQueueSize setQueueSize Stack Size defaultStackSize setDefaultStackSize setStackSize stackSize Starting and Stopping Threads resume start stop suspend Thread Information current currentId id isStarted setVariable variable Thread Priority adjustPriority priorityClass priorityLevel setPriority Inherited Members IVBase asDebugInfo asString IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ IThread - Constructors ═══ You can construct, copy, assign, and destruct objects of this class. ═══ IThread - Diagnostics ═══ Use these members for diagnostic purposes. They return an IString representation of an object of this class. ═══ IThread - Function Types ═══ These typedefs define the two types of (non-member) functions that can be dispatched on a separate thread. ═══ IThread - Graphical User Interface (GUI) Support ═══ Use these members to query and set the basic GUI support for threads. ═══ IThread - Hidden Members ═══ You cannot access these members. ═══ IThread - Implementation ═══ These members provide utilities used to implement this class. They are used by the User Interface Class Library. ═══ IThread - Message Queue ═══ Use these members to query and set message queue information for graphical user interface (GUI) support. ═══ IThread - Obsolete Members ═══ Use these members to provide basic OS/2 Presentation Manager (PM) support for threads. Note: Please note that these members are obsolete, and have been replaced with new members due to portability requirements. These new members are described in the group, Graphical User Interface (GUI) Support We provide you with the name of the new member you should be using in the documentation for each of the members in this group. ═══ IThread - Stack Size ═══ Use these members to query and set this thread's stack size. ═══ IThread - Starting and Stopping Threads ═══ Use these members to start or stop threads. ═══ IThread - Thread Information ═══ Use these members to query and set general thread information. ═══ IThread - Thread Priority ═══ Use these members to control the thread priority. You can query or set the priority class and level. ═══ Protected Functions - IThread ═══ Constructors operator = Implementation newStartedThread startedThread ═══ Protected Data - IThread ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.23.1. IThread::adjustPriority ═══ Changes the thread's priority level by the specified amount. public: virtual IThread& adjustPriority(int delta); delta Integer value that represents the priority level delta. This value must be between -31 and 31. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Ignored │ └────────────┴────────────┘ Presentation Manager: The delta value is between -31 and 31. Motif: You cannot adjust the thread's priority on AIX. Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The thread priority was not adjusted. │ │ │The priority delta may be invalid. The │ │ │valid values are -31 to 31. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.23.2. IThread::asDebugInfo ═══ Provides debugging information about the class object. Use it to return general diagnostic information about the thread. public: virtual IString asDebugInfo() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.23.3. IThread::asString ═══ Provides debugging information about the class object. Use it to return a string of the form "IThread(tid).", where tid represents the thread identifier. public: virtual IString asString() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.23.4. IThread::autoInitGUI ═══ Determines if this thread's GUI support is automatically initialized. public: virtual Boolean autoInitGUI() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Presentation Manager: Obtains the setting of the flag that automatically initializes Presentation Manager for this thread. ═══ 1.23.5. IThread::current ═══ Returns a reference to an object of the ICurrentThread class that represents the currently executing thread. public: static ICurrentThread& current(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Used in samples: Hello World Sample - Version 6: atimehdr.cpp Multi-Line Entry Field Sample: amle.cpp ═══ 1.23.6. IThread::currentId ═══ Obtains the identifier (ID) of the currently executing thread. public: static IThreadId currentId(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Motif: The AIX release of the User Interface Class Library only supports a single thread. Therefore, the current thread ID is always 1. ═══ 1.23.7. IThread::defaultAutoInitGUI ═══ Determines the default GUI support for automatic initialization. Unless the support is explicitly set using IThread::setDefaultAutoInitGUI, this function returns true for threads running in a GUI session and false for threads running in a non-GUI session. public: static Boolean defaultAutoInitGUI(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.23.8. IThread::defaultQueueSize ═══ Obtains the default message queue size for the threads. The User Interface Class Library default queue size is 30. Note: The User Interface Class Library uses this value by default for new objects of this class. public: static long defaultQueueSize(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Ignored │ └────────────┴────────────┘ Presentation Manager: Obtains the default Presentation Manager message queue size to use for new IThreads. Motif: You cannot adjust the queue size on the X environment. This function returns the queue size that is set using IThread::setDefaultQueueSize. Initially, this value is 0. ═══ 1.23.9. IThread::defaultStackSize ═══ Obtains the default stack size for threads in bytes. Note: The User Interface Class Library uses this value by default for new objects of this class. public: static unsigned long defaultStackSize(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Ignored │ └────────────┴────────────┘ Motif: You cannot control the stack size for a thread in the X environment. This function returns the stack size that is set using IThread::setDefaultStackSize. Initially, this value is 32768. ═══ 1.23.10. IThread::id ═══ Obtains the identifier (ID) of the thread. A return value of 0 indicates that the thread is not started. public: virtual IThreadId id() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.23.11. IThread::isStarted ═══ Determines if this thread is currently active. If it is currently active, true is returned. public: virtual Boolean isStarted() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.23.12. IThread::IThread ═══ You can construct, copy, assign, and destruct objects of this class. Overload 1 public: IThread( SystemFnPtr function, unsigned long functionArgument, Boolean autoInitGUI = defaultAutoInitGUI ( )); function Pointer to a function that uses the _System calling convention. functionArgument Unsigned long parameter that you are passing to the function pointed to by function. autoInitGUI Boolean value that you use to specify that the thread is a GUI thread. Use this constructor to create an object of this class when you need to specify a function to run that you have defined using the _System calling convention. Such functions are typically started using the thread APIs that are defined for the operating system. Use this form of the constructor to create a new object of this class and immediately dispatch it. This is equivalent to using the default constructor and then dispatching the thread using IThread::start . This constructor permits you to specify whether or not the new thread is to be a GUI thread. If it is, ICurrentThread::initializeGUI is called automatically after the thread is started. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Overload 2 public: IThread(); Use this, the default constructor, to create an object of this class so that you can subsequently start using IThread::start. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Overload 3 public: IThread(const IThread& thread); thread Reference to an object of this class. Use this constructor if you would like to make a copy of an existing object of this class. This is commonly referred to as a copy constructor. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Overload 4 public: IThread(const IThreadId& threadID); threadID Reference to a thread identifier of a previously started thread. Use this constructor to create an object of this class from the thread identifier (ID) of a previously started thread. You can use this constructor to provide this class' functionality to threads created using alternate means (for example, the native operating system's system calls). Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Overload 5 public: IThread( const IReference< IThreadFn>& threadFunction, Boolean autoInitGUI = defaultAutoInitGUI ( )); threadFunction Reference to an object of the IReference template class that was created using a derived IThreadFn class. autoInitGUI Boolean value that you use to specify if the thread is a GUI thread. Use this constructor to create an object of this class when you need to specify a function to run that you have defined by deriving a new class from the IThreadFn class. This constructor passes the derived IThreadFn using an object of the IReference class so that the derived IThreadFn can be deleted (if necessary) when the thread terminates. Use this form of the constructor to create a new object of this class and immediately dispatch it. This is equivalent to using the default constructor and then dispatching the thread using IThread::start. This constructor permits you to specify whether or not the new thread is to be a GUI thread. If it is, ICurrentThread::initializeGUI is called automatically after the thread is started. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Overload 6 public: IThread( OptlinkFnPtr function, void* functionArgument, Boolean autoInitGUI = defaultAutoInitGUI ( )); function Pointer to a function that uses the _Optlink calling convention. functionArgument Pointer to a parameter that you are passing to the function pointed to by function. autoInitGUI Boolean value that you use to specify that the thread is a GUI thread. Use this constructor to create an object of this class when you need to specify a function to run that is defined with the _Optlink calling convention. Such functions are typically started using the function _beginThread. Use this form of the constructor to create a new object of this class and immediately dispatch it. This is equivalent to using the default constructor and then dispatching the thread using IThread::start. This constructor permits you to specify whether the new thread is to be a GUI thread. If it is, ICurrentThread::initializeGUI is called automatically after the thread is started. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.23.13. IThread::messageQueue ═══ Returns the handle of the message queue. A 0 is returned if the handle does not exist or is invalid. Overload 1 public: IMessageQueueHandle messageQueue(); Use this version of the function if you want to reset an invalid message queue handle to 0. Do this if the handle is determined to be invalid. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Overload 2 public: IMessageQueueHandle messageQueue() const; Use this version of the function if you want the invalid message queue handle to remain invalid. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.23.14. IThread::newStartedThread ═══ Creates an object of the IStartedThread class. protected: static IStartedThread* newStartedThread(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.23.15. IThread::operator = ═══ Assigns the member data of an object of this class to another object of this class, therefore preserving resource allocation. protected: IThread& operator =(const IThread& thread); thread Reference to an existing thread object. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.23.16. IThread::priorityClass ═══ Obtains the priority class of this thread. The return value is an enumerator provided by IApplication::PriorityClass . public: virtual IApplication::PriorityClass priorityClass() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Ignored │ └────────────┴────────────┘ Motif: The priority class for AIX is always IApplication::regular. ═══ 1.23.17. IThread::priorityLevel ═══ Obtains the priority level of this thread. The return value is between 0 and 31. public: virtual unsigned priorityLevel() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Ignored │ └────────────┴────────────┘ Presentation Manager: The value of the level is in the range 0-31. Motif: The level for AIX is always 0. ═══ 1.23.18. IThread::queueSize ═══ Obtains the message queue size for the thread. This is the thread used by the application to receive events from the operating system. public: virtual long queueSize() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Ignored │ └────────────┴────────────┘ Motif: You cannot control the size of the message queue in the X environment. This function returns the value set by IThread::setQueueSize. The default value is defaultQueueSize. ═══ 1.23.19. IThread::relatedHandlesList ═══ Obtains a pointer to the related handles list for this thread. public: IRelatedHandlesList* relatedHandlesList() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │No │Yes │ └────────────┴────────────┘ ═══ 1.23.20. IThread::resume ═══ Resumes the thread's execution. public: virtual void resume(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Ignored │ └────────────┴────────────┘ Motif: The AIX release of the User Interface Class Library supports only a single-threaded environment. Therefore, you cannot suspend or resume a thread. Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The thread was not resumed. The thread │ │ │was not suspended or the thread │ │ │identifier (ID) is invalid. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.23.21. IThread::setAutoInitGUI ═══ Sets the automatic initialization state for this thread. Set initFlag to true, the default, for GUI-based threads and to false for non-GUI-based threads. public: virtual IThread& setAutoInitGUI(Boolean initFlag = true); initFlag Boolean value that determines if GUI support is automatically initialized for this thread. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Motif: Regardless of the value set by this function, the GUI is always initialized in AIX because of the User Interface Class Library's single-threaded limitation. ═══ 1.23.22. IThread::setDefaultAutoInitGUI ═══ Sets the default GUI support for automatic initialization. Set initFlag to true, the default, for GUI-based threads and to false for non-GUI-based threads. public: static void setDefaultAutoInitGUI(Boolean initFlag = true); initFlag Boolean value that determines if GUI support is automatically initialized for this thread. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Motif: Regardless of the value set by this function, the GUI is always initialized in AIX because of the User Interface Class Library's single-threaded limitation. ═══ 1.23.23. IThread::setDefaultQueueSize ═══ Sets the default message queue size for threads. The User Interface Class Library default queue size is 30. Note: The User Interface Class Library uses this value by default for new objects of this class. public: static void setDefaultQueueSize(long queueSize); aSize Long value that represents the default message queue size. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Ignored │ └────────────┴────────────┘ Motif: You cannot control the size of the queue in the X environment. This function has no affect on the message queue size. The value set by this function is the value returned by IThread::defaultQueueSize. ═══ 1.23.24. IThread::setDefaultStackSize ═══ Sets the default stack size for threads in bytes. Note: The User Interface Class Library uses this value by default for new objects of this class. public: static void setDefaultStackSize(unsigned long size); size Unsigned long value that represents the default stack size in bytes. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Ignored │ └────────────┴────────────┘ Motif: You cannot control the size of the stack in the AIX environment. This function has no affect on the size of the stack. The value set by this function is the value returned by IThread::defaultStackSize. ═══ 1.23.25. IThread::setPriority ═══ Sets the priority class and level of this thread. public: virtual IThread& setPriority( IApplication::PriorityClass priority, unsigned level); priority IApplication::PriorityClass enumerator that identifies the priority class. level Unsigned value that represents the priority level. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Ignored │ └────────────┴────────────┘ Motif: You cannot control the priority of a thread in the AIX environment. This function has no effect on the priority of an executing thread. Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The thread priority was not set. The │ │ │priority class or level may be invalid. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.23.26. IThread::setQueueSize ═══ Sets the GUI message queue size for this thread. public: virtual IThread& setQueueSize(long queueSize); queueSize Long value that represents the new message queue size. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Ignored │ └────────────┴────────────┘ Motif: You cannot control the message queue size for X. This function has no affect on the size of the message queue. The value set by this function is the value returned by IThread::queueSize. ═══ 1.23.27. IThread::setRelatedHandlesList ═══ Sets a pointer to the related handles list for this thread. public: IThread& setRelatedHandlesList(IRelatedHandlesList* list); list Pointer to an IRelatedHandlesList object to set for this thread. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │No │Yes │ └────────────┴────────────┘ ═══ 1.23.28. IThread::setStackSize ═══ Sets this thread's stack size in bytes. If you have already started the thread, this value takes effect only when the thread is stopped and restarted. public: virtual IThread& setStackSize(unsigned long size); size Unsigned long value that represents the stack size in bytes. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Ignored │ └────────────┴────────────┘ Motif: You cannot control the stack size in AIX. This function has no affect on the size of the stack used. The value set by this function is the value returned by IThread::stackSize. ═══ 1.23.29. IThread::setVariable ═══ Stores data and an associated key, on a per thread instance. You can later retrieve this data using IThread::variable. You can store up to 16 keys and their associated data per thread. public: IThread& setVariable( const IString&key, const IString&value); key Reference to an IString object that represents the search key that is associated with the stored data. value Reference to an IString object that contains the data to be stored. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IInvalidRequest │The keyed variable could not be set │ │ │because the limit has been reached. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.23.30. IThread::setWindowList ═══ Sets a pointer to the window information list for this thread. public: IThread& setWindowList(IWindowList* list); list Pointer to an IWindowList object to set for this thread. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.23.31. IThread::stackSize ═══ Obtains this thread's stack size in bytes. public: virtual unsigned long stackSize() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Ignored │ └────────────┴────────────┘ Motif: Returns the value of the stack size that was set with the function setStackSize. You cannot control the size of the stack in AIX; therefore, this is not actually the size of the stack. The default value is defaultStackSize. ═══ 1.23.32. IThread::start ═══ Starts an asynchronous thread. Overload 1 public: void start( const IReference< IThreadFn>& threadFunction, Boolean autoInitGUI = defaultAutoInitGUI ( )); threadFunction Reference to an object of the IReference template class that was created using a derived IThreadFn class. autoInitGUI Boolean value that you use to specify if the thread is a GUI thread. You can start threads with a derived IThreadFn class. This function passes the derived IThreadFn using an object of the IReference class so that the derived IThreadFn can be deleted (if necessary) when the thread terminates. This function permits you to specify whether the thread is started as a GUI thread. If it is, ICurrentThread::initializeGUI is called automatically after the thread is started. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Presentation Manager: The OS/2 version also allows threads to be started via the following means:  With an IThread::OptlinkFnPtr type and void* parameter. This is to provide support for functions otherwise started using _beginthread.  With an IThread::SystemFnPtr type and unsigned long parameter. This is to provide support for functions otherwise started using DosCreateThread. Motif: Because the User Interface Class Library supports only single threading, there is no need to call this function. Overload 2 public: void start( OptlinkFnPtr function, void* functionArgument, Boolean autoInitGUI = defaultAutoInitGUI ( )); function Pointer to a function which uses the _Optlink calling convention. functionArgument Pointer to a parameter that you are passing to the function pointed to by pfn. autoInitGUI Boolean value that you use to specify if the thread is a GUI thread. You can start threads with a function that is defined using the _Optlink calling convention. Such functions are typically started using the function, _beginThread. This function gives you the same capability. This constructor permits you to specify whether the new thread is to be a GUI thread. If it is, ICurrentThread::initializeGUI is called automatically after the thread is started. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Overload 3 public: void start( SystemFnPtr function, unsigned long functionArgument, Boolean autoInitGUI = defaultAutoInitGUI ( )); function Pointer to a function which uses the _System calling convention. functionArgument Unsigned long parameter that you are passing to the function pointed to by pfn. autoInitGUI Boolean value that you use to specify if the thread is a GUI thread. You can start threads with a function that is defined using the _System calling convention. Such functions are typically started using the thread APIs that are defined for the operating system. This function gives you the same capability. This constructor permits you to specify whether the new thread is to be a GUI thread. If it is, ICurrentThread::initializeGUI is called automatically after the thread is started. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.23.33. IThread::startedThread ═══ Returns a pointer to the object of the IStartedThread class that corresponds to this thread. protected: virtual IStartedThread* startedThread() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.23.34. IThread::stop ═══ Stops the thread. public: virtual void stop(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The thread was not stopped. The thread │ │ │was either busy or the thread identifier│ │ │(ID) is invalid. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.23.35. IThread::stopProcessingMsgs ═══ Terminates the processing of window events (messages) initiated by ICurrentThread::processMsgs. public: virtual IThread& stopProcessingMsgs(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IInvalidRequest │The event processing was not terminated.│ │ │The termination failed because the event│ │ │processing was not initiated by │ │ │ICurrentThread::processMsgs. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.23.36. IThread::suspend ═══ Suspends the thread's execution. public: virtual void suspend(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Ignored │ └────────────┴────────────┘ Motif: The User Interface Class Library supports only single threading; therefore, suspend and resume have no effect. Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The thread was not suspended. The │ │ │thread identifier (ID) is invalid. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.23.37. IThread::variable ═══ Returns the data associated with the key that was stored using IThread::setVariable. public: IString variable(const IString& key) const; key Reference to an IString object that represents the search key. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.23.38. IThread::windowList ═══ Obtains a pointer to the window information list for this thread. public: IWindowList* windowList() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.23.39. IThread::~IThread ═══ This virtual destructor deallocates resources. Note: When objects of this class are destructed, the thread is not terminated. public: virtual ~IThread(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ Nested Types - IThread ═══ Classes IThread::Cursor Type Definitions ( unsigned long ) ( void * ) ═══ Type Definition - IThread::( unsigned long ) ═══ typedef void ( _System * SystemFnPtr ) ( unsigned long ); This typedef defines a pointer to a function that uses the _System calling convention. Note: _System is the default calling convention for the OS/2 operating system. ═══ Type Definition - IThread::( void * ) ═══ typedef void ( _Optlink * OptlinkFnPtr ) ( void * ); This typedef defines a pointer to a function that uses the _Optlink calling convention. Note: _Optlink is the default calling convention for IBM VisualAge C++. ═══ 1.24. IThread::Cursor ═══ Description Derivation Constructors Public Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - IThread::Cursor ═══ IBase │ IVBase │ IThread::Cursor Inherited by none. ═══ Class Description - IThread::Cursor ═══ ithread.hpp The IThread::Cursor class creates and manages the cursor for an IThread object. This nested class defines objects that you can use to traverse or iterate through a set of active threads. In the same way that you can use a cursor to traverse the objects in a collection, you can use this cursor to traverse a set of threads one at a time. Typically, you traverse a set, or collection, of active threads by doing the following: 1. Calling setToFirst 2. Looping through the threads using setToNext 3. Processing the returned thread IDs from threadId until isValid returns false Note: This class only provides access to threads that an IThread object represents. ═══ Public Functions - IThread::Cursor ═══ Constructors Cursor ~Cursor Thread Iteration invalidate isValid setToFirst setToNext threadId Inherited Members IVBase asDebugInfo asString IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ IThread::Cursor - Constructors ═══ Use these members to construct and destruct objects of this nested class. ═══ IThread::Cursor - Hidden Members ═══ You cannot access these members. ═══ IThread::Cursor - Thread Iteration ═══ Use these members to iterate through the set of active threads. ═══ Protected Data - IThread::Cursor ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.24.1. IThread::Cursor::Cursor ═══ You can only use this constructor to create objects of this class. It accepts an optional flag, that indicates how threads are enumerated. public: Cursor(Boolean allThreads = true); allThreads Boolean value that determines if all threads are enumerated or only those that have User Interface Class Library windows. The default is for all threads to be enumerated. Optional. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.24.2. IThread::Cursor::invalidate ═══ Marks the cursor as invalid. public: virtual void invalidate(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.24.3. IThread::Cursor::isValid ═══ Determines if the cursor is valid. If it is valid, true is returned. public: Boolean isValid() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.24.4. IThread::Cursor::setToFirst ═══ Sets the cursor's position to the first thread. public: Boolean setToFirst(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.24.5. IThread::Cursor::setToNext ═══ Advances the cursor's position to the next thread. public: Boolean setToNext(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.24.6. IThread::Cursor::threadId ═══ Obtains the identifier (ID) of the thread at the current cursor position. public: IThreadId threadId() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IInvalidParameter │The thread identifier (ID) was not │ │ │returned. The cursor is not valid. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.24.7. IThread::Cursor::~Cursor ═══ public: virtual ~Cursor(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.25. IThreadFn ═══ Description Derivation Constructors Public Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - IThreadFn ═══ IBase │ IVBase │ IRefCounted │ IThreadFn Inherited by: IThreadMemberFn ═══ Class Description - IThreadFn ═══ ithread.hpp The IThreadFn class represents functions to be dispatched on secondary threads of execution when you start an IThread object. The User Interface Class Library reference counts objects of this class to manage their destruction after the thread has terminated. The User Interface Class Library passes such a reference to IThread::start, supplying the reference via the IReference template class. This class is an abstract thread function class. ═══ Public Functions - IThreadFn ═══ Constructors IThreadFn ~IThreadFn Run Function run Inherited Members IRefCounted addRef removeRef useCount IVBase asDebugInfo asString IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ IThreadFn - Constructors ═══ You cannot construct or destruct objects of this class because it is an abstract class. Use the template class IThreadMemberFn for dispatching C++ member functions to an object on a new thread. ═══ IThreadFn - Hidden Members ═══ You cannot access these members. ═══ IThreadFn - Run Function ═══ Use run function members to implement the code that you need to run on secondary threads of execution. ═══ Protected Data - IThreadFn ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.25.1. IThreadFn::IThreadFn ═══ The default and only constructor for this abstract class. public: IThreadFn(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.25.2. IThreadFn::run ═══ Called when the thread function object is called. Override this function to implement the code that you need to run on secondary threads of execution. public: virtual void run() = 0; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.25.3. IThreadFn::~IThreadFn ═══ public: virtual ~IThreadFn(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.26. IThreadId ═══ Description Derivation Constructors Public Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - IThreadId ═══ IBase │ IHandle │ IThreadId Inherited by none. ═══ Class Description - IThreadId ═══ ihandle.hpp Objects of the IThreadId class access numeric identifiers for threads. Presentation Manager Information IThreadId is an alias for the OS/2 Programmer's Toolkit type TID. Motif Information In AIX, the User Interface Class Library does not support multiple threads. This class always returns a ThreadId of 1. ═══ Public Functions - IThreadId ═══ Constructors IThreadId Inherited Members IHandle asDebugInfo asString asUnsigned operator Value IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ IThreadId - Constructors ═══ You can construct objects of this class. ═══ Protected Data - IThreadId ═══ Inherited Members IHandle handle IBase recoverable unrecoverable ═══ 1.26.1. IThreadId::IThreadId ═══ You can construct objects of this class from a thread ID (a value of type IHandle::Value), which defaults to 0. public: IThreadId(Value tid = 0); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ Used in sample: Multi-Line Entry Field Sample: amle.cpp ═══ 1.27. IThreadMemberFn ═══ Description Derivation Constructors Public Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - IThreadMemberFn ═══ IBase │ IVBase │ IRefCounted │ IThreadFn │ IThreadMemberFn Inherited by none. ═══ Class Description - IThreadMemberFn ═══ ithread.hpp The IThreadMemberFn template class is derived from IThreadFn for dispatching C++ member functions to an object on a new thread. The template argument is the class of the object where the dispatched member functions are called. The constructor for such objects requires the following:  A reference to the object where the dispatched member functions are called  A pointer to the member functions to call The member functions return void and accept no parameters. You can add support for other member functions by deriving a class from this class. Customization (Template Argument) IThreadMemberFn is a template class that is created with the following template argument: T The class of the object where the dispatched member functions are called. ═══ Public Functions - IThreadMemberFn ═══ Constructors IThreadMemberFn ~IThreadMemberFn Run Function run Inherited Members IThreadFn run IRefCounted addRef removeRef useCount IVBase asDebugInfo asString IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ IThreadMemberFn - Constructors ═══ Use these members to construct and destruct objects of this template class. ═══ IThreadMemberFn - Hidden Members ═══ You cannot use these members. ═══ IThreadMemberFn - Run Function ═══ Use these members to run the member function that was specified when an object of this class was created. ═══ Protected Data - IThreadMemberFn ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.27.1. IThreadMemberFn::IThreadMemberFn ═══ You can only construct objects of this class by specifying an argument of the template argument class and a pointer to a member function of the template argument class. public: IThreadMemberFn(T& obj, void ( T::* mem ) ( )); obj Object of the template argument class T. mem Pointer to a member function of the template argument class. The member function should return a void parameter and accept no formal parameters. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.27.2. IThreadMemberFn::run ═══ Calls the member function that you specify when you create an object of this class. public: virtual void run(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.27.3. IThreadMemberFn::~IThreadMemberFn ═══ public: virtual ~IThreadMemberFn(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │Yes │ └────────────┴────────────┘ ═══ 1.28. ITimer ═══ Description Derivation Constructors Public Functions Protected Data Nested Types To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - ITimer ═══ IBase │ IVBase │ ITimer Inherited by none. ═══ Class Description - ITimer ═══ itimer.hpp The ITimer class creates and references periodic time-interval-based operations. ITimer objects use timer identifier values above 1000. Limit your use of timer identifiers to values below 1000 when directly creating or managing timers using operating system calls. The ITimer class uses the operating system message queue for timer expiration. This can cause timer actions to be delayed if the application is currently tying up the queue. If a timer event is delayed, the next timer event still occurs at the expected interval (there should be no timer drift). ═══ Public Functions - ITimer ═══ Comparison operator == Constructors ITimer operator = ~ITimer Diagnostics asDebugInfo asString Expiration Interval interval setInterval Retrieving Objects timerAt Starting and Stopping isStarted start stop Timer Information id Inherited Members IVBase asDebugInfo asString IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ ITimer - Comparison ═══ Use these members to compare ITimer objects. ═══ ITimer - Constructors ═══ You can construct, copy, assign, and destruct objects of this class. Note: The ITimer class does not support user-specified timer identifier values or timers that were not created with the ITimer class. ═══ ITimer - Diagnostics ═══ Use these members for diagnostic purposes. They return IString representation of the timer diagnostics. ═══ ITimer - Expiration Interval ═══ Use these members to access the timer expiration interval. ═══ ITimer - Retrieving Objects ═══ Use these members to retrieve a timer object using ITimer::Cursor. ═══ ITimer - Starting and Stopping ═══ Use these members to start and stop timers. ═══ ITimer - Timer Information ═══ Use these members to access timer information such as the timer identifier. ═══ Protected Data - ITimer ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.28.1. ITimer::asDebugInfo ═══ Returns a representation of the timer as diagnostic information. public: virtual IString asDebugInfo() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.28.2. ITimer::asString ═══ Returns a string of the form ITimer(ID) where ID is replaced by the actual identifier of the timer. public: virtual IString asString() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.28.3. ITimer::id ═══ Returns the identifier value of the timer. public: unsigned long id() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.28.4. ITimer::interval ═══ Returns the timer interval (in thousandths of a second). public: unsigned long interval() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.28.5. ITimer::isStarted ═══ Returns true if the timer is currently active. public: Boolean isStarted() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.28.6. ITimer::ITimer ═══ You can construct, copy, assign, and destruct objects of this class. Note: The ITimer class does not support user-specified timer identifier values or timers that were not created with the ITimer class. Overload 1 public: ITimer(const ITimer& timer); Creates an ITimer object from an existing ITimer object. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Overload 2 public: ITimer(); Creates an ITimer object using the default constructor. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IOutOfSystemResource│The system is out of available timer │ │ │identifiers. │ └────────────────────┴────────────────────────────────────────┘ Overload 3 public: ITimer( const IReference< ITimerFn>& timerFunction, unsigned long timerInterval = 1000); Creates an ITimer object with a specification of code to be run. Use this form of the constructor to construct a new ITimer and immediately start it. It is equivalent to using the default constructor and then calling the start method. This constructor permits specification of a time-interval to be used (in thousandths of a second). A time-interval of one second is the default. This constructor is equivalent to using the default constructor and immediately calling the start member function. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Overload 4 public: ITimer(unsigned long timerIdentifier); Creates an ITimer object from the timer ID of an existing ITimer object. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IInvalidParameter │The timer identifier value is not valid.│ └────────────────────┴────────────────────────────────────────┘ ═══ 1.28.7. ITimer::operator = ═══ Assigns an ITimer object to reference an existing timer. public: ITimer& operator =(const ITimer& timer); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.28.8. ITimer::operator == ═══ Returns true if and only if the timers are identical. public: Boolean operator ==(const ITimer timer); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.28.9. ITimer::setInterval ═══ Sets the timer interval (in thousandths of a second). If no interval is set for a timer, then an interval of one second is used by default. If this member function is called for a started timer, then the timer is stopped and restarted with the new interval. The ITimerFn being used is saved and used when the timer is restarted. An interval of 0 causes the timer to expire as quickly as possible. public: virtual ITimer& setInterval(unsigned long aInterval = 1000); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Presentation Manager: When running on the OS/2 operating system, an effective minimum of about 1/18 of a second exists for timer intervals. ═══ 1.28.10. ITimer::start ═══ Starts a time-interval-based operation with an arbitrary ITimerFn. The ITimerFn is passed in using an IReference so that the ITimerFn can be reference counted and subsequently deleted when the timer is stopped. The ITimerFn is called each time the timer interval expires. Overload 1 public: virtual ITimer& start( const IReference< ITimerFn>& timerFunction); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IInvalidRequest │The timer has already been started. │ ├────────────────────┼────────────────────────────────────────┤ │IAccessError │The operating system is unable to start │ │ │the timer. │ └────────────────────┴────────────────────────────────────────┘ Overload 2 public: virtual ITimer& start( const IReference< ITimerFn>& timerFunction, unsigned long timerInterval); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.28.11. ITimer::stop ═══ Stops the timer. You must stop the timer to deallocate resources used by the timer. public: virtual ITimer& stop(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IAccessError │The operating system is unable to stop │ │ │the timer. │ └────────────────────┴────────────────────────────────────────┘ Used in sample: Magnify Sample: magnify.cpp ═══ 1.28.12. ITimer::timerAt ═══ Returns an ITimer object at a cursor position. public: static ITimer timerAt(const Cursor& cursor); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ Exceptions ┌────────────────────┬────────────────────────────────────────┐ │IInvalidParameter │The ITimer::Cursor is invalid. │ └────────────────────┴────────────────────────────────────────┘ ═══ 1.28.13. ITimer::~ITimer ═══ The destructor does not stop the timer or deallocate resources. If you want to stop the timer and deallocate resources, call the stop method to halt the started timer. public: virtual ~ITimer(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ Nested Types - ITimer ═══ Classes ITimer::Cursor ═══ 1.29. ITimer::Cursor ═══ Description Derivation Constructors Public Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - ITimer::Cursor ═══ IBase │ IVBase │ ITimer::Cursor Inherited by none. ═══ Class Description - ITimer::Cursor ═══ itimer.hpp The ITimer::Cursor nested class iterates over the active timers for the current application. Only timers that are started with the ITimer class are iterated over. Timers for all threads will be iterated. ═══ Public Functions - ITimer::Cursor ═══ Constructors Cursor ~Cursor Timer Iteration invalidate isValid setToFirst setToNext Inherited Members IVBase asDebugInfo asString IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ ITimer::Cursor - Constructors ═══ Use these members to construct and destruct objects of this class. ═══ ITimer::Cursor - Timer Iteration ═══ Use these members to iterate through the set of active timers. ═══ Protected Data - ITimer::Cursor ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.29.1. ITimer::Cursor::Cursor ═══ The default constructor accepts no arguments. public: Cursor(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.29.2. ITimer::Cursor::invalidate ═══ Invalidates the cursor. public: virtual void invalidate(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.29.3. ITimer::Cursor::isValid ═══ Returns true if the cursor is valid. public: virtual Boolean isValid() const; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.29.4. ITimer::Cursor::setToFirst ═══ Initializes the cursor to the first timer. If no timers are active, then it returns false and invalidates the cursor. public: virtual Boolean setToFirst(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.29.5. ITimer::Cursor::setToNext ═══ Advances the cursor to the next timer. If no other timers are active, then it returns false and invalidates the cursor. If you call setToNext with an invalid cursor, it sets the cursor to the first active timer. public: virtual Boolean setToNext(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.29.6. ITimer::Cursor::~Cursor ═══ public: virtual ~Cursor(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.30. ITimerFn ═══ Description Derivation Constructors Public Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - ITimerFn ═══ IBase │ IVBase │ IRefCounted │ ITimerFn Inherited by: ITimerMemberFn ITimerMemberFn0 ═══ Class Description - ITimerFn ═══ itimer.hpp The ITimerFn class is an abstract timer function class. To use an ITimer, create a class derived from ITimerFn that implements the timerExpired function. The ITimerMemberFn and ITimerMemberFn0 are template classes that are derived from ITimerFn. Objects of this class represent functions to be called when an active timer expires. These objects are reference counted to manage their destruction (after the timer has been stopped). A reference to such an ITimerFn is passed to ITimer::start. ═══ Public Functions - ITimerFn ═══ Constructors ITimerFn ~ITimerFn Timer Expiration timerExpired Inherited Members IRefCounted addRef removeRef useCount IVBase asDebugInfo asString IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ ITimerFn - Constructors ═══ You can construct and destruct objects of this class. You cannot copy or assign ITimerFn objects because both the copy constructor and the assignment operator are private members. ═══ ITimerFn - Hidden Members ═══ You cannot access these members. ═══ ITimerFn - Timer Expiration ═══ Use these members to perform actions each time the timer expires. ═══ Protected Data - ITimerFn ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.30.1. ITimerFn::ITimerFn ═══ You can construct and destruct objects of this class. You cannot copy or assign ITimerFn objects because both the copy constructor and the assignment operator are private members. public: ITimerFn(); Creates an ITimerFn object. Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.30.2. ITimerFn::timerExpired ═══ Called each time the timer expires. public: virtual void timerExpired(unsigned long timerId) = 0; Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.30.3. ITimerFn::~ITimerFn ═══ public: virtual ~ITimerFn(); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.31. ITimerMemberFn ═══ Description Derivation Constructors Public Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - ITimerMemberFn ═══ IBase │ IVBase │ IRefCounted │ ITimerFn │ ITimerMemberFn Inherited by none. ═══ Class Description - ITimerMemberFn ═══ itimer.hpp The ITimerMemberFn template class is an ITimerFn-derived class for dispatching C++ member functions to an object when a timer expires. The template argument is as follows: T The class of object against which the member functions are applied. Objects of this class dispatch C++ member functions when a timer expires. The template argument is the class of the object for which the functions are called. The constructor for such objects requires a reference to the object that the member functions are to be applied to and a pointer to the member functions. The member functions return void and accept a timer ID argument. ═══ Public Functions - ITimerMemberFn ═══ Constructors ITimerMemberFn Timer Expiration timerExpired Inherited Members ITimerFn timerExpired IRefCounted addRef removeRef useCount IVBase asDebugInfo asString IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ ITimerMemberFn - Constructors ═══ You can construct objects of this class. You cannot copy or assign ITimerMemberFn objects because both the copy constructor and the assignment operator are private members. ═══ ITimerMemberFn - Hidden Members ═══ You cannot access these members. ═══ ITimerMemberFn - Timer Expiration ═══ Use these members to perform actions each time the timer expires. ═══ Protected Data - ITimerMemberFn ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.31.1. ITimerMemberFn::ITimerMemberFn ═══ You can construct objects of this class. You cannot copy or assign ITimerMemberFn objects because both the copy constructor and the assignment operator are private members. public: ITimerMemberFn( T& object, void ( T::* memberFunction ) ( unsigned long )); The constructor requires an object of the template argument class T and a pointer to a member function of that class (returning void and accepting a timer reference argument). Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.31.2. ITimerMemberFn::timerExpired ═══ Calls the pointed-to member function that was provided at construction each time the timer expires. public: virtual void timerExpired(unsigned long timerId); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.32. ITimerMemberFn0 ═══ Description Derivation Constructors Public Functions Protected Data To close all the panels in a chapter, double click on this panel's system menu. ═══ Derivation - ITimerMemberFn0 ═══ IBase │ IVBase │ IRefCounted │ ITimerFn │ ITimerMemberFn0 Inherited by none. ═══ Class Description - ITimerMemberFn0 ═══ itimer.hpp The ITimerMemberFn0 template class is an ITimerFn-derived class for dispatching C++ member functions to an object when a timer expires. The template argument is as follows: T The class of object against which the member functions are applied. Objects of this class dispatch C++ member functions when a timer expires. The template argument is the class of the object for which the functions are called. The constructor for such objects requires a reference to the object that the member functions are to be applied to and a pointer to the member functions. The member functions return void and accept no arguments. ═══ Public Functions - ITimerMemberFn0 ═══ Constructors ITimerMemberFn0 Timer Expiration timerExpired Inherited Members ITimerFn timerExpired IRefCounted addRef removeRef useCount IVBase asDebugInfo asString IBase asDebugInfo asString messageFile messageText setMessageFile version ═══ ITimerMemberFn0 - Constructors ═══ You can construct objects of this class. You cannot copy or assign ITimerMemberFn0 objects because both the copy constructor and the assignment operator are private members. ═══ ITimerMemberFn0 - Hidden Members ═══ You cannot access these members. ═══ ITimerMemberFn0 - Timer Expiration ═══ Use these members to perform actions each time the timer expires. ═══ Protected Data - ITimerMemberFn0 ═══ Inherited Members IBase recoverable unrecoverable ═══ 1.32.1. ITimerMemberFn0::ITimerMemberFn0 ═══ You can construct objects of this class. You cannot copy or assign ITimerMemberFn0 objects because both the copy constructor and the assignment operator are private members. public: ITimerMemberFn0( T& object, void ( T::* memberFunction ) ( )); The constructor requires an object of the template argument class T and a pointer to a member function of that class (returning void and accepting no arguments). Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘ ═══ 1.32.2. ITimerMemberFn0::timerExpired ═══ Calls the pointed-to member function that was provided at construction each time the timer expires. public: virtual void timerExpired(unsigned long timerId); Platform Support ┌────────────┬────────────┐ │PM │MOTIF │ ├────────────┼────────────┤ │Yes │No │ └────────────┴────────────┘