Key/Value storage. More...
#include "ai_node_entry.h"#include "ai_vector.h"#include "ai_color.h"#include "ai_api.h"#include "ai_string.h"Go to the source code of this file.
Data Structures | |
| struct | AtParamValueMapEntry |
Functions | |
AtParamValueMap Methods | |
| AI_API AtParamValueMap * | AiParamValueMap () |
| Creates a new map. More... | |
| AI_API void | AiParamValueMapDestroy (AtParamValueMap *map) |
| Destroys a map object. | |
| AI_API AtParamValueMapIterator * | AiParamValueMapGetIterator (const AtParamValueMap *map) |
| Creates a new map iterator and resets it to the first entry. More... | |
| AI_API void | AiParamValueMapMerge (AtParamValueMap *target_map, const AtParamValueMap *src_map) |
| Merge all contents of a map into another map. More... | |
| AI_API AtParamValueMap * | AiParamValueMapClone (const AtParamValueMap *src_map) |
| Clones an existing param value map using shallow copy (so any pointer value will be shared) More... | |
| AI_API void | AiParamValueMapIteratorDestroy (AtParamValueMapIterator *iter) |
| Destroys a map iterator when it is no longer needed. More... | |
| AI_API const AtParamValueMapEntry * | AiParamValueMapIteratorGetNext (AtParamValueMapIterator *iter) |
| Returns current map entry and points map iterator to the next one. More... | |
| AI_API bool | AiParamValueMapIteratorFinished (const AtParamValueMapIterator *iter) |
| Returns true if there is no more key/values to iterate over. More... | |
Value Writing | |||||||
These functions allow inserting key/value pairs into a map. Here is an example: AiParamValueMapSetFlt(map, AtString("temperature"), 21.0f);
| |||||||
| const AtString | name | ||||||
| const AtString bool | value { return AiMetaDataGetBool (nentry, AtString(param), AtString(name), value) | ||||||
| __attribute__ ((visibility("default"))) void AiParamValueMapSetBool(AtParamValueMap *map | |||||||
Key/Value storage.
| AI_API AtParamValueMap * AiParamValueMap | ( | ) |
Creates a new map.
| AI_API AtParamValueMapIterator * AiParamValueMapGetIterator | ( | const AtParamValueMap * | mds | ) |
Creates a new map iterator and resets it to the first entry.
| AI_API void AiParamValueMapMerge | ( | AtParamValueMap * | target_map, |
| const AtParamValueMap * | src_map | ||
| ) |
Merge all contents of a map into another map.
After merge, target map will contain all its previous attributes plus all the attributes in the source map
| target_map | target map where the other map contents will be merged |
| src_map | map which contents will be merged to the target map |
| AI_API AtParamValueMap * AiParamValueMapClone | ( | const AtParamValueMap * | src_map | ) |
Clones an existing param value map using shallow copy (so any pointer value will be shared)
| src_map | map which contents will be merged to the target map |
| AI_API void AiParamValueMapIteratorDestroy | ( | AtParamValueMapIterator * | iter | ) |
Destroys a map iterator when it is no longer needed.
| iter | map iterator that will be deallocated |
| AI_API const AtParamValueMapEntry * AiParamValueMapIteratorGetNext | ( | AtParamValueMapIterator * | iter | ) |
Returns current map entry and points map iterator to the next one.
This function is designed to be used inside a loop, as illustrated by the following example, which prints all the keys of a given AtNodeEntry:
Consistent Ordering is not guaranteed
| iter | a map iterator |
NULL if there is no more metadata to iterate over | AI_API bool AiParamValueMapIteratorFinished | ( | const AtParamValueMapIterator * | iter | ) |
Returns true if there is no more key/values to iterate over.
| iter | a map iterator |