- Main Page
- Classes
- Files
- Directories
- Examples

- File List
- File Members

# fbxcharptrset.h

Go to the documentation of this file.

    00001 /****************************************************************************************
    00002
    00003    Copyright (C) 2012 Autodesk, Inc.
    00004    All rights reserved.
    00005
    00006    Use of this software is subject to the terms of the Autodesk license agreement
    00007    provided at the time of installation or download, or which otherwise accompanies
    00008    this software in either electronic or hard copy form.
    00009
    00010 ****************************************************************************************/
    00011
    00013 #ifndef _FBXSDK_CORE_BASE_CHARPTRSET_H_
    00014 #define _FBXSDK_CORE_BASE_CHARPTRSET_H_
    00015
    00016 #include <fbxsdk/fbxsdk_def.h>
    00017
    00018 #include <fbxsdk/fbxsdk_nsbegin.h>
    00019
    00020 #define FBXSDK_CHARPTRSET_SIZE 20
    00021
    00024 class FBXSDK_DLL FbxCharPtrSet
    00025 {
    00026 public:
    00027     struct CharPtrSet{ const char* mReference; FbxHandle mItemRef; };
    00028
    00032     FbxCharPtrSet(int pItemPerBlock=FBXSDK_CHARPTRSET_SIZE);
    00033
    00036     ~FbxCharPtrSet();
    00037
    00042     void Add(const char* pReference, FbxHandle pItem);
    00043
    00048     bool Remove(const char* pReference);
    00049
    00055     FbxHandle Get(const char* pReference, int* PIndex=NULL);
    00056
    00061     FbxHandle& operator[](int pIndex);
    00062
    00068     FbxHandle GetFromIndex(int pIndex, const char** pReference=NULL);
    00069
    00073     void RemoveFromIndex(int pIndex);
    00074
    00077     inline int GetCount() const { return mCharPtrSetCount; }
    00078
    00081     void Sort();
    00082
    00085     void Clear();
    00086
    00087 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    00088 private:
    00089     // internal functions for CharPtrSets manipulation
    00090     CharPtrSet*         FindEqual( const char* pReference) const;
    00091     CharPtrSet*         mCharPtrSetrray;
    00092     int                 mCharPtrSetCount;
    00093     int                 mBlockCount;
    00094     int                 mItemPerBlock;
    00095     bool                mIsChanged;
    00096     bool                mIsCaseSensitive;
    00097
    00098 public:
    00099     inline void         SetCaseSensitive(bool pIsCaseSensitive) {mIsCaseSensitive=pIsCaseSensitive;}
    00100 #endif
    00101 };
    00102
    00103 #include <fbxsdk/fbxsdk_nsend.h>
    00104
    00105 #endif /* _FBXSDK_CORE_BASE_CHARPTRSET_H_ */