11 #ifndef __IMG_Metadata__
12 #define __IMG_Metadata__
16 #include <initializer_list>
26 MD_ReadWrite = MD_Read|MD_Write,
27 MD_ReadRGBA = MD_Read|MD_RGBA,
33 static const char *scope(
Scope s);
34 static Scope scope(
const char *
s);
37 return (
uint(s) &
uint(Scope::MD_Read)) == 0;
41 return s == Scope::MD_Read || s == Scope::MD_ReadRGBA;
63 return s == Storage::MD_Bool
64 || s == Storage::MD_Int8
65 || s == Storage::MD_Int16
66 || s == Storage::MD_Int32
67 || s == Storage::MD_Int64
68 || s == Storage::MD_UInt8
69 || s == Storage::MD_UInt16
70 || s == Storage::MD_UInt32
71 || s == Storage::MD_UInt64;
75 return s == Storage::MD_Real16
76 || s == Storage::MD_Real32
77 || s == Storage::MD_Real64;
81 return s == Storage::MD_String;
109 static const char *typeInfo(TypeInfo
t);
110 static TypeInfo typeInfo(
const char *
t);
115 Storage store = Storage::MD_Unknown,
142 void setScope(
Scope scope);
148 bool hasMenu()
const;
152 bool hasRange()
const;
155 Scope getScope()
const;
157 int menuSize()
const;
174 myStorage = Storage::MD_Unknown;
175 myTypeInfo = TypeInfo::MD_None;
306 const char *format_prefix =
nullptr)
const;
310 {
return myTable.contains(key); }
315 const char *prefix =
nullptr)
const;
333 const char *
format =
nullptr)
const;
335 const char *
format =
nullptr)
const;
337 const char *
format =
nullptr)
const;
339 const char *
format =
nullptr)
const;
341 const char *
format =
nullptr)
const;
343 const char *
format =
nullptr)
const;
345 const char *
format =
nullptr)
const;
347 const char *
format =
nullptr)
const;
356 const char *
format =
nullptr,
357 bool pretty_print =
true)
const;
400 Scope scope = Scope::MD_Default,
402 TypeInfo typeInfo = TypeInfo::MD_None);
417 myList.append(
Item(name, item));
424 Item &
get(
int idx) {
return myList[idx]; }
425 const Item &
get(
int idx)
const {
return myList[idx]; }
436 int menuIndex(
int parm_index,
440 {
return menuIndex(
index(parm_name), menu_token); }
446 {
return menuToken(
index(name), idx); }
449 {
return menuLabel(
index(name), idx); }
bool isString(const AttributeArray &array)
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
GLuint GLsizei const GLchar * label
getFileOption("OpenEXR:storage") storage
GLsizei const GLfloat * value
GLboolean GLboolean GLboolean GLboolean a
ImageBuf OIIO_API min(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
Class which writes ASCII or binary JSON streams.
GLint GLint GLsizei GLint GLenum format
GLuint const GLchar * name
GLboolean GLboolean GLboolean b
__hostdev__ bool isInteger(GridType gridType)
Return true if the GridType maps to a POD integer type.
ImageBuf OIIO_API max(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
Class to store JSON objects as C++ objects.
GLubyte GLubyte GLubyte GLubyte w
ImageBuf OIIO_API add(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
FMT_CONSTEXPR auto find(Ptr first, Ptr last, T value, Ptr &out) -> bool