瀏覽代碼

Added a convenience overload for aiMetadata::Get using std::string as key.

Frederik Aalund 11 年之前
父節點
當前提交
9b78a180d9
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      include/assimp/metadata.h

+ 8 - 0
include/assimp/metadata.h

@@ -86,6 +86,10 @@ struct aiMetaDataEntry
 
 #ifdef __cplusplus
 
+#include <string>
+
+
+
 // -------------------------------------------------------------------------------
 /**
   * Helper functions to get the aiType enum entry for a type
@@ -218,6 +222,10 @@ struct aiMetadata
 		return false;
 	}
 
+	template<typename T>
+	inline bool Get( const std::string& key, T& value )
+	{ return Get(aiString(key), value); }
+
 #endif // __cplusplus
 };