- Main Page
- Classes
- Files
- Directories

- File List
- File Members

# fbxxref.h

Go to the documentation of this file.

    00001 /****************************************************************************************
    00002
    00003    Copyright (C) 2013 Autodesk, Inc.
    00004    All rights reserved.
    00005
    00006    Use of this software is subject to the terms of the Autodesk license agreement
    00007    provided at the time of installation or download, or which otherwise accompanies
    00008    this software in either electronic or hard copy form.
    00009
    00010 ****************************************************************************************/
    00011
    00013 #ifndef _FBXSDK_CORE_XREF_H_
    00014 #define _FBXSDK_CORE_XREF_H_
    00015
    00016 #include <fbxsdk/fbxsdk_def.h>
    00017
    00018 #include <fbxsdk/core/base/fbxarray.h>
    00019 #include <fbxsdk/core/base/fbxstring.h>
    00020
    00021 #include <fbxsdk/fbxsdk_nsbegin.h>
    00022
    00023 class FbxProperty;
    00024 class FbxDocument;
    00025 class FbxXRefManagerProject;
    00026
    00030 class FBXSDK_DLL FbxXRefManager
    00031 {
    00032 public:
    00034     FbxXRefManager();
    00035
    00037     virtual ~FbxXRefManager();
    00038
    00043
    00045         static const char* sTemporaryFileProject;
    00046
    00048         static const char* sConfigurationProject;
    00049
    00051         static const char* sLocalizationProject;
    00052
    00063         static const char* sEmbeddedFileProject;
    00065
    00074         static int     GetUrlCount(FbxProperty const &pProperty);
    00075
    00081         static int     GetUrlCount(FbxString const& pUrl);
    00082
    00088         static bool IsRelativeUrl  (FbxProperty const &pProperty,int pIndex);
    00089
    00095         static FbxString GetUrl(FbxProperty const &pProperty,int pIndex);
    00096
    00103         bool GetResolvedUrl (FbxProperty const &pProperty,int pIndex,FbxString & pResolvedPath) const;
    00104
    00111         bool GetResolvedUrl (char const* pUrl, FbxDocument* pDoc, FbxString& pResolvedPath) const;
    00113
    00131         bool GetFirstMatchingUrl(char const* pPrefix, char const* pOptExt, const FbxDocument* pDoc, FbxString& pResolvedPath) const;
    00132
    00137
    00145         bool        AddXRefProject   (const char *pName,const char *pUrl);
    00146
    00155         bool        AddXRefProject   (const char *pName,const char *pExtension,const char *pUrl);
    00156
    00163         bool        AddXRefProject   (FbxDocument* pDoc);
    00164
    00169         bool        RemoveXRefProject(const char *pName);
    00170
    00174         bool        RemoveAllXRefProjects();
    00175
    00179         int         GetXRefProjectCount() const;
    00180
    00185         const char *GetXRefProjectName(int pIndex) const;
    00186
    00191         const char* GetXRefProjectUrl(const char* pName);   // FIXME: Should be const, will break AV.
    00192
    00197         const char* GetXRefProjectUrl(const char* pName) const;
    00198
    00203         const char* GetXRefProjectUrl(int pIndex) const;
    00204
    00209         inline bool HasXRefProject( const char* pName ) { return GetXRefProjectUrl(pName) != NULL; }
    00210
    00216         bool GetResolvedUrl (char const *pUrl,FbxString & pResolvePath) const;
    00217
    00219 private:
    00220     FbxArray<FbxXRefManagerProject*>    mProjects;
    00221
    00222     static bool UrlExist(const char* pUrl);
    00223 };
    00224
    00225 #include <fbxsdk/fbxsdk_nsend.h>
    00226
    00227 #endif /* _FBXSDK_CORE_XREF_H_ */