- wxCSConv(const wxChar *charset);
- virtual ~wxCSConv();
- void LoadNow();
- virtual size_t MB2WC(wchar_t *buf, const char *psz, size_t n) const;
- virtual size_t WC2MB(char *buf, const wchar_t *psz, size_t n) const;
+ // we can be created either from charset name or from an encoding constant
+ // but we can't have both at once
+ wxCSConv(const wxChar *charset);
+ wxCSConv(wxFontEncoding encoding);
+
+ wxCSConv(const wxCSConv& conv);
+ virtual ~wxCSConv();
+
+ wxCSConv& operator=(const wxCSConv& conv);
+
+ virtual size_t MB2WC(wchar_t *buf, const char *psz, size_t n) const;
+ virtual size_t WC2MB(char *buf, const wchar_t *psz, size_t n) const;
+
+ void Clear() ;
+
+private:
+ // common part of all ctors
+ void Init();
+
+ // creates m_convReal if necessary
+ void CreateConvIfNeeded() const;
+
+ // do create m_convReal (unconditionally)
+ wxMBConv *DoCreate() const;
+
+ // set the name (may be only called when m_name == NULL), makes copy of
+ // charset string
+ void SetName(const wxChar *charset);
+
+
+ // note that we can't use wxString here because of compilation
+ // dependencies: we're included from wx/string.h
+ wxChar *m_name;
+ wxFontEncoding m_encoding;
+
+ // use CreateConvIfNeeded() before accessing m_convReal!
+ wxMBConv *m_convReal;
+ bool m_deferred;