+
+class wxPluralFormsCalculator;
+wxDECLARE_SCOPED_PTR(wxPluralFormsCalculator, wxPluralFormsCalculatorPtr)
+
+// ----------------------------------------------------------------------------
+// wxMsgCatalog corresponds to one loaded message catalog.
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxMsgCatalog
+{
+public:
+ // Ctor is protected, because CreateFromXXX functions must be used,
+ // but destruction should be unrestricted
+#if !wxUSE_UNICODE
+ ~wxMsgCatalog();
+#endif
+
+ // load the catalog from disk or from data; caller is responsible for
+ // deleting them if not NULL
+ static wxMsgCatalog *CreateFromFile(const wxString& filename,
+ const wxString& domain);
+
+ static wxMsgCatalog *CreateFromData(const wxScopedCharBuffer& data,
+ const wxString& domain);
+
+ // get name of the catalog
+ wxString GetDomain() const { return m_domain; }
+
+ // get the translated string: returns NULL if not found
+ const wxString *GetString(const wxString& sz, unsigned n = UINT_MAX) const;
+
+protected:
+ wxMsgCatalog(const wxString& domain)
+ : m_pNext(NULL), m_domain(domain)
+#if !wxUSE_UNICODE
+ , m_conv(NULL)
+#endif
+ {}
+
+private:
+ // variable pointing to the next element in a linked list (or NULL)
+ wxMsgCatalog *m_pNext;
+ friend class wxTranslations;
+
+ wxStringToStringHashMap m_messages; // all messages in the catalog
+ wxString m_domain; // name of the domain
+
+#if !wxUSE_UNICODE
+ // the conversion corresponding to this catalog charset if we installed it
+ // as the global one
+ wxCSConv *m_conv;
+#endif
+
+ wxPluralFormsCalculatorPtr m_pluralFormsCalculator;
+};