Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00013 #ifndef _FBXSDK_CORE_BASE_UTILITIES_H_
00014 #define _FBXSDK_CORE_BASE_UTILITIES_H_
00015
00016 #include <fbxsdk/fbxsdk_def.h>
00017
00018 #include <fbxsdk/core/base/fbxstring.h>
00019 #include <fbxsdk/core/base/fbxstatus.h>
00020
00021 #include <fbxsdk/fbxsdk_nsbegin.h>
00022
00023 #ifndef FBXSDK_ENV_WINRT
00024
00026 FBXSDK_DLL FbxString FbxGetEnv(const char* pEnvVar);
00027
00030 FBXSDK_DLL FbxString FbxGetApplicationDirectory();
00031 #endif
00032
00035 FBXSDK_DLL FbxString FbxGetSystemTempPath();
00036
00039 FBXSDK_DLL void FbxSetSystemTempPath(const char* pPathUTF8);
00040
00043 FBXSDK_DLL FbxString FbxGetCurrentWorkPath();
00044
00046 FBXSDK_DLL void FbxSetCurrentWorkPath(const char* pPath_UTF8);
00047
00048 class FBXSDK_DLL FbxPathUtils
00049 {
00050 public:
00058 static FbxString Bind(const char* pRootPath, const char* pFilePath, bool pCleanPath=true);
00059
00064 static FbxString GetFolderName(const char* pFilePath);
00065
00072 static FbxString GetFileName(const char* pFilePath, bool pWithExtension=true);
00073
00079 static FbxString GetExtensionName(const char* pFilePath);
00080
00087 static FbxString ChangeExtension(const char* pFilePath, const char* pExtension);
00088
00090 static bool IsRelative(const char* pPath);
00091
00098 static FbxString GetRelativePath(const char* pRootPath, const char* pNewPath);
00099
00101 static FbxString GetRelativeFilePath(const char* pRootPath, const char* pNewFilePath);
00102
00106 static FbxString Resolve(const char* pRelPath);
00107
00109 static FbxString Clean(const char* pPath);
00110
00116 static FbxString GenerateFileName(const char* pFolder, const char* pPrefix);
00117
00122 static bool Exist(const char* pFolderPathUTF8);
00123
00128 static bool Create(const char* pFolderPathUTF8);
00129
00134 static bool Delete(const char* pFolderPathUTF8);
00135
00136 #ifndef FBXSDK_ENV_WINRT
00137
00140 static bool IsEmpty(const char* pFolderPath_UTF8);
00141 #endif
00142 };
00143
00146 class FBXSDK_DLL FbxStatusGlobal
00147 {
00148 public:
00149 static FbxStatus& GetRef()
00150 {
00151 if( !mStatusPtr )
00152 {
00153 mStatusPtr = FbxNew<FbxStatus>();
00154 }
00155 return *mStatusPtr;
00156 }
00157
00158 private:
00159 FbxStatusGlobal(){ mStatusPtr = NULL; }
00160 ~FbxStatusGlobal(){ FbxDelete<FbxStatus>(mStatusPtr); }
00161 static FbxStatusGlobal sgFbxStatusGlobal;
00162 static FbxStatus* mStatusPtr;
00163 };
00164
00165
00166 #include <fbxsdk/fbxsdk_nsend.h>
00167
00168 #endif