fbxsdk/core/fbxxref.h Source File

fbxxref.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_XREF_H_
14 #define _FBXSDK_CORE_XREF_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
20 
21 #include <fbxsdk/fbxsdk_nsbegin.h>
22 
23 class FbxProperty;
24 class FbxDocument;
25 class FbxXRefManagerProject;
26 
31 {
32 public:
35 
37  virtual ~FbxXRefManager();
38 
43 
45  static const char* sTemporaryFileProject;
46 
48  static const char* sConfigurationProject;
49 
51  static const char* sLocalizationProject;
52 
63  static const char* sEmbeddedFileProject;
65 
74  static int GetUrlCount(FbxProperty const &pProperty);
75 
81  static int GetUrlCount(FbxString const& pUrl);
82 
88  static bool IsRelativeUrl (FbxProperty const &pProperty,int pIndex);
89 
95  static FbxString GetUrl(FbxProperty const &pProperty,int pIndex);
96 
103  bool GetResolvedUrl (FbxProperty const &pProperty,int pIndex,FbxString & pResolvedPath) const;
104 
111  bool GetResolvedUrl (const char* pUrl, FbxDocument* pDoc, FbxString& pResolvedPath) const;
113 
131  bool GetFirstMatchingUrl(const char* pPrefix, const char* pOptExt, const FbxDocument* pDoc, FbxString& pResolvedPath) const;
132 
137 
145  bool AddXRefProject (const char *pName,const char *pUrl);
146 
155  bool AddXRefProject (const char *pName,const char *pExtension,const char *pUrl);
156 
163  bool AddXRefProject (FbxDocument* pDoc);
164 
169  bool RemoveXRefProject(const char *pName);
170 
174  bool RemoveAllXRefProjects();
175 
179  int GetXRefProjectCount() const;
180 
185  const char *GetXRefProjectName(int pIndex) const;
186 
191  const char* GetXRefProjectUrl(const char* pName); // FIXME: Should be const, will break AV.
192 
197  const char* GetXRefProjectUrl(const char* pName) const;
198 
203  const char* GetXRefProjectUrl(int pIndex) const;
204 
209  inline bool HasXRefProject( const char* pName ) { return GetXRefProjectUrl(pName) != NULL; }
210 
216  bool GetResolvedUrl (const char* pUrl,FbxString & pResolvePath) const;
217 
219 private:
221 
222  static bool UrlExist(const char* pUrl);
223 };
224 
225 #include <fbxsdk/fbxsdk_nsend.h>
226 
227 #endif /* _FBXSDK_CORE_XREF_H_ */
FBX SDK environment definition.
static const char * sTemporaryFileProject
This project represents an URL for storing temporary files.
Definition: fbxxref.h:45
#define NULL
Definition: fbxarch.h:210
Utility class to manipulate strings.
Definition: fbxstring.h:66
FbxDocument is a base class for FbxScene and FbxLibrary classes.
Definition: fbxdocument.h:46
bool HasXRefProject(const char *pName)
Checks if a project with the given name is defined in this manager.
Definition: fbxxref.h:209
static const char * sConfigurationProject
This project represents an URL for configuration files.
Definition: fbxxref.h:48
This class manages external references to files.
Definition: fbxxref.h:30
Class to hold user properties.
Definition: fbxproperty.h:37
#define FBXSDK_DLL
Definition: fbxarch.h:173
static const char * sEmbeddedFileProject
This project is used for creating the ".fbm" folders that are used for storing embedded resources in ...
Definition: fbxxref.h:63
static const char * sLocalizationProject
This project represents an URL for storing localization files (that is not part of the asset library)...
Definition: fbxxref.h:51