- Main Page
- Classes
- Files
- Directories
- Examples

- File List
- File Members

# fbxset.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_SET_H_
    00014 #define _FBXSDK_CORE_BASE_SET_H_
    00015
    00016 #include <fbxsdk/fbxsdk_def.h>
    00017
    00018 #include <fbxsdk/fbxsdk_nsbegin.h>
    00019
    00020 #define FBXSDK_SET_DEFAULT_ITEM_COUNT 20
    00021
    00022 struct SSet;
    00023
    00027 class FBXSDK_DLL FbxSet
    00028 {
    00029 public:
    00037         FbxSet(int pItemPerBlock=FBXSDK_SET_DEFAULT_ITEM_COUNT);
    00038
    00042         FbxSet(const FbxSet& other);
    00043
    00045         ~FbxSet();
    00047
    00048     // Add and remove
    00055     bool  Add       ( FbxHandle pReference, FbxHandle pItem );
    00056
    00057
    00062     bool  Remove        ( FbxHandle pReference );
    00063
    00068     bool  RemoveItem    ( FbxHandle pItem );
    00069
    00075     bool  SetItem   ( FbxHandle pReference, FbxHandle pItem ); // Change Item Reference, don't Create if doesn't Exist
    00076
    00083     FbxHandle Get ( FbxHandle pReference, int* pIndex = NULL ) const;
    00084
    00086     void     Clear();
    00087
    00088     // Index manipulation
    00094     FbxHandle GetFromIndex ( int pIndex, FbxHandle* pReference = NULL )const;
    00095
    00100     bool  RemoveFromIndex( int pIndex );
    00101
    00102     // Get The Count
    00106     int  GetCount ()const       { return mSetCount; }
    00107
    00108     // Sorting
    00113     bool  Swap()const;
    00114
    00115     //The array can be sorted only if the private member:mIsChanged be true.
    00119     bool  Sort()const;
    00120
    00122     const FbxSet& operator=(const FbxSet&);
    00123
    00124 private:
    00125     // internal functions for Sets manipulation
    00126     SSet*   FindEqual( FbxHandle pReference)const;
    00127
    00128 private:
    00129     SSet*   mSetArray;
    00130     int     mSetCount;
    00131     int     mBlockCount;
    00132     int     mItemPerBlock;
    00133     mutable bool    mIsChanged;
    00134 };
    00135
    00136 #include <fbxsdk/fbxsdk_nsend.h>
    00137
    00138 #endif /* _FBXSDK_CORE_BASE_SET_H_ */