Explorar el Código

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

Frederik Aalund hace 11 años
padre
commit
9b78a180d9
Se han modificado 1 ficheros con 8 adiciones y 0 borrados
  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
 };