Go to the
documentation of this file.
00001
00004 #ifndef FBXFILESDK_FBXCORE_FBXXREF_KFBXREF_H
00005 #define FBXFILESDK_FBXCORE_FBXXREF_KFBXREF_H
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #include <fbxfilesdk/fbxcore/fbxxref/fbxxref_def.h>
00043
00044 #include <fbxfilesdk/kfbxplugins/kfbxsdkmanager.h>
00045
00046 namespace FBXXREF_NAMESPACE {
00047
00048 class KXRefManagerProject;
00049 class KFbxDocument;
00050
00051
00055 class KFBX_DLL KFbxXRefManager {
00056 public:
00057
00059 KFbxXRefManager();
00060
00062 virtual ~KFbxXRefManager();
00063
00068
00070 static const char* sTemporaryFileProject;
00071
00073 static const char* sConfigurationProject;
00074
00076 static const char* sLocalizationProject;
00077
00088 static const char* sEmbeddedFileProject;
00090
00091 public:
00092
00101 static int GetUrlCount(KFbxProperty const &pProperty);
00102
00108 static int GetUrlCount(fbxString const& pUrl);
00109
00115 static bool IsRelativeUrl (KFbxProperty const &pProperty,int pIndex);
00116
00122 static KString GetUrl(KFbxProperty const &pProperty,int pIndex);
00123
00130 bool GetResolvedUrl (KFbxProperty const &pProperty,int pIndex,KString & pResolvedPath) const;
00131
00138 bool GetResolvedUrl (char const* pUrl, KFbxDocument* pDoc, KString& pResolvedPath) const;
00140
00158 bool GetFirstMatchingUrl(char const* pPrefix, char const* pOptExt, const KFbxDocument* pDoc, KString& pResolvedPath) const;
00159
00164
00172 bool AddXRefProject (const char *pName,const char *pUrl);
00173
00182 bool AddXRefProject (const char *pName,const char *pExtension,const char *pUrl);
00183
00190 bool AddXRefProject (KFbxDocument* pDoc);
00191
00196 bool RemoveXRefProject(const char *pName);
00197
00201 bool RemoveAllXRefProjects();
00202
00206 int GetXRefProjectCount() const;
00207
00212 const char *GetXRefProjectName(int pIndex) const;
00213
00218 const char* GetXRefProjectUrl(const char* pName);
00219
00224 const char* GetXRefProjectUrl(const char* pName) const;
00225
00230 const char* GetXRefProjectUrl(int pIndex) const;
00231
00236 inline bool HasXRefProject( const char* pName ) { return GetXRefProjectUrl(pName) != NULL; }
00237
00243 bool GetResolvedUrl (char const *pUrl,KString & pResolvePath) const;
00244
00246 private:
00247 KArrayTemplate<KXRefManagerProject*> mProjects;
00248
00249 static bool UrlExist(const char* pUrl);
00250 };
00251
00252 }
00253
00254 #endif // FBXFILESDK_FBXCORE_FBXXREF_KFBXREF_H
00255