DSIXmlMessageReader Class Reference

This class represents a message reader for an XML source which can be reused for customer message sources provided the same format is used. More...

List of all members.

Public Member Functions

 DSIXmlMessageReader (const simba_wstring &in_fileName, const simba_string &in_locale, bool in_concatComponent=true, const std::map< simba_int32, simba_wstring > *in_componentNameOverrides=NULL)
 Constructor.
const simba_wstringGetActualPath ()
 Get the actual path of the file this reader is reading.
std::vector< simba_wstringGetCandidatePaths (bool in_quote) const
 Get a vector of candidate file paths for the location of the error message file associated with this object.
bool GetErrorMessage (const simba_wstring &in_messageID, simba_int32 in_packageID, const simba_wstring *in_messagePrefix, LocaleMessageCache &out_messages, bool &out_messageFound)
 Retrieves the specified message (and possibly others) into the given map.
bool GetErrorMessage (const simba_string &in_locale, const simba_wstring &in_messageID, simba_int32 in_packageID, simba_wstring &out_message, simba_int32 &out_nativeErrCode)
 DEPRECATED Retrieves the specified message with its associated error code.
const simba_wstringGetFileName () const
 Returns the name of the XML file (not including the path) that this DSIXmlMessageReader reads.
 ~DSIXmlMessageReader ()
 Destructor.

Detailed Description

This class represents a message reader for an XML source which can be reused for customer message sources provided the same format is used.


Constructor & Destructor Documentation

DSIXmlMessageReader ( const simba_wstring in_fileName,
const simba_string &  in_locale,
bool  in_concatComponent = true,
const std::map< simba_int32, simba_wstring > *  in_componentNameOverrides = NULL 
)

Constructor.

Parameters:
in_fileName The name of the XML file to open, with no path and no .xml suffix.
in_locale The locale for this reader.
in_concatComponent True if the component should be pre-pended to the error message.
in_componentNameOverrides If non-null, provides overridden names for the given components. This map may change, and should not be cached. It will outlive this object. (NOT OWN)

Destructor.


Member Function Documentation

const simba_wstring* GetActualPath (  ) 

Get the actual path of the file this reader is reading.

Note that the returned path will be quoted as described in GetCandidatePaths();

Returns:
The actual path of the file this reader is reading, or NULL if it failed to open all candidate paths.
std::vector<simba_wstring> GetCandidatePaths ( bool  in_quote  )  const

Get a vector of candidate file paths for the location of the error message file associated with this object.

Parameters:
in_quote If true, the paths will be enclosed in doublequote characters, and literal doublequotes will be replaced with doubled-doublequotes.
bool GetErrorMessage ( const simba_wstring in_messageID,
simba_int32  in_packageID,
const simba_wstring in_messagePrefix,
LocaleMessageCache out_messages,
bool &  out_messageFound 
)

Retrieves the specified message (and possibly others) into the given map.

Parameters:
in_messageID Unique message identifier.
in_packageID The packageID (equivalent to the source component ID).
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_messages The map to add all messages from this reader to.
out_messageFound Whether the specified message was found.
Returns:
True if the message file was opened successfully; false otherwise.
bool GetErrorMessage ( const simba_string &  in_locale,
const simba_wstring in_messageID,
simba_int32  in_packageID,
simba_wstring out_message,
simba_int32 &  out_nativeErrCode 
)

DEPRECATED Retrieves the specified message with its associated error code.

Parameters:
in_locale The locale.
in_messageID Unique message identifier.
in_packageID The packageID (equivalent to the source component ID).
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 file was opened successfully; false otherwise. Even if the error message cannot be found, True will be returned so long as the file was opened.
const simba_wstring& GetFileName (  )  const [inline]

Returns the name of the XML file (not including the path) that this DSIXmlMessageReader reads.

Returns:
The name of the XML file that this object reads.

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