45 #ifndef __AI_METADATA_H_INC__ 46 #define __AI_METADATA_H_INC__ 50 #if defined(_MSC_VER) && (_MSC_VER <= 1500) 51 #include "Compiler/pstdint.h" 156 for (
unsigned i=0; i<mNumProperties; ++i)
158 void* data = mValues[i].mData;
159 switch (mValues[i].mType)
162 delete static_cast<bool*
>(data);
165 delete static_cast<int*
>(data);
168 delete static_cast<uint64_t*
>(data);
171 delete static_cast<float*
>(data);
174 delete static_cast<aiString*
>(data);
194 inline void Set(
unsigned index,
const std::string& key,
const T& value )
197 assert(index < mNumProperties);
203 mValues[index].mType = GetAiType(value);
205 mValues[index].mData =
new T(value);
209 inline bool Get(
unsigned index, T& value )
212 assert(index < mNumProperties);
216 if ( GetAiType( value ) != mValues[ index ].mType ) {
222 value = *
static_cast<T*
>(mValues[index].mData);
227 inline bool Get(
const aiString& key, T& value )
230 for (
unsigned i=0; i<mNumProperties; ++i)
232 return Get(i, value);
237 inline bool Get(
const std::string& key, T& value ) {
241 #endif // __cplusplus 245 #endif // __AI_METADATA_H_INC__ Metadata entry.
Definition: metadata.h:86
Represents an UTF-8 string, zero byte terminated.
Definition: types.h:251
Definition: vector3.h:134