KFbxXRefManager
#include<kfbxref.h>

List of all members.

Detailed Description

This class manages external references to files.

Definition at line51of filekfbxref.h.


XRef Url properties

bool GetResolvedUrl(KFbxPropertyconst&pProperty, int pIndex,KString&pResolvedPath) const
 Return The nth Relative Url stored in the property upon return the pXRefProject will return the name of the XRef Project closest to the Url of the property.
static int GetUrlCount(KFbxPropertyconst&pProperty)
 Get the number of Urls stored in a property.
static int GetUrlCount(fbxStringconst&pUrl)
 Return The nth Relative Url stored in the property upon return the pXRefProject will return the name of the XRef Project closest to the Url of the property.
static bool IsRelativeUrl(KFbxPropertyconst&pProperty, int pIndex)
 Return The nth Relative Url stored in the property upon return the pXRefProject will return the name of the XRef Project closest to the Url of the property.
staticKString GetUrl(KFbxPropertyconst&pProperty, int pIndex)
 Return The nth Url stored in the property.

Public Member Functions

bool GetFirstMatchingUrl(char const *pPrefix, char const *pOptExt, constKFbxDocument*pDoc,KString&pResolvedPath) const
 Looks for the first file matching a specified "pattern", which is built as:.
XRef Resolve Url and Projects
bool AddXRefProject(const char *pName, const char *pUrl)
 Add XRef Projects.
bool AddXRefProject(const char *pName, const char *pExtension, const char *pUrl)
 Add XRef Projects.
bool AddXRefProject(KFbxDocument*)
 Add an XRef project based on a document's EmbeddedUrl property, if set, otherwise based on its current Url.
bool RemoveXRefProject(const char *pName)
 Add XRef Projects.
bool RemoveAllXRefProjects()
 Add XRef Projects.
int GetXRefProjectCount() const
 Add XRef Projects.
const char * GetXRefProjectName(int pIndex) const
 Add XRef Projects.
const char * GetXRefProjectUrl(const char *pName)
 Retrieve the base Url for the given project.
const char * GetXRefProjectUrl(const char *pName) const
 Add XRef Projects.
const char * GetXRefProjectUrl(int pIndex) const
 Add XRef Projects.
bool HasXRefProject(const char *pName)
 Check if a project with the given name is defined in this manager.
bool GetResolvedUrl(char const *pUrl,KString&pResolvePath) const
 Return Try to resolve an Relative Url.

Static Public Attributes

Pre-defined Project Types
static const char * sTemporaryFileProject
 This project represents a Url for storing temporary files.
static const char * sConfigurationProject
 This project represents a Url for configuration files.
static const char * sLocalizationProject
 This project represents a url for storing localization files (not part of the asset lib).
static const char * sEmbeddedFileProject
 This project is used for creating the .fbm folders used by embedded ressources in .fbx files.

Member Function Documentation

static int GetUrlCount(KFbxPropertyconst& pProperty ) [static]

Get the number of Urls stored in a property.

Returns:
The Url Count

static int GetUrlCount(fbxStringconst& pUrl ) [static]

Return The nth Relative Url stored in the property upon return the pXRefProject will return the name of the XRef Project closest to the Url of the property.

Returns:
The Url if it is valid relative

static bool IsRelativeUrl(KFbxPropertyconst& pProperty,
int pIndex 
)[static]

Return The nth Relative Url stored in the property upon return the pXRefProject will return the name of the XRef Project closest to the Url of the property.

Returns:
The Url if it is valid relative

staticKStringGetUrl(KFbxPropertyconst& pProperty,
int pIndex 
)[static]

Return The nth Url stored in the property.

Returns:
The Url

bool GetResolvedUrl(KFbxPropertyconst& pProperty,
int pIndex,
KStringpResolvedPath 
)const

Return The nth Relative Url stored in the property upon return the pXRefProject will return the name of the XRef Project closest to the Url of the property.

Returns:
The Url if it is valid relative

bool GetFirstMatchingUrl(char const * pPrefix,
char const * pOptExt,
constKFbxDocumentpDoc,
KStringpResolvedPath 
)const

Looks for the first file matching a specified "pattern", which is built as:.

if pOptExt is given: prefix*.ext If pOptExt is NULL: prefix* if pOptExt is "" or ".": prefix*.

Returns the URL of the first matching pattern. Cannot be used to resolve folders, only files.

If a document is given, we start by looking at the document's fbm folder.

bool AddXRefProject(const char * pName,
const char * pUrl 
)

Add XRef Projects.

Note that only one Url is associated with a project. Calling this on an existing project will replace the project's existing Url.

Parameters:
pName The name of the project
pUrl The Url to associate with the project
Returns:
true on success, false otherwise.

bool AddXRefProject(const char * pName,
const char * pExtension,
const char * pUrl 
)

Add XRef Projects.

Note that only one Url is associated with a project. Calling this on an existing project will replace the project's existing Url.

Parameters:
pName The name of the project
pUrl The Url to associate with the project
Returns:
true on success, false otherwise.

bool AddXRefProject(KFbxDocument ) 

Add an XRef project based on a document's EmbeddedUrl property, if set, otherwise based on its current Url.

Parameters:
Document to use to name the project, and to specify the Url.
Returns:
true on success, false otherwise.

bool RemoveXRefProject(const char * pName ) 

Add XRef Projects.

Note that only one Url is associated with a project. Calling this on an existing project will replace the project's existing Url.

Parameters:
pName The name of the project
pUrl The Url to associate with the project
Returns:
true on success, false otherwise.

bool RemoveAllXRefProjects( ) 

Add XRef Projects.

Note that only one Url is associated with a project. Calling this on an existing project will replace the project's existing Url.

Parameters:
pName The name of the project
pUrl The Url to associate with the project
Returns:
true on success, false otherwise.

int GetXRefProjectCount( ) const

Add XRef Projects.

Note that only one Url is associated with a project. Calling this on an existing project will replace the project's existing Url.

Parameters:
pName The name of the project
pUrl The Url to associate with the project
Returns:
true on success, false otherwise.

const char* GetXRefProjectName(int pIndex ) const

Add XRef Projects.

Note that only one Url is associated with a project. Calling this on an existing project will replace the project's existing Url.

Parameters:
pName The name of the project
pUrl The Url to associate with the project
Returns:
true on success, false otherwise.

const char* GetXRefProjectUrl(const char * pName ) 

Retrieve the base Url for the given project.

Parameters:
pName The name of the project
Returns:
The base Url of the project or NULL if the Project is not found.

const char* GetXRefProjectUrl(const char * pName ) const

Add XRef Projects.

Note that only one Url is associated with a project. Calling this on an existing project will replace the project's existing Url.

Parameters:
pName The name of the project
pUrl The Url to associate with the project
Returns:
true on success, false otherwise.

const char* GetXRefProjectUrl(int pIndex ) const

Add XRef Projects.

Note that only one Url is associated with a project. Calling this on an existing project will replace the project's existing Url.

Parameters:
pName The name of the project
pUrl The Url to associate with the project
Returns:
true on success, false otherwise.

bool HasXRefProject(const char * pName ) [inline]

Check if a project with the given name is defined in this manager.

Definition at line170of filekfbxref.h.

bool GetResolvedUrl(char const * pUrl,
KStringpResolvePath 
)const

Return Try to resolve an Relative Url.

Returns:
true if the Url is resolved

Member Data Documentation

const char*sTemporaryFileProject[static]

This project represents a Url for storing temporary files.

Definition at line62of filekfbxref.h.

const char*sConfigurationProject[static]

This project represents a Url for configuration files.

Definition at line65of filekfbxref.h.

const char*sLocalizationProject[static]

This project represents a url for storing localization files (not part of the asset lib).

Definition at line68of filekfbxref.h.

const char*sEmbeddedFileProject[static]

This project is used for creating the .fbm folders used by embedded ressources in .fbx files.

When not set, or if the folder is not writable, the .fbm folder is created alongside the .fbx file.

If we cannot write in that folder, we look at the sTemporaryFileProject location. If that's not set, or not writable, we use the operating system's temp folder location.

Definition at line81of filekfbxref.h.