fbxsdk/core/base/fbxcharptrset.h Source File

fbxcharptrset.h
Go to the documentation of this file.
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 
13 #ifndef _FBXSDK_CORE_BASE_CHARPTRSET_H_
14 #define _FBXSDK_CORE_BASE_CHARPTRSET_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
18 #include <fbxsdk/fbxsdk_nsbegin.h>
19 
23 {
24 public:
27  FbxCharPtrSet(int pItemPerBlock=20);
28 
30  ~FbxCharPtrSet();
31 
35  void Add(const char* pReference, FbxHandle pItem);
36 
40  bool Remove(const char* pReference);
41 
46  FbxHandle Get(const char* pReference, int* PIndex=NULL);
47 
51  FbxHandle& operator[](int pIndex);
52 
57  FbxHandle GetFromIndex(int pIndex, const char** pReference=NULL);
58 
61  void RemoveFromIndex(int pIndex);
62 
65  inline int GetCount() const { return mCharPtrSetCount; }
66 
68  void Sort();
69 
71  void Clear();
72 
73 /*****************************************************************************************************************************
74 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
75 *****************************************************************************************************************************/
76 #ifndef DOXYGEN_SHOULD_SKIP_THIS
77  struct CharPtrSet;
78 
79  inline void SetCaseSensitive(bool pIsCaseSensitive){ mIsCaseSensitive = pIsCaseSensitive; }
80 
81 private:
82  CharPtrSet* FindEqual(const char* pReference) const;
83 
84  CharPtrSet* mCharPtrSetArray;
85  int mCharPtrSetCount;
86  int mBlockCount;
87  int mItemPerBlock;
88  bool mIsChanged;
89  bool mIsCaseSensitive;
90 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
91 };
92 
93 #include <fbxsdk/fbxsdk_nsend.h>
94 
95 #endif /* _FBXSDK_CORE_BASE_CHARPTRSET_H_ */
FBX SDK environment definition.
#define NULL
Definition: fbxarch.h:210
int GetCount() const
Get the number of item in the array.
Definition: fbxcharptrset.h:65
This class contains the data structure support for char pointer set.
Definition: fbxcharptrset.h:22
#define FBXSDK_DLL
Definition: fbxarch.h:173