Assimp  v4.1. (December 2018)
aiMetadata Struct Reference

Container for holding metadata. More...

Public Member Functions

template<typename T >
void Add (const std::string &key, const T &value)
 
 aiMetadata ()
 The default constructor, set all members to zero by default. More...
 
template<typename T >
bool Get (const aiString &key, T &value)
 
template<typename T >
bool Get (const std::string &key, T &value)
 
bool Get (size_t index, const aiString *&key, const aiMetadataEntry *&entry)
 Return metadata entry for analyzing it by user. More...
 
template<typename T >
bool Get (unsigned index, T &value)
 
template<typename T >
bool Set (unsigned index, const std::string &key, const T &value)
 
 ~aiMetadata ()
 The destructor. More...
 

Static Public Member Functions

static aiMetadataAlloc (unsigned int numProperties)
 Allocates property fields + keys. More...
 
static void Dealloc (aiMetadata *metadata)
 Deallocates property fields + keys. More...
 

Public Attributes

C_STRUCT aiStringmKeys
 Arrays of keys, may not be NULL. More...
 
unsigned int mNumProperties
 Length of the mKeys and mValues arrays, respectively. More...
 
C_STRUCT aiMetadataEntrymValues
 Arrays of values, may not be NULL. More...
 

Detailed Description

Container for holding metadata.

Metadata is a key-value store using string keys and values.

Constructor & Destructor Documentation

◆ aiMetadata()

aiMetadata::aiMetadata ( )
inline

The default constructor, set all members to zero by default.

◆ ~aiMetadata()

aiMetadata::~aiMetadata ( )
inline

The destructor.

Member Function Documentation

◆ Add()

template<typename T >
void aiMetadata::Add ( const std::string &  key,
const T &  value 
)
inline

◆ Alloc()

static aiMetadata* aiMetadata::Alloc ( unsigned int  numProperties)
inlinestatic

Allocates property fields + keys.

Parameters
numPropertiesNumber of requested properties.

◆ Dealloc()

static void aiMetadata::Dealloc ( aiMetadata metadata)
inlinestatic

Deallocates property fields + keys.

◆ Get() [1/4]

template<typename T >
bool aiMetadata::Get ( const aiString key,
T &  value 
)
inline

◆ Get() [2/4]

template<typename T >
bool aiMetadata::Get ( const std::string &  key,
T &  value 
)
inline

◆ Get() [3/4]

bool aiMetadata::Get ( size_t  index,
const aiString *&  key,
const aiMetadataEntry *&  entry 
)
inline

Return metadata entry for analyzing it by user.

Parameters
[in]pIndex- index of the entry.
[out]pKey- pointer to the key value.
[out]pEntry- pointer to the entry: type and value.
Returns
false - if pIndex is out of range, else - true.

◆ Get() [4/4]

template<typename T >
bool aiMetadata::Get ( unsigned  index,
T &  value 
)
inline

◆ Set()

template<typename T >
bool aiMetadata::Set ( unsigned  index,
const std::string &  key,
const T &  value 
)
inline

Member Data Documentation

◆ mKeys

C_STRUCT aiString* aiMetadata::mKeys

Arrays of keys, may not be NULL.

Entries in this array may not be NULL as well.

◆ mNumProperties

unsigned int aiMetadata::mNumProperties

Length of the mKeys and mValues arrays, respectively.

◆ mValues

C_STRUCT aiMetadataEntry* aiMetadata::mValues

Arrays of values, may not be NULL.

Entries in this array may be NULL if the corresponding property key has no assigned value.


The documentation for this struct was generated from the following file: