0027838: Foundation Classes - support wchar_t* input within TCollection_AsciiString... IR-2016-09-15
authorkgv <kgv@opencascade.com>
Sun, 4 Sep 2016 11:31:47 +0000 (14:31 +0300)
committerkgv <kgv@opencascade.com>
Thu, 15 Sep 2016 09:33:55 +0000 (12:33 +0300)
commitfb0b05319f52b12ba581e70f561234fe582c3dc3
treefa8070251988b0eee5b162f10829c2cd26ff31a9
parent935069d23d65b866e9cfb017c91163a0adee496a
0027838: Foundation Classes - support wchar_t* input within TCollection_AsciiString and TCollection_ExtendedString

TCollection_ExtendedString/TCollection_AsciiString description
has been updated to reflect usage of this classes for Unicode strings.

TCollection_ExtendedString now defines constructor taking wchar_t* (all platforms)
and method ::ToWideString() returning wchar_t* (Windows only).
TCollection_AsciiString now defines constructor taking wchar_t*.

TCollection_ExtendedString/TCollection_AsciiString now defines
auxiliary methods ::StartsWith() and ::EndsWith().

TCollection_ExtendedString internals has been updated to eliminate
duplicated code for converting between UTF-16 and UTF-8.

Code has been cleaned up from redundant explicit conversions to wchar_t*.
Global method OSD_OpenStream()/OSD_OpenFileBuf() have been replaced
by C++ template to eliminate copy-paste for different STL collections.

OSD_SharedLibrary now uses wide-char system API call LoadLibraryExW()
on Windows for consistency.

New macro Standard_UNUSED has been added for marking possibly unused functions and variables
(to suppress gcc/clang compiler warnings).
33 files changed:
src/AIS/AIS_Dimension.cxx
src/AIS/AIS_TextLabel.cxx
src/BRepTools/BRepTools.cxx
src/BinTools/BinTools.cxx
src/Draw/Draw_VariableCommands.cxx
src/FSD/FSD_CmpFile.cxx
src/FSD/FSD_File.cxx
src/Graphic3d/Graphic3d_Group.cxx
src/Image/Image_AlienPixMap.cxx
src/NCollection/NCollection_UtfIterator.hxx
src/NCollection/NCollection_UtfIterator.lxx
src/NCollection/NCollection_UtfString.hxx
src/NCollection/NCollection_UtfString.lxx
src/OSD/OSD_Directory.cxx
src/OSD/OSD_DirectoryIterator.cxx
src/OSD/OSD_Disk.cxx
src/OSD/OSD_File.cxx
src/OSD/OSD_FileIterator.cxx
src/OSD/OSD_FileNode.cxx
src/OSD/OSD_OpenFile.cxx
src/OSD/OSD_OpenFile.hxx
src/OSD/OSD_Process.cxx
src/OSD/OSD_SharedLibrary.cxx
src/OpenGl/OpenGl_GraphicDriver.cxx
src/OpenGl/OpenGl_Text.cxx
src/Standard/Standard.cxx
src/Standard/Standard_Macro.hxx
src/TCollection/FILES
src/TCollection/TCollection_AsciiString.cxx
src/TCollection/TCollection_AsciiString.hxx
src/TCollection/TCollection_ExtendedString.cxx
src/TCollection/TCollection_ExtendedString.hxx
src/TCollection/TCollection_ExtendedString.lxx [deleted file]