PM Library classes

class PMLanguage

? ^ 
    extends PMNonCopyable as public

Messages catalog management class.

None of the functions in this class throws exceptions because an exception probably has been thrown already or is about to be thrown.

You can construct and destruct objects of this class.

Source:
pm_language.h:30
Author:
Dmitry A.Steklenev
Version:
$Revision: 1.12 $

Contents

^ 
EntityInherited FromTypeScopeShort Description
MSGCPYmacro publicEasy way to retrieve a message from the messages catalog.
MSGPTRmacro publicEasy way to retrieve a message pointer from the messages catalog.
PMLanguageconstructor public Constructs the messages management object.
PMLanguageconstructor public Constructs the messages management object of a current module.
~PMLanguagedestructor public Destructs the messages management object.
messagemethod public Retrieves a message from the messages catalog.
message_ptrmethod public Retrieves a pointer to message from the messages catalog.
handlemethod publicReturns the handle of the opened message catalog.
instancestatic attribute public This is a global instance of the messages management object.

macro MSGCPY

? ^  > 
Easy way to retrieve a message from the messages catalog.
Source:
pm_language.h:33
Code:
public define MSGCPY ( var , key ) PMLanguage::instance -> message ( var , sizeof ( var ) , key )

macro MSGPTR

? ^  < > 
Easy way to retrieve a message pointer from the messages catalog.
Source:
pm_language.h:35
Code:
public define MSGPTR ( key ) PMLanguage::instance -> message_ptr ( key )

constructor PMLanguage

? ^  < > 
Constructs the messages management object.

Opens the specified by filename messages catalog file and loads all messages of the current language into the program memory.

Source:
pm_language.h:46
Code:
public PMLanguage ( const char * filename )

constructor PMLanguage

? ^  < > 
Constructs the messages management object of a current module.

Opens the specified as modulename.nls messages catalog file and loads all messages of the current language into the program memory.

Source:
pm_language.h:56
Code:
public PMLanguage ( )

destructor ~PMLanguage

? ^  < > 
Destructs the messages management object.
Source:
pm_language.h:62
Code:
public ~ PMLanguage ( )

method message

? ^  < > 
Retrieves a message from the messages catalog.

Source:
pm_language.h:75
Params:
result A buffer in which the message corresponding to the keyword is returned.
size This is the size of the buffer specified by the result parameter. If the call is successful, this is overwritten with the number of bytes copied into the buffer.
key Specifies the message keyword.
Code:
public char * message ( char * result ,
int size ,
const char * key )

method message_ptr

? ^  < > 
Retrieves a pointer to message from the messages catalog.

Note: This method don't understand of the escaped characters.

Source:
pm_language.h:90
Param:
key Specifies the message keyword.
Returns:
A pointer to the message corresponding to the keyword. The char* type is used instead of const char* because of the most functions of the ECS runtime which receives char* as argument.
Code:
public char * message_ptr ( const char * key ) const

method handle

? ^  < > 
Returns the handle of the opened message catalog.
Source:
pm_language.h:93
Code:
public LANGE handle ( ) const

static attribute instance

? ^  < > 
This is a global instance of the messages management object.

This static member variable must be initialized during a initialization of the application, because this variable is used in some cases by library functions.

Source:
pm_language.h:103
Code:
public static PMLanguage * instance

Created Fri Aug 3 09:13:16 2012.
This documentation was generated automatically by
ccdoc v08r39 2003/02/27 bin_opt_emx_os2-2.30.
Click here to submit a bug report or feature request for ccdoc.
Click here to return to the top of the page.