fbxcollection.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_SCENE_COLLECTION_H_
00014 #define _FBXSDK_SCENE_COLLECTION_H_
00015 
00016 #include <fbxsdk/fbxsdk_def.h>
00017 
00018 #include <fbxsdk/core/fbxobject.h>
00019 #include <fbxsdk/core/fbxmanager.h>
00020 #include <fbxsdk/core/fbxevent.h>
00021 #include <fbxsdk/core/base/fbxerror.h>
00022 
00023 #include <fbxsdk/fbxsdk_nsbegin.h>
00024 
00025 class FbxCriteria;
00026 
00031 class FBXSDK_DLL FbxCollection : public FbxObject
00032 {
00033     FBXSDK_OBJECT_DECLARE(FbxCollection, FbxObject);
00034 
00035 public:
00040 
00041         virtual void Clear();
00042 
00046         virtual bool AddMember(FbxObject* pMember) { return ConnectSrcObject(pMember); }
00047 
00051         virtual bool RemoveMember(FbxObject* pMember) { return DisconnectSrcObject(pMember); }
00052 
00056         inline int GetMemberCount () const { return GetSrcObjectCount(); }
00057 
00062         inline FbxObject* GetMember(int pIndex=0) const { return GetSrcObject(pIndex); }
00063 
00068         virtual bool IsMember(const FbxObject* pMember) const;
00070 
00078         template <class T> inline int GetMemberCount(const T*) const { return GetSrcObjectCount(T::ClassId); }
00079 
00084         template <class T> inline T* GetMember(const T*, int pIndex=0) const { return FbxCast<T>(GetSrcObject(T::ClassId, pIndex)); }
00085 
00089         template <class T> inline T* FindMember(const T*, const char* pName) const { return FbxCast<T>(FindSrcObject(T::ClassId, pName)); }
00091 
00099         inline int GetMemberCount(const FbxCriteria& pCriteria) const { return GetSrcObjectCount(pCriteria); }
00100 
00105         inline FbxObject* GetMember(const FbxCriteria& pCriteria, int pIndex=0) const { return GetSrcObject(pCriteria, pIndex); }
00106 
00110         inline FbxObject* FindMember(const FbxCriteria& pCriteria, const char* pName) const { return FindSrcObject(pCriteria, pName); }
00112 
00120         virtual void SetSelectedAll(bool pSelection);
00121 
00126         virtual void SetSelected(FbxObject* pObject, bool pSelection);
00127 
00132         virtual bool GetSelected(FbxObject* pObject);
00134 
00136 //  WARNING!
00137 //  Anything beyond these lines may not be documented accurately and is
00138 //  subject to change without notice.
00140 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00141 protected:
00142     FbxCollection(FbxManager& pManager, const char* pName);
00143 #endif /* #ifndef DOXYGEN_SHOULD_SKIP_THIS */
00144 };
00145 
00146 #include <fbxsdk/fbxsdk_nsend.h>
00147 
00148 #endif /* _FBXSDK_SCENE_COLLECTION_H_ */