FBX C++ API Reference
fbxutils.h
Go to the documentation of this file.
1 /****************************************************************************************
2 
3  Copyright (C) 2015 Autodesk, Inc.
4  All rights reserved.
5 
6  Use of this software is subject to the terms of the Autodesk license agreement
7  provided at the time of installation or download, or which otherwise accompanies
8  this software in either electronic or hard copy form.
9 
10 ****************************************************************************************/
11 
13 #ifndef _FBXSDK_CORE_BASE_UTILITIES_H_
14 #define _FBXSDK_CORE_BASE_UTILITIES_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
20 
21 #include <fbxsdk/fbxsdk_nsbegin.h>
22 
23 #ifndef FBXSDK_ENV_WINSTORE
24 
26  FBXSDK_DLL FbxString FbxGetEnv(const char* pEnvVar);
27 
31 #endif
32 
36 
43 FBXSDK_DLL bool FbxSetSystemTempPath(const char* pPathUTF8);
44 
48 
50 FBXSDK_DLL void FbxSetCurrentWorkPath(const char* pPath_UTF8);
51 
53 {
54 public:
62  static FbxString Bind(const char* pRootPath, const char* pFilePath, bool pCleanPath=true);
63 
68  static FbxString GetFolderName(const char* pFilePath);
69 
76  static FbxString GetFileName(const char* pFilePath, bool pWithExtension=true);
77 
83  static FbxString GetExtensionName(const char* pFilePath);
84 
91  static FbxString ChangeExtension(const char* pFilePath, const char* pExtension);
92 
94  static bool IsRelative(const char* pPath);
95 
102  static FbxString GetRelativePath(const char* pRootPath, const char* pNewPath);
103 
105  static FbxString GetRelativeFilePath(const char* pRootPath, const char* pNewFilePath);
106 
110  static FbxString Resolve(const char* pRelPath);
111 
113  static FbxString Clean(const char* pPath);
114 
120  static FbxString GenerateFileName(const char* pFolder, const char* pPrefix);
121 
126  static bool Exist(const char* pFolderPathUTF8);
127 
132  static bool Create(const char* pFolderPathUTF8);
133 
138  static bool Delete(const char* pFolderPathUTF8);
139 
140 #ifndef FBXSDK_ENV_WINSTORE
141 
144  static bool IsEmpty(const char* pFolderPath_UTF8);
145 #endif
146 };
147 
151 {
152 public:
153  static FbxStatus& GetRef()
154  {
155  if( !mStatusPtr )
156  {
157  mStatusPtr = FbxNew<FbxStatus>();
158  }
159  return *mStatusPtr;
160  }
161 
162 private:
163  FbxStatusGlobal(){ mStatusPtr = NULL; }
164  ~FbxStatusGlobal(){ FbxDelete<FbxStatus>(mStatusPtr); }
165  static FbxStatusGlobal sgFbxStatusGlobal;
166  static FbxStatus* mStatusPtr;
167 };
168 
169 
170 #include <fbxsdk/fbxsdk_nsend.h>
171 
172 #endif /* _FBXSDK_CORE_BASE_UTILITIES_H_ */
void FbxSetCurrentWorkPath(const char *pPath_UTF8)
Change the working directory of the system.
FBX SDK environment definition.
Global accessor to an FbxStatus object.
Definition: fbxutils.h:150
#define NULL
Definition: fbxarch.h:210
Utility class to manipulate strings.
Definition: fbxstring.h:66
This class facilitates the testing/reporting of errors.
Definition: fbxstatus.h:26
FbxString FbxGetSystemTempPath()
Retrieve the system temporary folder path name.
FbxString FbxGetEnv(const char *pEnvVar)
Retrieve the environment variable value.
FbxString FbxGetApplicationDirectory()
Get the application directory.
FbxString FbxGetCurrentWorkPath()
Retrieve the working directory of the system in UTF8 format.
static FbxStatus & GetRef()
Definition: fbxutils.h:153
#define FBXSDK_DLL
Definition: fbxarch.h:173
bool FbxSetSystemTempPath(const char *pPathUTF8)
Override the system temporary folder path name.