Public Member Functions | Protected Member Functions

KFbxExternalDocRefListener Class Reference

Search for all occurrences

Detailed Description

Typical handler for the referenced document events.

Register it like so: KFbxExternalDocRefListener lRefDocListener( sdkManager, fileName ); kfbxevents::KFbxEventHandler * lHandler = lRefDocListener.Bind(scene, &KFbxExternalDocRefListener::HandleEvent);

And later unregister it like so: lRefDocListener.Unbind(lHandler);

Definition at line 66 of file kfbxexternaldocreflistener.h.

#include <kfbxexternaldocreflistener.h>

Inheritance diagram for KFbxExternalDocRefListener:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  KFbxExternalDocRefListener (KFbxSdkManager &pManager, const KString &pDocFilePath)
  Constructor.
virtual  ~KFbxExternalDocRefListener ()
virtual void  SetDocumentFilePath (const KString &pDocFilePath)
  Set the document file path used to resolve documents.
virtual bool  AreAllExternalDocumentsStillValid () const
  Verify that all documents that were previously loaded in a previous load session are still valid.
virtual bool  WereAllExternalDocumentsValid () const
  Verify that all documents that were referred to didn't change.
virtual void  UnloadExternalDocuments ()
  Unload all documents that were loaded through this event handler.
virtual void  HandleEvent (const KFbxEventReferencedDocument *pEvent)
  External document reference event handler.

Protected Member Functions

virtual KString  MakeFilenameAbsolute (const KString &pFilename) const
  Turn a relative path to an absolute path using the file path of the original document being loaded.
virtual KFbxDocument FindDocument (const KString &pPathToDoc)
  Locate a document by its document path.
virtual KFbxDocument LoadDocument (KFbxObject *pParent, const KString &pClassName, const KString &pFilename)
  Load a library, potentially under another library.
virtual bool  ConnectToParentLibrary (const KFbxExternalDocumentInfo &)
  Try to connect a library to its parent given its document path.
virtual void  TryConnectingDanglingLibraries ()
  Try to reconnect dangling libraries that didn't find their parent.

Constructor & Destructor Documentation

KFbxExternalDocRefListener ( KFbxSdkManager pManager,
const KString pDocFilePath 
)

Constructor.

Parameters:
pManager
pDocFilePath
Remarks:
Keep a reference to the SDK and the path of the document to be able to resolve relative paths.
virtual ~KFbxExternalDocRefListener ( ) [virtual]

Member Function Documentation

virtual void SetDocumentFilePath ( const KString pDocFilePath ) [virtual]

Set the document file path used to resolve documents.

Parameters:
pDocFilePath
Remarks:
Allows re-using the same instance for multiple document loadings.
virtual bool AreAllExternalDocumentsStillValid ( ) const [virtual]

Verify that all documents that were previously loaded in a previous load session are still valid.

Returns:
true if all documents are still valid, false otherwise.
virtual bool WereAllExternalDocumentsValid ( ) const [virtual]

Verify that all documents that were referred to didn't change.

Returns:
true if all documents didn't change, false otherwise.
Remarks:
This function should be called if at posteriori check is desired.
virtual void UnloadExternalDocuments ( ) [virtual]

Unload all documents that were loaded through this event handler.

virtual void HandleEvent ( const KFbxEventReferencedDocument pEvent ) [virtual]

External document reference event handler.

Parameters:
pEvent
Remarks:
Operation: calls FindDocument() to find the specified external document and if not found calls LoadDocument() either directly, if it has not parent, or via ConnectToParentLibrary(). If its parent cannot be found, it's added to the dangling document list (and it is not loaded until it's parent is found). After, it tries to resolve dangling documents by calling TryConnectingDanglingLibraries().
virtual KString MakeFilenameAbsolute ( const KString pFilename ) const [protected, virtual]

Turn a relative path to an absolute path using the file path of the original document being loaded.

If the path is already is absolute, it is returned as is.

virtual KFbxDocument* FindDocument ( const KString pPathToDoc ) [protected, virtual]

Locate a document by its document path.

virtual KFbxDocument* LoadDocument ( KFbxObject pParent,
const KString pClassName,
const KString pFilename 
) [protected, virtual]

Load a library, potentially under another library.

virtual bool ConnectToParentLibrary ( const KFbxExternalDocumentInfo ) [protected, virtual]

Try to connect a library to its parent given its document path.

virtual void TryConnectingDanglingLibraries ( ) [protected, virtual]

Try to reconnect dangling libraries that didn't find their parent.


The documentation for this class was generated from the following file:

KFbxExternalDocRefListener KFbxExternalDocRefListener KFbxExternalDocRefListener KFbxExternalDocRefListener KFbxExternalDocRefListener KFbxExternalDocRefListener KFbxExternalDocRefListener KFbxExternalDocRefListener KFbxExternalDocRefListener KFbxExternalDocRefListener
KFbxExternalDocRefListener KFbxExternalDocRefListener KFbxExternalDocRefListener KFbxExternalDocRefListener KFbxExternalDocRefListener KFbxExternalDocRefListener KFbxExternalDocRefListener KFbxExternalDocRefListener KFbxExternalDocRefListener KFbxExternalDocRefListener