49 #if OIIO_VERSION_LESS(3, 0, 0) && !defined(OIIO_DOXYGEN)
52 const void* _value,
bool _copy) noexcept
54 init_noclear(_name, _type, _nvalues, _value, Copy(_copy));
57 Interp _interp,
const void* _value,
bool _copy) noexcept
59 init_noclear(_name, _type, _nvalues, _interp, _value, Copy(_copy));
62 const void* _value,
bool _copy) noexcept
64 init_noclear(
ustring(_name), _type, _nvalues, _value, Copy(_copy));
67 const void* _value,
bool _copy) noexcept
69 init_noclear(
ustring(_name), _type, _nvalues, _interp, _value,
75 const void* _value, Copy _copy = Copy(
true)) noexcept
77 init_noclear(_name, _type, _nvalues, _value, _copy);
80 Interp _interp,
const void* _value,
81 Copy _copy = Copy(
true)) noexcept
83 init_noclear(_name, _type, _nvalues, _interp, _value, _copy);
86 const void* _value, Copy _copy = Copy(
true)) noexcept
88 init_noclear(
ustring(_name), _type, _nvalues, _value, _copy);
91 const void* _value, Copy _copy = Copy(
true)) noexcept
93 init_noclear(
ustring(_name), _type, _nvalues, _interp, _value, _copy);
125 init_noclear(p.name(), p.type(), p.nvalues(), p.interp(), p.data(),
126 Copy(
true), FromUstring(
true));
130 init_noclear(p.name(), p.type(), p.nvalues(), p.interp(), p.data(),
131 _copy, FromUstring(
true));
137 init_noclear(p.name(), p.type(), p.nvalues(), p.interp(), p.data(),
138 Copy(
false), FromUstring(
true));
140 m_nonlocal = p.m_nonlocal;
141 p.m_data.ptr =
nullptr;
146 #if OIIO_VERSION_LESS(3, 0, 0) && !defined(OIIO_DOXYGEN)
149 const void* _value,
bool _copy) noexcept
152 init_noclear(_name, _type, _nvalues, _interp, _value, Copy(_copy));
154 void init(
ustring _name,
TypeDesc _type,
int _nvalues,
const void* _value,
157 init(_name, _type, _nvalues, INTERP_CONSTANT, _value, Copy(_copy));
160 const void* _value,
bool _copy) noexcept
162 init(
ustring(_name), _type, _nvalues, _value, Copy(_copy));
165 const void* _value,
bool _copy) noexcept
167 init(
ustring(_name), _type, _nvalues, _interp, _value, Copy(_copy));
172 const void* _value, Copy _copy) noexcept
175 init_noclear(_name, _type, _nvalues, _interp, _value, _copy);
178 Copy _copy = Copy(
true)) noexcept
180 init(_name, _type, _nvalues, INTERP_CONSTANT, _value, _copy);
183 const void* _value, Copy _copy = Copy(
true)) noexcept
185 init(
ustring(_name), _type, _nvalues, _value, _copy);
188 const void* _value, Copy _copy = Copy(
true)) noexcept
190 init(
ustring(_name), _type, _nvalues, _interp, _value, _copy);
203 int nvalues() const noexcept {
return m_nvalues; }
204 const void*
data() const noexcept
206 return m_nonlocal ? m_data.ptr : &m_data;
210 return m_nvalues *
static_cast<int>(m_type.size());
218 auto tmp = std::move(
a);
227 template<
typename T>
const T&
get(
int i = 0)
const noexcept
229 return (reinterpret_cast<const T*>(
data()))[i];
236 int get_int(
int defaultval = 0)
const;
237 int get_int_indexed(
int index,
int defaultval = 0)
const;
243 float get_float(
float defaultval = 0)
const;
244 float get_float_indexed(
int index,
float defaultval = 0)
const;
253 std::string get_string(
int maxsize = 64)
const;
254 std::string get_string_indexed(
int index)
const;
260 ustring get_ustring(
int maxsize = 64)
const;
271 unsigned char m_interp = INTERP_CONSTANT;
273 bool m_nonlocal =
false;
276 const void* _value, Copy _copy = Copy(
true),
277 FromUstring _from_ustring = FromUstring(
false)) noexcept;
279 Interp _interp, const
void* _value,
280 Copy _copy = Copy(true),
281 FromUstring _from_ustring = FromUstring(false)) noexcept;
282 void clear_value() noexcept;
306 bool casesensitive =
true);
308 bool casesensitive =
true);
310 bool casesensitive =
true)
const;
312 bool casesensitive =
true)
const;
317 bool casesensitive =
true)
319 iterator
f =
find(name,
type, casesensitive);
320 return f !=
end() ? &(*f) :
nullptr;
324 bool casesensitive =
true)
const
326 const_iterator
f =
find(name,
type, casesensitive);
327 return f != cend() ? &(*f) :
nullptr;
335 bool casesensitive =
false,
bool convert =
true)
const;
342 bool casesensitive =
false,
bool convert =
true)
const;
348 bool casesensitive =
false,
352 bool casesensitive =
false,
bool convert =
true)
const;
356 bool casesensitive =
true);
360 bool casesensitive =
true)
const;
364 void add_or_replace(
const ParamValue& pv,
bool casesensitive =
true);
365 void add_or_replace(ParamValue&& pv,
bool casesensitive =
true);
372 add_or_replace(ParamValue(name, type, nvalues, value));
384 add_or_replace(ParamValue(name, type, value));
409 add_or_replace(ParamValue(name, value));
415 bool casesensitive =
false)
const
425 bool casesensitive =
false)
const;
428 bool casesensitive =
false)
const;
434 void*
value,
bool casesensitive =
false)
const;
437 bool casesensitive =
false)
const;
443 void sort(
bool casesensitive =
true);
470 return std::vector<ParamValue>::operator[](index);
474 return std::vector<ParamValue>::operator[](index);
494 return {
this, name };
498 return {
this, name };
32-bit IEEE floating point values, (C/C++ float).
AttrDelegate< const ParamValueList > operator[](string_view name) const
int datasize() const noexcept
ParamValue(const ParamValue &p, Copy _copy) noexcept
void attribute(string_view name, string_view value)
*get result *(waiting if necessary)*A common idiom is to fire a bunch of sub tasks at the and then *wait for them to all complete We provide a helper class
ParamValue(string_view _name, TypeDesc _type, int _nvalues, Interp _interp, const void *_value, Copy _copy=Copy(true)) noexcept
GLsizei const GLfloat * value
void attribute(string_view name, TypeDesc type, string_view value)
Set directly from string – parse if type is non-string.
GLboolean GLboolean GLboolean GLboolean a
ParamValue(string_view _name, ustring value) noexcept
PUGI__FN void sort(I begin, I end, const Pred &pred)
ParamValue * find_pv(string_view name, TypeDesc type=TypeDesc::UNKNOWN, bool casesensitive=true)
ParamValue(const ustring &_name, TypeDesc _type, int _nvalues, Interp _interp, const void *_value, Copy _copy=Copy(true)) noexcept
Tto convert(const Tfrom &source)
ParamValue(string_view _name, int value) noexcept
FMT_CONSTEXPR auto find(Ptr first, Ptr last, T value, Ptr &out) -> bool
void attribute(string_view name, int value)
OIIO_INLINE_CONSTEXPR TypeDesc TypeInt(TypeDesc::INT)
basic_string_view< char > string_view
OIIO_INLINE_CONSTEXPR TypeDesc TypeUnknown(TypeDesc::UNKNOWN)
const ParamValue * find_pv(string_view name, TypeDesc type=TypeDesc::UNKNOWN, bool casesensitive=true) const
OIIO_INLINE_CONSTEXPR TypeDesc TypeUInt(TypeDesc::UINT)
void attribute(string_view name, ustring value)
void attribute(string_view name, unsigned int value)
GLint GLint GLsizei GLint GLenum GLenum type
void attribute(string_view name, TypeDesc type, int nvalues, const void *value)
Add (or replace) a value in the list.
int nvalues() const noexcept
OIIO_INLINE_CONSTEXPR TypeDesc TypeFloat(TypeDesc::FLOAT)
ParamValue(ParamValue &&p) noexcept
void init(ustring _name, TypeDesc _type, int _nvalues, const void *_value, Copy _copy=Copy(true)) noexcept
friend void swap(ParamValue &a, ParamValue &b) noexcept
const void * data() const noexcept
ParamValue(string_view _name, ustringhash value) noexcept
void init(string_view _name, TypeDesc _type, int _nvalues, Interp _interp, const void *_value, Copy _copy=Copy(true)) noexcept
ParamValue(string_view _name, string_view value) noexcept
const ParamValue & operator[](int index) const
GLuint const GLchar * name
ParamValue & operator[](int index)
OIIO_INLINE_CONSTEXPR TypeDesc TypeString(TypeDesc::STRING)
GLboolean GLboolean GLboolean b
void attribute(string_view name, TypeDesc type, const void *value)
TypeDesc getattributetype(string_view name, bool casesensitive=false) const
void init(string_view _name, TypeDesc _type, int _nvalues, const void *_value, Copy _copy=Copy(true)) noexcept
const ustring & uname() const noexcept
#define OIIO_STRONG_PARAM_TYPE(Name, Basetype)
OIIO_API bool getattribute(string_view name, TypeDesc type, void *val)
bool is_nonlocal() const noexcept
ImageBuf OIIO_API resize(const ImageBuf &src, string_view filtername="", float filterwidth=0.0f, ROI roi={}, int nthreads=0)
ParamValue(string_view _name, float value) noexcept
void attribute(string_view name, float value)
TypeDesc type() const noexcept
void interp(Interp i) noexcept
LeafData & operator=(const LeafData &)=delete
AttrDelegate< ParamValueList > operator[](string_view name)
void init(ustring _name, TypeDesc _type, int _nvalues, Interp _interp, const void *_value, Copy _copy) noexcept
OIIO_API bool attribute(string_view name, TypeDesc type, const void *val)
ParamValue(const ParamValue &p) noexcept
ParamValue(string_view _name, TypeDesc _type, int _nvalues, const void *_value, Copy _copy=Copy(true)) noexcept
#define OIIO_NAMESPACE_END
that also have some descendant prim *whose name begins with which in turn has a child named baz where *the predicate and *a name There is also one special expression reference
constexpr bool empty() const noexcept
Is the basic_string_view empty, containing no characters?
ParamValue(const ustring &_name, TypeDesc _type, int _nvalues, const void *_value, Copy _copy=Copy(true)) noexcept
bool OIIO_UTIL_API contains(string_view a, string_view b)
Does 'a' contain the string 'b' within it?
Interp interp() const noexcept
#define OIIO_NAMESPACE_BEGIN