DSIMessageCache Class Reference

This class acts as a cache for all warning and error messages loaded through the DSII. More...

List of all members.

Public Types

enum  FindResult { MESSAGE_FOUND, MESSAGE_NOT_FOUND, COULD_NOT_OPEN_FILE }
 

Result that is returned from GetErrorMessage.

More...

Public Member Functions

void AddErrorMessage (const simba_string &in_locale, const simba_wstring &in_messageID, simba_int32 in_sourceComponentID, const simba_wstring &in_message, simba_int32 in_nativeErrCode)
 DEPRECATED Adds the specified message, keyed with the message ID and component ID.
void Clear ()
 Clears all messages from this cache.
void Clear (simba_int32 in_sourceComponentID)
 Clears messages from this cache with the given component ID.
 DSIMessageCache ()
 Constructor.
FindResult GetErrorMessage (DSIXmlMessageReader &in_reader, const simba_string &in_locale, const simba_wstring &in_messageID, simba_int32 in_sourceComponentID, const simba_wstring *in_messagePrefix, simba_wstring &out_message, simba_int32 &out_nativeErrCode)
 Retrieves the message specified by the message ID and component ID.
bool GetErrorMessage (const simba_string &in_locale, const simba_wstring &in_messageID, simba_int32 in_sourceComponentID, simba_wstring &out_message, simba_int32 &out_nativeErrCode)
 Retrieves the message specified by the message ID and component ID.
 ~DSIMessageCache ()
 Destructor.

Detailed Description

This class acts as a cache for all warning and error messages loaded through the DSII.


Member Enumeration Documentation

enum FindResult

Result that is returned from GetErrorMessage.

Enumerator:
MESSAGE_FOUND 

The requested message was found in the cache (or read from the given message reader).

MESSAGE_NOT_FOUND 

The requested message was neither in the cache, not the given message reader.

COULD_NOT_OPEN_FILE 

The requested message was not in the cache, and the message reader could not open the error message file it is associated with.


Constructor & Destructor Documentation

DSIMessageCache (  ) 

Constructor.

~DSIMessageCache (  ) 

Destructor.


Member Function Documentation

void AddErrorMessage ( const simba_string &  in_locale,
const simba_wstring in_messageID,
simba_int32  in_sourceComponentID,
const simba_wstring in_message,
simba_int32  in_nativeErrCode 
)

DEPRECATED Adds the specified message, keyed with the message ID and component ID.

If an existing message is stored for the two IDs, it will not be overwritten.

Parameters:
in_locale The locale.
in_messageID Unique message identifier.
in_sourceComponentID Source component identifier.
in_message The message for the given message and component ID.
in_nativeErrCode The error code for the given message and component ID.
void Clear (  ) 

Clears all messages from this cache.

void Clear ( simba_int32  in_sourceComponentID  ) 

Clears messages from this cache with the given component ID.

Parameters:
in_sourceComponentID Source component identifier.
FindResult GetErrorMessage ( DSIXmlMessageReader in_reader,
const simba_string &  in_locale,
const simba_wstring in_messageID,
simba_int32  in_sourceComponentID,
const simba_wstring in_messagePrefix,
simba_wstring out_message,
simba_int32 &  out_nativeErrCode 
)

Retrieves the message specified by the message ID and component ID.

Parameters:
in_reader The message reader to delegate to if the given message was not in the cache.
in_locale The locale.
in_messageID Unique message identifier.
in_sourceComponentID Source component identifier.
in_messagePrefix If non-null, this prefix should be prepended to any message retrieved from in_reader before adding it to the cache. (NOT OWN)
out_message The message for the given message and component ID.
out_nativeErrCode The error code for the given message and component ID.
bool GetErrorMessage ( const simba_string &  in_locale,
const simba_wstring in_messageID,
simba_int32  in_sourceComponentID,
simba_wstring out_message,
simba_int32 &  out_nativeErrCode 
)

Retrieves the message specified by the message ID and component ID.

Parameters:
in_locale The locale.
in_messageID Unique message identifier.
in_sourceComponentID Source component identifier.
out_message The message for the given message and component ID.
out_nativeErrCode The error code for the given message and component ID.
Returns:
true if the message is in the cache; false otherwise.

The documentation for this class was generated from the following file:

Generated on Wed May 17 14:21:15 2017 for SimbaEngine 10.1.3.1011 by simba