FBX C++ API Reference
|
#include <fbxusernotification.h>
This class accumulates user notifications and sends them to any device opened by the derived classes.
If this class is not derived, the data can only be sent to a log file. To send data to a log file, it must be opened before attempting to send data, otherwise, the messages will be lost.
Definition at line 111 of file fbxusernotification.h.
Classes | |
class | AESequence |
Identify one detail in all accumulator entries by record the entry object and its detail id. More... | |
Public Types | |
enum | EEntryID { eBindPoseInvalidObject, eBindPoseInvalidRoot, eBindPoseNotAllAncestorsNodes, eBindPoseNotAllDeformingNodes, eBindPoseNotAllAncestorsDefinitionNodes, eBindPoseRelativeMatrix, eEmbedMediaNotify, eFileIONotify, eFileIONotifyMaterial, eFileIONotifyDXFNotSupportNurbs, eEntryStartID } |
IDs for pre-defined message entries. More... | |
Public Member Functions | |
FbxUserNotification (FbxManager *pManager, FbxString const &pLogFileName, FbxString const &pSessionDescription) | |
Instantiate a FbxUserNotification but leave it uninitialized. More... | |
virtual | ~FbxUserNotification () |
Destructor. More... | |
void | InitAccumulator () |
Accumulator is to hold the notification entries. More... | |
void | ClearAccumulator () |
This method must be called when the Accumulator is no longer needed. More... | |
Accumulator Management | |
int | AddEntry (const int pID, const FbxString &pName, const FbxString &pDescr, FbxAccumulatorEntry::EClass pClass=FbxAccumulatorEntry::eWarning) |
Adds one entry into the accumulator. More... | |
int | AddDetail (int pEntryId) |
Completes the accumulator entry (there can be more that one detail for each entry) and implicitly defines the sequence of events. More... | |
int | AddDetail (int pEntryId, FbxString pString) |
Completes the accumulator entry (there can be more that one detail for each entry) and implicitly defines the sequence of events. More... | |
int | AddDetail (int pEntryId, FbxNode *pNode) |
Completes the accumulator entry (there can be more that one detail for each entry) and implicitly defines the sequence of events. More... | |
int | GetNbEntries () const |
Returns the number of AccumulatorEntries currently stored in this accumulator. More... | |
const FbxAccumulatorEntry * | GetEntry (int pEntryId) |
Get the specified FbxAccumulatorEntry. More... | |
const FbxAccumulatorEntry * | GetEntryAt (int pEntryIndex) const |
Get the FbxAccumulatorEntry at the specified index. More... | |
int | GetNbDetails () const |
Returns the number of Details recorded so far in this accumulator. More... | |
int | GetDetail (int pDetailId, const FbxAccumulatorEntry *&pAE) const |
Get the specified detail. More... | |
Utilities | |
virtual void | GetLogFilePath (FbxString &pPath) |
Returns the absolute path to the log file. More... | |
FbxString | GetLogFileName () |
Returns the log file name. More... | |
Static Public Member Functions | |
static FbxUserNotification * | Create (FbxManager *pManager, const FbxString &pLogFileName, const FbxString &pSessionDescription) |
Create and initialize user notification object for the SDK manager. More... | |
static void | Destroy (FbxManager *pManager) |
Destroy the global user notification object owned by the SDK manager. More... | |
Protected Member Functions | |
virtual bool | PostTerminate () |
Allow a derived class to finalize processing AFTER the log file handle has been deleted. More... | |
virtual void | AccumulatorInit () |
Allow the implementation class to perform accumulator initializations before the Extra devices are opened. More... | |
virtual void | AccumulatorClear () |
Allow the implementation class to perform accumulator clear after the Extra devices are closed. More... | |
virtual void | OpenExtraDevices () |
Allow the implementation class to opens its output devices (called by InitAccumulator). More... | |
virtual bool | SendToExtraDevices (bool pOutputNow, FbxArray< FbxAccumulatorEntry *> &pEntries) |
Allow the implementation class to send all the accumulator entries to the devices. More... | |
virtual bool | SendToExtraDevices (bool pOutputNow, FbxArray< AESequence *> &pAESequence) |
Allow the implementation class to send all the accumulator entries to the devices. More... | |
virtual bool | SendToExtraDevices (bool pOutputNow, const FbxAccumulatorEntry *pAccEntry, int pDetailId=-1) |
Allow the implementation class to send one accumulator entry to the devices. More... | |
virtual void | CloseExtraDevices () |
Allow the implementation class to close it's output devices (called in the ClearAccumulator) By default this method does nothing. More... | |
void | ResetAccumulator () |
Clears the Accumulator list, remove all user notification entries.. More... | |
void | ResetSequence () |
Clears the Sequence list. More... | |
void | SendToLog (EOutputSource pOutSrc, int pId) |
Send the pIdth element of the accumulator or sequence list to the log file. More... | |
void | SendToLog (const FbxAccumulatorEntry *pAccEntry, int pDetailId=-1) |
Send the accumulator entry to the log file. More... | |
Friends | |
class | FbxUserNotificationFilteredIterator |
Accumulator Output | |
enum | EOutputSource { eAccumulatorEntry, eSequencedDetails } |
Specify send what kind of data to output device. More... | |
bool | Output (EOutputSource pOutSrc=eAccumulatorEntry, int pIndex=-1, bool pExtraDevicesOnly=false) |
Send the accumulator entries to the output devices. More... | |
bool | OutputById (EEntryID pId, EOutputSource pOutSrc=eAccumulatorEntry, bool pExtraDevicesOnly=false) |
Send the accumulator entry to the output devices. More... | |
bool | Output (const FbxString &pName, const FbxString &pDescr, FbxAccumulatorEntry::EClass pClass, bool pExtraDevicesOnly=false) |
Send an immediate entry to the output devices. More... | |
bool | Output (FbxUserNotificationFilteredIterator &pAEFIter, bool pExtraDevicesOnly=false) |
Sends the content of the iterator to the output devices. More... | |
void | SetLogMessageEmitter (FbxMessageEmitter *pLogMessageEmitter) |
Set log message emitter. More... | |
enum EEntryID |
IDs for pre-defined message entries.
Definition at line 171 of file fbxusernotification.h.
enum EOutputSource |
Specify send what kind of data to output device.
Enumerator | |
---|---|
eAccumulatorEntry | Entry with its details. |
eSequencedDetails | Details in the recorded order. |
Definition at line 270 of file fbxusernotification.h.
FbxUserNotification | ( | FbxManager * | pManager, |
FbxString const & | pLogFileName, | ||
FbxString const & | pSessionDescription | ||
) |
Instantiate a FbxUserNotification but leave it uninitialized.
The caller must explicitly call InitAccumulator to initialize it and ClearAccumulator when finished using it.
pManager | |
pLogFileName | Name of the log file that will be open in the directory defined by the GetLogFilePath method. |
pSessionDescription | This string is used to separate session logs in the file. |
|
virtual |
Destructor.
|
static |
Create and initialize user notification object for the SDK manager.
One SDK manager has one global user notification object. If the SDK manager already has global user notification object, the function will do nothing.
pManager | |
pLogFileName | Name of the log file that will be open in the directory defined by the GetLogFilePath method. |
pSessionDescription | This string is used to separate session logs in the file. |
|
static |
Destroy the global user notification object owned by the SDK manager.
void InitAccumulator | ( | ) |
Accumulator is to hold the notification entries.
User can add entries to it. This method must be called before using the Accumulator. It opens the log file and calls AccumulatorInit followed by OpenExtraDevices. Failing to call this method will prevent other actions except ClearAccumulator, GetLogFileName and GetLogFilePath.
void ClearAccumulator | ( | ) |
This method must be called when the Accumulator is no longer needed.
It calls CloseExtraDevices, followed by the AccumulatorClear, and then closes the log file.
int AddEntry | ( | const int | pID, |
const FbxString & | pName, | ||
const FbxString & | pDescr, | ||
FbxAccumulatorEntry::EClass | pClass = FbxAccumulatorEntry::eWarning |
||
) |
Adds one entry into the accumulator.
pID | This entry unique ID. |
pName | This entry name. |
pDescr | The description of this entry. |
pClass | The category of this entry. |
int AddDetail | ( | int | pEntryId | ) |
Completes the accumulator entry (there can be more that one detail for each entry) and implicitly defines the sequence of events.
Each call to this method is internally recorded, making it possible to output each notification in the order they have been defined. Also, when a detail is added to an entry, it is automatically unmuted so it can be sent to the devices (muted FbxAccumulatorEntry objects are not processed).
pEntryId | The entry index (as returned by AddEntry). |
int AddDetail | ( | int | pEntryId, |
FbxString | pString | ||
) |
Completes the accumulator entry (there can be more that one detail for each entry) and implicitly defines the sequence of events.
Each call to this method is internally recorded, making it possible to output each notification in the order they have been defined. Also, when a detail is added to an entry, it is automatically unmuted so it can be sent to the devices (muted FbxAccumulatorEntry objects are not processed).
pEntryId | The entry index (as returned by AddEntry). |
pString | The detail string to add to the entry. |
int AddDetail | ( | int | pEntryId, |
FbxNode * | pNode | ||
) |
Completes the accumulator entry (there can be more that one detail for each entry) and implicitly defines the sequence of events.
Each call to this method is internally recorded, making it possible to output each notification in the order they have been defined. Also, when a detail is added to an entry, it is automatically unmuted so it can be sent to the devices (muted FbxAccumulatorEntry objects are not processed).
pEntryId | The entry index (as returned by AddEntry). |
pNode | The node to add to the entry. |
int GetNbEntries | ( | ) | const |
Returns the number of AccumulatorEntries currently stored in this accumulator.
const FbxAccumulatorEntry* GetEntry | ( | int | pEntryId | ) |
Get the specified FbxAccumulatorEntry.
pEntryId | ID of the entry to retrieve. |
NULL
if either the id is invalid or the Accumulator is not properly initialized. const FbxAccumulatorEntry* GetEntryAt | ( | int | pEntryIndex | ) | const |
Get the FbxAccumulatorEntry at the specified index.
pEntryIndex | index of the entry to retrieve. |
NULL
if either the index is invalid or the Accumulator is not properly initialized.. int GetNbDetails | ( | ) | const |
Returns the number of Details recorded so far in this accumulator.
int GetDetail | ( | int | pDetailId, |
const FbxAccumulatorEntry *& | pAE | ||
) | const |
Get the specified detail.
pDetailId | Index of the detail. This is the id-th detail of type pClass as inserted when the AddDetail |
pAE | Pointer to the FbxAccumulatorEntry object that contains the requested detail. The returned valued can be NULL if an error occurred. |
bool Output | ( | EOutputSource | pOutSrc = eAccumulatorEntry , |
int | pIndex = -1 , |
||
bool | pExtraDevicesOnly = false |
||
) |
Send the accumulator entries to the output devices.
This method needs to be explicitly called by the program that uses this class.
pOutSrc | Specify which data has to be sent to the output devices. Set to SEQUENCED_DETAILS to send the Details in the recorded order. Set to ACCUMULATOR_ENTRY to send each entry with its details regardless of the order in which the events occurred. |
pIndex | If this parameter >= 0, only send the specified entry/detail index to the output devices. Otherwise send all of them. |
pExtraDevicesOnly | If this parameter is True, the output is not sent to the log file. |
bool OutputById | ( | EEntryID | pId, |
EOutputSource | pOutSrc = eAccumulatorEntry , |
||
bool | pExtraDevicesOnly = false |
||
) |
Send the accumulator entry to the output devices.
pId | Send the entry/detail that matching pIdx to the output devices, otherwise send all of them. |
pOutSrc | Specify which data has to be sent to the output devices. Set to SEQUENCED_DETAILS to send the Details in the recorded order. Set to ACCUMULATOR_ENTRY to send each entry with its details regardless of the order in which the events occurred.. |
pExtraDevicesOnly | If this parameter is True, the output is not sent to the log file. |
bool Output | ( | const FbxString & | pName, |
const FbxString & | pDescr, | ||
FbxAccumulatorEntry::EClass | pClass, | ||
bool | pExtraDevicesOnly = false |
||
) |
Send an immediate entry to the output devices.
This method bypasses the accumulator by sending the entry directly to the output devices and discarding it right after. The internal accumulator lists are left unchanged by this call.
pName | This entry name. |
pDescr | The description of this entry. |
pClass | The category of this entry. |
pExtraDevicesOnly | If this parameter is True, the output is not sent to the log file. |
bool Output | ( | FbxUserNotificationFilteredIterator & | pAEFIter, |
bool | pExtraDevicesOnly = false |
||
) |
Sends the content of the iterator to the output devices.
This method bypasses the accumulator by sending each entry in the iterator directly to the output devices. The internal accumulator lists are left unchanged by this call.
pAEFIter | The Filtered FbxAccumulatorEntry iterator object. |
pExtraDevicesOnly | If this parameter is True, the output is not sent to the log file. |
void SetLogMessageEmitter | ( | FbxMessageEmitter * | pLogMessageEmitter | ) |
Set log message emitter.
pLogMessageEmitter | The new log message emitter. |
|
virtual |
Returns the absolute path to the log file.
If this method is not overridden in a derived class, it returns the TEMP directory.
pPath | The returned path. |
|
inline |
Returns the log file name.
Definition at line 335 of file fbxusernotification.h.
|
protectedvirtual |
Allow a derived class to finalize processing AFTER the log file handle has been deleted.
This may be required if the log file needs to be moved or shown.
|
protectedvirtual |
Allow the implementation class to perform accumulator initializations before the Extra devices are opened.
By default this method does nothing.
|
protectedvirtual |
Allow the implementation class to perform accumulator clear after the Extra devices are closed.
By default this method does nothing.
|
protectedvirtual |
Allow the implementation class to opens its output devices (called by InitAccumulator).
By default this method does nothing.
|
protectedvirtual |
Allow the implementation class to send all the accumulator entries to the devices.
By default this method loop trough all the elements of the received array and call the SendToExtraDevices method with the appropriate FbxAccumulatorEntry element and id.
pOutputNow | Flag indicates whether to output now. |
pEntries | Accumulator entries to output. |
true
if successful, false
otherwise.
|
protectedvirtual |
Allow the implementation class to send all the accumulator entries to the devices.
By default this method loop trough all the elements of the received array and call the SendToExtraDevices method with the appropriate FbxAccumulatorEntry element and id.
pOutputNow | Flag indicates whether to output now. |
pAESequence | Accumulator entries to output. |
true
if successful, false
otherwise.
|
protectedvirtual |
Allow the implementation class to send one accumulator entry to the devices.
By default this method does nothing.
pOutputNow | Flag indicates whether to output now. |
pAccEntry | Accumulator entry to output. |
pDetailId | Detail id. |
true
if successful, false
otherwise.
|
protectedvirtual |
Allow the implementation class to close it's output devices (called in the ClearAccumulator) By default this method does nothing.
|
protected |
Clears the Accumulator list, remove all user notification entries..
|
protected |
Clears the Sequence list.
|
protected |
Send the pIdth element of the accumulator or sequence list to the log file.
pOutSrc | The output source, accumulator or sequence list. |
pId | Element id. |
|
protected |
Send the accumulator entry to the log file.
pAccEntry | The accumulator entry. |
pDetailId | Detail id. |
|
friend |
Definition at line 361 of file fbxusernotification.h.