fbxobjectfilter.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_OBJECT_FILTER_H_
00014 #define _FBXSDK_SCENE_OBJECT_FILTER_H_
00015 
00016 #include <fbxsdk/fbxsdk_def.h>
00017 
00018 #include <fbxsdk/core/base/fbxstring.h>
00019 #include <fbxsdk/core/fbxobject.h>
00020 
00021 #include <fbxsdk/fbxsdk_nsbegin.h>
00022 
00026 class FBXSDK_DLL FbxObjectFilter
00027 {
00028 
00029 public:
00030     
00032     virtual ~FbxObjectFilter() {}
00033 
00037     virtual bool Match(const FbxObject * pObjectPtr) const = 0;
00038 
00042     virtual bool NotMatch(const FbxObject * pObjectPtr) const { return !Match(pObjectPtr); };
00043 
00045 //
00046 //  WARNING!
00047 //
00048 //  Anything beyond these lines may not be documented accurately and is 
00049 //  subject to change without notice.
00050 //
00052 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00053 
00054 private:
00055 
00056 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00057 };
00058 
00062 class FBXSDK_DLL FbxNameFilter : public FbxObjectFilter
00063 {
00064 public:
00072     inline FbxNameFilter( const char* pTargetName ) : mTargetName( pTargetName ) {};
00073 
00075     virtual ~FbxNameFilter() {}
00077 
00081     virtual bool Match(const FbxObject * pObjectPtr) const { return pObjectPtr ? mTargetName == pObjectPtr->GetName() : false; }
00082 
00084     //
00085     //  WARNING!
00086     //
00087     //  Anything beyond these lines may not be documented accurately and is 
00088     //  subject to change without notice.
00089     //
00091 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00092 private:
00093     FbxString mTargetName;
00094 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00095 };
00096 
00097 #include <fbxsdk/fbxsdk_nsend.h>
00098 
00099 #endif /* _FBXSDK_SCENE_OBJECT_FILTER_H_ */