StrMap.h

00001 //***************************************************************************************
00002 //
00003 // File supervisor: Crosswalk team
00004 //
00005 // Copyright 2008 Autodesk, Inc.  All rights reserved.  
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 
00012 
00013 #ifndef __STRMAP_H__
00014 #define __STRMAP_H__
00015 
00016 // Disable "identifier was truncated to '255' characters in the debug information" warning.
00017 #if defined(_WIN32) || defined(_WIN32_WCE) || defined(_XBOX)
00018 #pragma warning( disable : 4786 )
00019 #endif // defined(_WIN32) || defined(_WIN32_WCE) || defined(_XBOX)
00020 
00021 #ifdef FTK_KERNEL
00022 #include <map>          // map
00023 #endif // FTK_KERNEL
00024 
00025 #include <SIBCUtil.h>   // SI_Char, _SI_STRCMP
00026 
00035 struct StrLessPred
00036 {
00043     inline bool operator () ( const SI_Char* in_psz1, const SI_Char* in_psz2 ) const
00044     {
00045         return (_SI_STRCMP(in_psz1, in_psz2) < 0);
00046     }
00047 };
00048 
00062 #ifdef FTK_KERNEL
00063 template <class ValueType>
00064 class SI_StrMap : public std::map<const SI_Char*, ValueType, StrLessPred>
00065 {
00066 };
00067 
00068 #endif // FTK_KERNEL
00069 #endif //__STRMAP_H__