11 #ifndef __IMG_Metadata__
12 #define __IMG_Metadata__
16 #include <initializer_list>
29 MD_ReadWrite = MD_Read|MD_Write,
30 MD_ReadRGBA = MD_Read|MD_RGBA,
36 static const char *scope(
Scope s);
37 static Scope scope(
const char *
s);
40 return (
uint(s) &
uint(Scope::MD_Read)) == 0;
44 return s == Scope::MD_Read || s == Scope::MD_ReadRGBA;
66 return s == Storage::MD_Bool
67 || s == Storage::MD_Int8
68 || s == Storage::MD_Int16
69 || s == Storage::MD_Int32
70 || s == Storage::MD_Int64
71 || s == Storage::MD_UInt8
72 || s == Storage::MD_UInt16
73 || s == Storage::MD_UInt32
74 || s == Storage::MD_UInt64;
78 return s == Storage::MD_Real16
79 || s == Storage::MD_Real32
80 || s == Storage::MD_Real64;
84 return s == Storage::MD_String;
112 static const char *typeInfo(TypeInfo
t);
113 static TypeInfo typeInfo(
const char *
t);
118 Storage store = Storage::MD_Unknown,
126 Storage store = Storage::MD_Unknown,
127 TypeInfo
type = TypeInfo::MD_None);
151 void setScope(
Scope scope);
157 bool hasMenu()
const;
161 bool hasRange()
const;
164 Scope getScope()
const;
166 int menuSize()
const;
183 myStorage = Storage::MD_Unknown;
184 myTypeInfo = TypeInfo::MD_None;
315 const char *format_prefix =
nullptr)
const;
319 {
return myTable.contains(key); }
324 const char *prefix =
nullptr)
const;
342 const char *
format =
nullptr)
const;
344 const char *
format =
nullptr)
const;
346 const char *
format =
nullptr)
const;
348 const char *
format =
nullptr)
const;
350 const char *
format =
nullptr)
const;
352 const char *
format =
nullptr)
const;
354 const char *
format =
nullptr)
const;
356 const char *
format =
nullptr)
const;
365 const char *
format =
nullptr,
366 bool pretty_print =
true)
const;
426 Scope scope = Scope::MD_Default,
428 TypeInfo typeInfo = TypeInfo::MD_None);
443 myList.append(
Item(name, item));
450 Item &
get(
int idx) {
return myList[idx]; }
451 const Item &
get(
int idx)
const {
return myList[idx]; }
462 int menuIndex(
int parm_index,
466 {
return menuIndex(
index(parm_name), menu_token); }
472 {
return menuToken(
index(name), idx); }
475 {
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.
FMT_CONSTEXPR auto find(Ptr first, Ptr last, T value, Ptr &out) -> bool
GLint GLint GLsizei GLint GLenum GLenum type
GLint GLint GLsizei GLint GLenum format
GLuint const GLchar * name
GLboolean GLboolean GLboolean b
A map of string to various well defined value types.
__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)