Data Structures
ai_map.h File Reference

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 AtParamValueMapEntryAiParamValueMapIteratorGetNext (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:

AiParamValueMapSetStr(map, AtString("author"), AtString("William Shakespeare"));
AiParamValueMapSetFlt(map, AtString("temperature"), 21.0f);
Arnold String allows for fast string comparisons.
Definition: ai_string.h:54
Parameters
mapthe map to operate with
namethe key you want to insert
valuethe value you want to insert
const AtString name
 
const AtString bool value { return AiMetaDataGetBool (nentry, AtString(param), AtString(name), value)
 
 __attribute__ ((visibility("default"))) void AiParamValueMapSetBool(AtParamValueMap *map
 

Detailed Description

Key/Value storage.


© 2023 Autodesk, Inc. · All rights reserved · www.arnoldrenderer.com