FBX C++ API Reference
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FbxRenamingStrategyUtils Class Reference

#include <fbxrenamingstrategyutilities.h>

Class Description

This class contains a set of utilities, which are used by the FBX renaming strategy.

Definition at line 31 of file fbxrenamingstrategyutilities.h.

Static Public Member Functions

static bool EncodeNonAlpha (FbxString &pString, bool pFirstCharMustBeAlphaOnly=false, FbxString pPermittedChars="", bool p8bitCharsOnly=true)
 Check if the string has non alphanumeric characters and replace them with a special string containing a prefix and the character code. More...
 
static bool DecodeNonAlpha (FbxString &pString)
 Take a string that has been encoded by EncodeNonAlpha and re-extract the non-alphanumeric values. More...
 
static bool EncodeDuplicate (FbxString &pString, int pInstanceNumber=0)
 This method will add the ncl1 with the provided pInstanceNumber to the string. More...
 
static bool DecodeDuplicate (FbxString &pString)
 This method will remove the _ncl1_xxx from the given string. More...
 
static bool EncodeCaseInsensitive (FbxString &pString, const FbxString pString2)
 This method will compare pString and pString2, set pString to pString2 and append the ncl2 suffix to it. More...
 
static bool DecodeCaseInsensitive (FbxString &pString)
 This method will decode a string that has a ncl2 to it. More...
 
static FbxString NoPrefixName (const char *pName)
 Returns a name with its prefix removed. More...
 
static FbxString NoPrefixName (FbxString &pName)
 Returns a name with its prefix removed. More...
 

Member Function Documentation

◆ EncodeNonAlpha()

static bool EncodeNonAlpha ( FbxString pString,
bool  pFirstCharMustBeAlphaOnly = false,
FbxString  pPermittedChars = "",
bool  p8bitCharsOnly = true 
)
static

Check if the string has non alphanumeric characters and replace them with a special string containing a prefix and the character code.

Parameters
pStringString to be processed. The result of the conversion is also returned in this string.
pFirstCharMustBeAlphaOnlyThis flag tells whether the first char of the string must be alpha only. Its default value is false.
pPermittedCharsList of non alphanumeric characters that do not require to be converted because already supported by the destination application. When encountered, these characters are simply skipped and left as is.
p8bitCharsOnlyWhen true, this flag tells the routine that only 8 bit coded characters can be represented by the encoding format (see note below). If set to false, the range of supported character is increased and the memory usage may be less. But the routine will perform slower because of the internal conversions required.
Returns
Returns true if at least one character in pString has been encoded.
Note
The encoding string depends on the value of p8bitCharsOnly argument. When this parameter value is true, each non-alphanumeric character is replaced with FBXASC### (where ### is the decimal code of the character). Inversely, when the value is false, each non-alphanumeric characters is replaced with FBXCHR##### (where
is the hexadecimal representation of the character code).

◆ DecodeNonAlpha()

static bool DecodeNonAlpha ( FbxString pString)
static

Take a string that has been encoded by EncodeNonAlpha and re-extract the non-alphanumeric values.

Parameters
pStringString to be processed. The result of the conversion is also returned in this string.
Returns
Returns true if the pString argument has been decoded.

◆ EncodeDuplicate()

static bool EncodeDuplicate ( FbxString pString,
int  pInstanceNumber = 0 
)
static

This method will add the ncl1 with the provided pInstanceNumber to the string.

Parameters
pString
pInstanceNumberIts default value is 0.
Returns
Always returns true.
Remarks
please ALWAYS call Encode Duplicate BEFORE Encode Case Insensitive.

◆ DecodeDuplicate()

static bool DecodeDuplicate ( FbxString pString)
static

This method will remove the _ncl1_xxx from the given string.

Parameters
pString
Returns
Returns true if the pString has been modified

◆ EncodeCaseInsensitive()

static bool EncodeCaseInsensitive ( FbxString pString,
const FbxString  pString2 
)
static

This method will compare pString and pString2, set pString to pString2 and append the ncl2 suffix to it.

Parameters
pString
pString2
Returns
Returns true if the pString has been modified
Remarks
pString and pString2 must be identical except for casing.

◆ DecodeCaseInsensitive()

static bool DecodeCaseInsensitive ( FbxString pString)
static

This method will decode a string that has a ncl2 to it.

Parameters
pString
Returns
Returns true if the pString has been modified

◆ NoPrefixName() [1/2]

static FbxString NoPrefixName ( const char *  pName)
static

Returns a name with its prefix removed.

Parameters
pNameA name containing a prefix.
Returns
The part of pName following the "::"

◆ NoPrefixName() [2/2]

static FbxString NoPrefixName ( FbxString pName)
static

Returns a name with its prefix removed.

Parameters
pNameA name containing a prefix.
Returns
The part of pName following the "::"

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