View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0028172 | Community | OCCT:Coding | public | 2016-11-29 07:35 | 2019-07-10 19:59 |
Reporter | Vico Liang | Assigned To | kgv | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | no change required | ||
Summary | 0028172: Replace Standard_CString file path with Unicode form TCollection_ExtendedString | ||||
Description | There are several classes still use the raw file path form Standard_CString, it's better to unify file path uasge by using TCollection_ExtendedString. Listed partial interfaces need to be updated: class BRepTools static Standard_Boolean Write (const TopoDS_Shape& Sh, const Standard_CString File, const Handle(Message_ProgressIndicator)& PR = NULL); static Standard_Boolean Read (TopoDS_Shape& Sh, const Standard_CString File, const BRep_Builder& B, const Handle(Message_ProgressIndicator)& PR = NULL); class BinTools static Standard_Boolean Write (const TopoDS_Shape& theShape, const Standard_CString theFile); Standard_Boolean Read (TopoDS_Shape& theShape, const Standard_CString theFile); class ShapeProcess_Context ShapeProcess_Context(const Standard_CString file, const Standard_CString scope = ""); Standard_Boolean Init (const Standard_CString file, const Standard_CString scope = ""); Handle(Resource_Manager) LoadResourceManager (const Standard_CString file); class Font_FontMgr Handle(Font_SystemFont) CheckFont (const Standard_CString theFontPath) const; class OpenGl_View virtual Standard_Boolean Export (const Standard_CString theFileName, const Graphic3d_ExportFormat theFormat, const Graphic3d_SortType theSortType = Graphic3d_ST_BSP_Tree) Standard_OVERRIDE; class StlAPI static void Read (TopoDS_Shape& aShape, const Standard_CString aFile); static StlAPI_ErrorStatus Write (const TopoDS_Shape& aShape, const Standard_CString aFile, const Standard_Boolean aAsciiMode = Standard_True); class StlAPI_Reader void Read (TopoDS_Shape& aShape, const Standard_CString aFileName); class StlAPI_Writer StlAPI_ErrorStatus Write(const TopoDS_Shape& theShape, const Standard_CString theFileName) class STEPControl_Writer IFSelect_ReturnStatus Write (const Standard_CString filename) class STEPCAFControl_Reader IFSelect_ReturnStatus ReadFile (const Standard_CString filename) Standard_Boolean Perform (const Standard_CString filename, Handle(TDocStd_Document) &doc) Standard_Boolean Perform (const TCollection_AsciiString &filename, Handle(TDocStd_Document) &doc) class STEPCAFControl_Writer IFSelect_ReturnStatus Write (const Standard_CString filename) | ||||
Tags | No tags attached. | ||||
Test case number | |||||
|
> it's better to unify file path uasge by using TCollection_ExtendedString There is NO intention of using TCollection_ExtendedString across OCCT for file paths (apart from already existing occurrences like in OCAF - for historical reasons). TCollection_ExtendedString represents UTF-16 which makes no sense on most platforms save the Windows. Therefore Standard_CString can be potentially replaced by TCollection_AsciiString (UTF-8) in these interfaces. |
|
Dear kgv, The best practice would be a uniform interface for external user. Therefore OCCT users don't have to consider to use diference file path in diference functions and it would be easy to lean and it also improves the work productivity. |
|
It is already unified - 99% places use Standard_CString in OCCT for passing file paths. There are only few exceptions. |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-11-29 07:35 | Vico Liang | New Issue | |
2016-11-29 07:35 | Vico Liang | Assigned To | => kgv |
2016-11-29 07:53 | kgv | Note Added: 0060826 | |
2016-11-29 07:53 | kgv | Note Edited: 0060826 | |
2016-11-29 07:54 | kgv | Note Edited: 0060826 | |
2016-11-29 07:55 | kgv | Relationship added | related to 0022484 |
2016-11-29 08:40 | Vico Liang | Note Added: 0060827 | |
2016-11-29 08:43 | kgv | Note Added: 0060828 | |
2016-11-29 08:44 | kgv | Relationship added | related to 0025534 |
2017-07-20 11:41 | kgv | Target Version | 7.2.0 => 7.4.0 |
2019-07-10 19:59 |
|
Status | new => closed |
2019-07-10 19:59 |
|
Resolution | open => no change required |
2019-07-10 19:59 |
|
Target Version | 7.4.0 => |