refactor: 水池截面中转文件改用 CoreTools::getTempFilePath
删除 Pool3dCmd/PoolSectionTemp.h,JMDBDlg、JMSJDlg、HZQTDlg 共 7 处
改为 CoreTools::getTempFilePath(_T("JMSJ_"), _T(".sat"), 目录)。
同时修 getTempFilePath 自身的问题:
- 传了有效父目录时 sParentPath 没有赋值,会拼出 "\JMSJ_xxx.sat"
- 父目录为空时仍对 pszParentPath 调 _taccess,参数可能是 NULL
- return sPath(); 语法错误
- objId 用 %lu 格式化 Adesk::ULongPtr,64 位下会截断,改 %I64u
temp-file-naming.md 同步改为介绍这个通用函数。
This commit is contained in:
1 parent
8caea9e6bd
commit
4e658a8ae9
7 files changed
+71
-30
No files matched your search
@@ -485,5 +485,18 @@ public:
|
||||
// arInput 里面的曲线必须是同一平面内的,没有悬空边线
|
||||
// 并且确实组成了一个或者多个闭合的轮廓
|
||||
static AcDbPolyline* getOuterContour(const AcDbVoidPtrArray &arInput);
|
||||
|
||||
// 获得一个临时文件路径
|
||||
// pszFileMainName 是文件名称的主体部分,不包含后缀名, 在后面根据 bUsePID 决定是否加上进程号
|
||||
// pszFileSuffix 是文件后缀名, 例如 ".txt" 或者 ".jpg"
|
||||
// pszParentPath 是文件所在的父目录,如果为空,则使用系统临时目录
|
||||
// bUsePID 是否在文件名中加入进程号,避免同名冲突
|
||||
// objId 是实体id,如果不为空,则在文件名中加入实体id,避免同名冲突
|
||||
static CString getTempFilePath(LPCTSTR pszFileMainName
|
||||
, LPCTSTR pszFileSuffix
|
||||
, LPCTSTR pszParentPath = NULL
|
||||
, const bool &bUsePID = true
|
||||
, const AcDbObjectId &objId = AcDbObjectId::kNull
|
||||
);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user