HDK
|
Map of metadata items. More...
#include <IMG_Metadata.h>
Public Types | |
using | Storage = IMG_MetadataItem::Storage |
using | TypeInfo = IMG_MetadataItem::TypeInfo |
Map of metadata items.
Definition at line 208 of file IMG_Metadata.h.
Iteration interface
Definition at line 325 of file IMG_Metadata.h.
Definition at line 211 of file IMG_Metadata.h.
Definition at line 212 of file IMG_Metadata.h.
bool IMG_Metadata::add | ( | const UT_StringHolder & | key, |
const IMG_MetadataItem & | item | ||
) |
Add named metadata.
bool IMG_Metadata::addTypedString | ( | const UT_StringHolder & | name, |
const char * | val | ||
) |
Set value from old-style metadata. This mimics the interface before H20 (see IMG_File::setOption
). Normally when calling IMG_File::setOption
, the value would be passed directly as a string. For example:
But, alternatively, the string could be encoded with type information. For example:
The possible encoding type information was:
If there is no type information encoded in the string, the string will be added verbatim.
|
inline |
Iteration interface
Definition at line 326 of file IMG_Metadata.h.
|
inline |
Clear the table.
Definition at line 215 of file IMG_Metadata.h.
|
inline |
Test if a key exists in the metadata.
Definition at line 309 of file IMG_Metadata.h.
void IMG_Metadata::dump | ( | ) | const |
Debug print.
|
inline |
Iteration interface
Definition at line 327 of file IMG_Metadata.h.
|
inline |
Remove metadata.
Definition at line 318 of file IMG_Metadata.h.
bool IMG_Metadata::find | ( | const UT_StringRef & | name, |
IMG_MetadataItem & | value, | ||
const char * | format_prefix = nullptr |
||
) | const |
Find an item in the map and return it's representation.
bool IMG_Metadata::getOption | ( | const UT_StringRef & | name, |
UT_StringHolder & | val, | ||
const char * | prefix = nullptr |
||
) | const |
Old style getOption() call that gets the value as a string.
bool IMG_Metadata::import | ( | const UT_StringRef & | name, |
bool & | value, | ||
const char * | format = nullptr |
||
) | const |
Import items
bool IMG_Metadata::import | ( | const UT_StringRef & | n, |
UT_StringHolder & | v, | ||
const char * | format = nullptr |
||
) | const |
Import items
bool IMG_Metadata::import | ( | const UT_StringRef & | name, |
int32 & | val, | ||
const char * | format = nullptr |
||
) | const |
Import items
bool IMG_Metadata::import | ( | const UT_StringRef & | name, |
int64 & | val, | ||
const char * | format = nullptr |
||
) | const |
Import items
bool IMG_Metadata::import | ( | const UT_StringRef & | name, |
fpreal32 & | val, | ||
const char * | format = nullptr |
||
) | const |
Import items
bool IMG_Metadata::import | ( | const UT_StringRef & | name, |
fpreal64 & | val, | ||
const char * | format = nullptr |
||
) | const |
Import items
bool IMG_Metadata::import | ( | const UT_StringRef & | name, |
UT_Matrix4F & | m, | ||
const char * | format = nullptr |
||
) | const |
Import items
bool IMG_Metadata::import | ( | const UT_StringRef & | name, |
UT_Matrix4D & | m, | ||
const char * | format = nullptr |
||
) | const |
Import items
void IMG_Metadata::merge | ( | const IMG_Metadata & | src, |
bool | overwrite = true |
||
) |
Merge from other metadata. If overwrite
is enabled, any data in the source will overwrite existing keys.
bool IMG_Metadata::save | ( | UT_JSONWriter & | os | ) | const |
Save the value to a JSON writer.
Number of items.
Definition at line 321 of file IMG_Metadata.h.
bool IMG_Metadata::toString | ( | const UT_StringRef & | name, |
UT_StringHolder & | value, | ||
const char * | format = nullptr , |
||
bool | pretty_print = true |
||
) | const |
Convert metadata to a string value. When pretty_print
is true: