#include <kfbxrenamingstrategy.h>
Inherits KRenamingStrategy.
Inheritance diagram for KFbxRenamingStrategy:
The KFbxRenamingStrategy object can be setup to rename all the objects in a scene. It can remove nameclashing, remove illegal characters, manage namespaces, and manage backward compatibility.
Definition at line 65 of file kfbxrenamingstrategy.h.
Public Types | |
enum | EMode |
| |
enum | EClashType |
| |
Public Member Functions | |
KFbxRenamingStrategy (EMode pMod, bool pOnCreationRun=false) | |
Constructor. | |
virtual | ~KFbxRenamingStrategy () |
Destructor. | |
void | SetClashSoverType (EClashType pType) |
Setup the strategy to perform this algorithm. | |
virtual bool | Rename (KName &pName) |
Rename. | |
virtual void | Clear () |
Empty all memories about given names. | |
virtual KRenamingStrategy * | Clone () |
Spawn mechanism. | |
virtual char * | GetNameSpace () |
Get the namespace of the last renamed object. | |
virtual void | SetInNameSpaceSymbol (KString pNameSpaceSymbol) |
Sets the current scene namespace symbol. | |
virtual void | SetOutNameSpaceSymbol (KString pNameSpaceSymbol) |
Sets the wanted scene namespace symbol. | |
virtual void | SetCaseSensibility (bool pIsCaseSensitive) |
Sets case sensitivity for nameclashing. | |
virtual void | SetReplaceNonAlphaNum (bool pReplaceNonAlphaNum) |
Sets the flag for character acceptance during renaming. | |
virtual void | SetFirstNotNum (bool pFirstNotNum) |
Sets the flag for first character acceptance during renaming. | |
virtual bool | RenameUnparentNameSpace (KFbxNode *pNode, bool pIsRoot=false) |
Recusively renames all the unparented namespaced objects (Prefix mode) starting from this node. | |
virtual bool | RemoveImportNameSpaceClash (KFbxNode *pNode) |
Recusively removes all the unparented namespaced "key" starting from this node. | |
Static Public Member Functions | |
static char * | NoPrefixName (char const *pName) |
Returns a name with its prefix removed. |
enum EMode |
enum EClashType |
Definition at line 86 of file kfbxrenamingstrategy.h.
KFbxRenamingStrategy | ( | EMode | pMod, | |
bool | pOnCreationRun = false | |||
) |
Constructor.
virtual ~KFbxRenamingStrategy | ( | ) | [virtual] |
Destructor.
void SetClashSoverType | ( | EClashType | pType | ) |
Setup the strategy to perform this algorithm.
virtual bool Rename | ( | KName & | pName | ) | [virtual] |
Rename.
pName | New name. |
true
if successful, false
otherwise. Implements KRenamingStrategy.
virtual void Clear | ( | ) | [virtual] |
virtual KRenamingStrategy* Clone | ( | ) | [virtual] |
Spawn mechanism.
Create a dynamic renaming strategy instance of the same type.
Implements KRenamingStrategy.
static char* NoPrefixName | ( | char const * | pName | ) | [static] |
Returns a name with its prefix removed.
pName | A name containning a prefix. |
virtual char* GetNameSpace | ( | ) | [inline, virtual] |
Get the namespace of the last renamed object.
Definition at line 128 of file kfbxrenamingstrategy.h.
virtual void SetInNameSpaceSymbol | ( | KString | pNameSpaceSymbol | ) | [inline, virtual] |
Sets the current scene namespace symbol.
pNameSpaceSymbol | namespace symbol. |
Definition at line 133 of file kfbxrenamingstrategy.h.
virtual void SetOutNameSpaceSymbol | ( | KString | pNameSpaceSymbol | ) | [inline, virtual] |
Sets the wanted scene namespace symbol.
pNameSpaceSymbol | namespace symbol. |
Definition at line 138 of file kfbxrenamingstrategy.h.
virtual void SetCaseSensibility | ( | bool | pIsCaseSensitive | ) | [inline, virtual] |
Sets case sensitivity for nameclashing.
pIsCaseSensitive | Set to true to make the nameclashing case sensitive. |
Definition at line 143 of file kfbxrenamingstrategy.h.
virtual void SetReplaceNonAlphaNum | ( | bool | pReplaceNonAlphaNum | ) | [inline, virtual] |
Sets the flag for character acceptance during renaming.
pReplaceNonAlphaNum | Set to true to replace illegal characters with an underscore ("_"). |
Definition at line 148 of file kfbxrenamingstrategy.h.
virtual void SetFirstNotNum | ( | bool | pFirstNotNum | ) | [inline, virtual] |
Sets the flag for first character acceptance during renaming.
pFirstNotNum | Set to true to add an underscore to the name if the first character is a number. |
Definition at line 153 of file kfbxrenamingstrategy.h.
virtual bool RenameUnparentNameSpace | ( | KFbxNode * | pNode, | |
bool | pIsRoot = false | |||
) | [virtual] |
Recusively renames all the unparented namespaced objects (Prefix mode) starting from this node.
pNode | Parent node. | |
pIsRoot | The root node. |
virtual bool RemoveImportNameSpaceClash | ( | KFbxNode * | pNode | ) | [virtual] |
Recusively removes all the unparented namespaced "key" starting from this node.
pNode | Parent node. |