// This file is generated by WOK (CPPExt). // Please do not edit this file; modify original file instead. // The copyright and license terms as defined for the original file apply to // this header file considered to be the "object code" form of the original source. #ifndef _Resource_Unicode_HeaderFile #define _Resource_Unicode_HeaderFile #ifndef _Standard_HeaderFile #include #endif #ifndef _Standard_Macro_HeaderFile #include #endif #ifndef _Standard_CString_HeaderFile #include #endif #ifndef _Standard_Boolean_HeaderFile #include #endif #ifndef _Standard_PCharacter_HeaderFile #include #endif #ifndef _Standard_Integer_HeaderFile #include #endif #ifndef _Resource_FormatType_HeaderFile #include #endif class TCollection_ExtendedString; //! This class provides functions used to convert a non-ASCII C string
//! given in ANSI, EUC, GB or SJIS format, to a
//! Unicode string of extended characters, and vice versa.
class Resource_Unicode { public: void* operator new(size_t,void* anAddress) { return anAddress; } void* operator new(size_t size) { return Standard::Allocate(size); } void operator delete(void *anAddress) { if (anAddress) Standard::Free((Standard_Address&)anAddress); } //! Converts non-ASCII CString in SJIS format
//! to Unicode ExtendedString .
Standard_EXPORT static void ConvertSJISToUnicode(const Standard_CString fromstr,TCollection_ExtendedString& tostr) ; //! Converts non-ASCII CString in EUC format
//! to Unicode ExtendedString .
Standard_EXPORT static void ConvertEUCToUnicode(const Standard_CString fromstr,TCollection_ExtendedString& tostr) ; //! Converts non-ASCII CString in GB format
//! to Unicode ExtendedString .
Standard_EXPORT static void ConvertGBToUnicode(const Standard_CString fromstr,TCollection_ExtendedString& tostr) ; //! Converts non-ASCII CString in ANSI format
//! to Unicode ExtendedString .
Standard_EXPORT static void ConvertANSIToUnicode(const Standard_CString fromstr,TCollection_ExtendedString& tostr) ; //! Converts Unicode ExtendedString to non-ASCII
//! CString in SJIS format, limited to
//! characters. To translate the whole , use more
//! than twice the length of . Returns true if
//! has not been reached before end of conversion.
Standard_EXPORT static Standard_Boolean ConvertUnicodeToSJIS(const TCollection_ExtendedString& fromstr,Standard_PCharacter& tostr,const Standard_Integer maxsize) ; //! Converts Unicode ExtendedString to non-ASCII
//! CString in EUC format, limited to
//! characters. To translate the whole , use more
//! than twice the length of . Returns true if
//! has not been reached before end of conversion.
Standard_EXPORT static Standard_Boolean ConvertUnicodeToEUC(const TCollection_ExtendedString& fromstr,Standard_PCharacter& tostr,const Standard_Integer maxsize) ; //! Converts Unicode ExtendedString to non-ASCII
//! CString in GB format, limited to
//! characters. To translate the whole , use more
//! than twice the length of . Returns true if
//! has not been reached before end of conversion.
Standard_EXPORT static Standard_Boolean ConvertUnicodeToGB(const TCollection_ExtendedString& fromstr,Standard_PCharacter& tostr,const Standard_Integer maxsize) ; //! Converts Unicode ExtendedString to non-ASCII
//! CString in ANSI format, limited to
//! characters. To translate the whole , use more
//! than twice the length of . Returns true if
//! has not been reached before end of conversion.
Standard_EXPORT static Standard_Boolean ConvertUnicodeToANSI(const TCollection_ExtendedString& fromstr,Standard_PCharacter& tostr,const Standard_Integer maxsize) ; //! Defines the current conversion format as typecode.
//! This conversion format will then be used by the
//! functions ConvertFormatToUnicode and
//! ConvertUnicodeToFormat to convert the strings.
Standard_EXPORT static void SetFormat(const Resource_FormatType typecode) ; //! Returns the current conversion format (either
//! ANSI, EUC, GB or SJIS).
//! The current converting format must be defined in
//! advance with the SetFormat function.
Standard_EXPORT static Resource_FormatType GetFormat() ; //! Reads converting format from resource "FormatType"
//! in Resource Manager "CharSet"
Standard_EXPORT static void ReadFormat() ; //! Converts the non-ASCII C string fromstr to the
//! Unicode string of extended characters tostr.
//! fromstr is translated according to the format
//! (either ANSI, EUC, GB or SJIS) returned by the function GetFormat.
Standard_EXPORT static void ConvertFormatToUnicode(const Standard_CString fromstr,TCollection_ExtendedString& tostr) ; //! Converts the Unicode string of extended
//! characters fromstr to the non-ASCII C string
//! tostr according to the format (either ANSI, EUC,
//! GB or SJIS) returned by the function GetFormat.
//! maxsize limits the size of the string tostr to a
//! maximum number of characters. You need more
//! than twice the length of the string fromstr to
//! complete the conversion.
//! The function returns true if conversion is
//! complete, i.e. the maximum number of characters
//! maxsize is not reached by tostr before the end
//! of conversion of fromstr.
Standard_EXPORT static Standard_Boolean ConvertUnicodeToFormat(const TCollection_ExtendedString& fromstr,Standard_PCharacter& tostr,const Standard_Integer maxsize) ; protected: private: }; // other Inline functions and methods (like "C++: function call" methods) #endif