1/****************************************************************************************
2
3 Copyright (C) 2015 Autodesk, Inc.
4 All rights reserved.
5
6 Use of this software is subject to the terms of the Autodesk license agreement
7 provided at the time of installation or download, or which otherwise accompanies
8 this software in either electronic or hard copy form.
9
10****************************************************************************************/
11
12//! \file fbxrenamingstrategybase.h
13#ifndef _FBXSDK_UTILS_RENAMINGSTRATEGY_BASE_H_
14#define _FBXSDK_UTILS_RENAMINGSTRATEGY_BASE_H_
15
16#include <fbxsdk/fbxsdk_def.h>
17
18#include <fbxsdk/scene/fbxscene.h>
19#include <fbxsdk/utils/fbxnamehandler.h>
20
21#include <fbxsdk/fbxsdk_nsbegin.h>
22
23/** \brief Base class for renaming strategy.
24* \nosubgrouping
25*/
26class FBXSDK_DLL FbxRenamingStrategyBase
27{
28public:
29
30 //! Default constructor
31 FbxRenamingStrategyBase();
32
33 /** Constructor.
34 * \param pNameSpaceSymbol
35 */
36 FbxRenamingStrategyBase(char pNameSpaceSymbol);
37
38 //! Destructor.
39 virtual ~FbxRenamingStrategyBase();
40
41 /** This method put all the names in the scene back to the original values
42 * \param pScene
43 * \return Returns true if some names have been modified.
44 */
45 virtual bool DecodeScene(FbxScene* pScene)=0;
46
47 /** This method renames all the names in the scene
48 * \param pScene
49 * \return Returns true if some names have been modified.
50 */
51 virtual bool EncodeScene(FbxScene* pScene)=0;
52
53 /** This method find the original name of a given string
54 * \param pString
55 * \return Returns true if the name has been modified.
56 */
57 virtual bool DecodeString(FbxNameHandler& pString)=0;
58
59 /** This method find the renaming name of a given string
60 * \param pString
61 * \param pIsPropertyName
62 * \return Returns true if the name has been modified.
63 */
64 virtual bool EncodeString(FbxNameHandler& pString, bool pIsPropertyName=false)=0;
65
66 //! clean up the name cells.
67 virtual void CleanUp();
68
69/*****************************************************************************************************************************
70** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
71*****************************************************************************************************************************/
72#ifndef DOXYGEN_SHOULD_SKIP_THIS
73 struct NameCell
74 {
75 NameCell(const char* pName) :
76 mName(pName),
77 mInstanceCount(0)
78 {
79 }
80
81 FbxString mName;
82 int mInstanceCount;
83 };
84
85 char mNamespaceSymbol;
86 FbxCharPtrSet mStringNameArray;
87#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
88};
89
90#include <fbxsdk/fbxsdk_nsend.h>
91
92#endif /* _FBXSDK_UTILS_RENAMINGSTRATEGY_BASE_H_ */
93