00001 /* 00002 Copyright (C) 2005-2007 Feeling Software Inc. 00003 Portions of the code are: 00004 Copyright (C) 2005-2007 Sony Computer Entertainment America 00005 00006 MIT License: http://www.opensource.org/licenses/mit-license.php 00007 */ 00008 00014 #ifndef _FU_UNIQUE_ID_MAP_H_ 00015 #define _FU_UNIQUE_ID_MAP_H_ 00016 00024 template <class CH> 00025 class FCOLLADA_EXPORT FUUniqueStringMapT 00026 { 00027 private: 00028 typedef fm::map<uint32, uint32> NumberMap; // This is really a set and the second uint32 is not used. 00029 typedef fm::map<fm::stringT<CH>, NumberMap> StringMap; 00030 00031 StringMap values; 00032 00033 public: 00038 void insert(fm::stringT<CH>& wantedStr); 00039 void insert(const fm::stringT<CH>& wantedStr) { fm::stringT<CH> a = wantedStr; insert(a); } 00043 bool contains(const fm::stringT<CH>& str) const; 00044 00047 void erase(const fm::stringT<CH>& str); 00048 }; 00049 00050 typedef FUUniqueStringMapT<char> FUSUniqueStringMap; 00051 typedef FUUniqueStringMapT<fchar> FUUniqueStringMap; 00053 #endif // _FU_UNIQUE_ID_MAP_H_ 00054