00001 #ifndef _KFBXKXREF_H
00002 #define _KFBXKXREF_H
00003
00004
00005
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 #include <fbxcore/fbxxref/fbxxref_def.h>
00040
00041 #include <kfbxplugins/kfbxsdkmanager.h>
00042
00043 namespace FBXXREF_NAMESPACE {
00044
00045 class KXRefManagerProject;
00046 class KFbxDocument;
00047
00048
00051 class FBXXREF_DLL KFbxXRefManager {
00052 public:
00053 KFbxXRefManager();
00054 virtual ~KFbxXRefManager();
00055
00060
00062 static const char* sTemporaryFileProject;
00063
00065 static const char* sConfigurationProject;
00066
00068 static const char* sLocalizationProject;
00069
00081 static const char* sEmbeddedFileProject;
00083
00084 public:
00085
00093 static int GetUrlCount(KFbxProperty const &pProperty);
00094 static int GetUrlCount(fbxString const& pUrl);
00095
00100 static bool IsRelativeUrl (KFbxProperty const &pProperty,int pIndex);
00101
00105 static KString GetUrl(KFbxProperty const &pProperty,int pIndex);
00106
00111 bool GetResolvedUrl (KFbxProperty const &pProperty,int pIndex,KString & pResolvedPath) const;
00113
00114
00115 bool GetResolvedUrl (char const* pUrl, KFbxDocument* pDoc, KString& pResolvedPath) const;
00116
00131 bool GetFirstMatchingUrl(char const* pPrefix, char const* pOptExt, const KFbxDocument* pDoc, KString& pResolvedPath) const;
00132
00137
00145 bool AddXRefProject (const char *pName,const char *pUrl);
00146 bool AddXRefProject (const char *pName,const char *pExtension,const char *pUrl);
00154 bool AddXRefProject (KFbxDocument*);
00155 bool RemoveXRefProject(const char *pName);
00156 bool RemoveAllXRefProjects();
00157
00158 int GetXRefProjectCount() const;
00159 const char *GetXRefProjectName(int pIndex) const;
00160
00165 const char* GetXRefProjectUrl(const char* pName);
00166 const char* GetXRefProjectUrl(const char* pName) const;
00167 const char* GetXRefProjectUrl(int pIndex) const;
00168
00170 inline bool HasXRefProject( const char* pName ) { return GetXRefProjectUrl(pName) != NULL; }
00171
00175 bool GetResolvedUrl (char const *pUrl,KString & pResolvePath) const;
00176
00178 private:
00179 KArrayTemplate<KXRefManagerProject*> mProjects;
00180
00181 static bool UrlExist(const char* pUrl);
00182 };
00183
00184 }
00185
00186 #endif // #ifndef _FBXKXREF_H
00187
00188