45 const void* _value,
bool _copy =
true) noexcept
47 init_noclear(_name, _type, _nvalues, _value, _copy);
50 Interp _interp,
const void* _value,
bool _copy =
true) noexcept
52 init_noclear(_name, _type, _nvalues, _interp, _value, _copy);
55 const void* _value,
bool _copy =
true) noexcept
57 init_noclear(
ustring(_name), _type, _nvalues, _value, _copy);
60 const void* _value,
bool _copy =
true) noexcept
62 init_noclear(
ustring(_name), _type, _nvalues, _interp, _value, _copy);
88 init_noclear(p.name(), p.type(), p.nvalues(), p.interp(), p.data(),
93 init_noclear(p.name(), p.type(), p.nvalues(), p.interp(), p.data(),
100 init_noclear(p.name(), p.type(), p.nvalues(), p.interp(), p.data(),
103 m_nonlocal = p.m_nonlocal;
104 p.m_data.ptr =
nullptr;
110 const void* _value,
bool _copy =
true) noexcept
113 init_noclear(_name, _type, _nvalues, _interp, _value, _copy);
116 bool _copy =
true) noexcept
118 init(_name, _type, _nvalues, INTERP_CONSTANT, _value, _copy);
121 const void* _value,
bool _copy =
true) noexcept
123 init(
ustring(_name), _type, _nvalues, _value, _copy);
126 const void* _value,
bool _copy =
true) noexcept
128 init(
ustring(_name), _type, _nvalues, _interp, _value, _copy);
135 init(p.name(), p.type(), p.nvalues(), p.interp(), p.data(),
142 init(p.name(), p.type(), p.nvalues(), p.interp(), p.data(),
false);
144 m_nonlocal = p.m_nonlocal;
145 p.m_data.ptr =
nullptr;
156 int nvalues() const noexcept {
return m_nvalues; }
157 const void*
data() const noexcept
159 return m_nonlocal ? m_data.ptr : &m_data;
163 return m_nvalues *
static_cast<int>(m_type.size());
171 auto tmp = std::move(
a);
180 template<
typename T>
const T&
get(
int i = 0)
const noexcept
182 return (reinterpret_cast<const T*>(
data()))[i];
189 int get_int(
int defaultval = 0)
const;
190 int get_int_indexed(
int index,
int defaultval = 0)
const;
196 float get_float(
float defaultval = 0)
const;
197 float get_float_indexed(
int index,
float defaultval = 0)
const;
209 ustring get_ustring(
int maxsize = 64)
const;
220 unsigned char m_interp = INTERP_CONSTANT;
222 bool m_nonlocal =
false;
225 const void* _value,
bool _copy =
true) noexcept;
227 Interp _interp, const
void* _value,
228 bool _copy = true) noexcept;
229 void clear_value() noexcept;
253 bool casesensitive =
true);
255 bool casesensitive =
true);
257 bool casesensitive =
true)
const;
259 bool casesensitive =
true)
const;
264 bool casesensitive =
true)
266 iterator
f =
find(name,
type, casesensitive);
267 return f !=
end() ? &(*f) :
nullptr;
271 bool casesensitive =
true)
const
273 const_iterator
f =
find(name,
type, casesensitive);
274 return f != cend() ? &(*f) :
nullptr;
282 bool casesensitive =
false,
bool convert =
true)
const;
289 bool casesensitive =
false,
bool convert =
true)
const;
295 bool casesensitive =
false,
299 bool casesensitive =
false,
bool convert =
true)
const;
303 bool casesensitive =
true);
307 bool casesensitive =
true)
const;
311 void add_or_replace(
const ParamValue& pv,
bool casesensitive =
true);
312 void add_or_replace(ParamValue&& pv,
bool casesensitive =
true);
319 add_or_replace(ParamValue(name, type, nvalues, value));
331 add_or_replace(ParamValue(name, type, value));
356 bool casesensitive =
false)
const
358 auto p =
find(name, TypeUnknown, casesensitive);
359 return p != cend() ? p->type() : TypeUnknown;
366 bool casesensitive =
false)
const;
369 bool casesensitive =
false)
const;
375 void*
value,
bool casesensitive =
false)
const;
378 bool casesensitive =
false)
const;
384 void sort(
bool casesensitive =
true);
411 return std::vector<ParamValue>::operator[](index);
415 return std::vector<ParamValue>::operator[](index);
435 return {
this, name };
439 return {
this, name };
32-bit IEEE floating point values, (C/C++ float).
AttrDelegate< const ParamValueList > operator[](string_view name) const
int datasize() const noexcept
void init(string_view _name, TypeDesc _type, int _nvalues, const void *_value, bool _copy=true) noexcept
void init(ustring _name, TypeDesc _type, int _nvalues, const void *_value, bool _copy=true) noexcept
ParamValue(string_view _name, TypeDesc _type, int _nvalues, const void *_value, bool _copy=true) noexcept
void init(string_view _name, TypeDesc _type, int _nvalues, Interp _interp, const void *_value, bool _copy=true) 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
GLsizei const GLchar *const * string
void attribute(string_view name, TypeDesc type, string_view value)
Set directly from string – parse if type is non-string.
void init(ustring _name, TypeDesc _type, int _nvalues, Interp _interp, const void *_value, bool _copy=true) noexcept
GLboolean GLboolean GLboolean GLboolean a
ParamValue(string_view _name, ustring value) noexcept
const ustring & name() const noexcept
ParamValue * find_pv(string_view name, TypeDesc type=TypeDesc::UNKNOWN, bool casesensitive=true)
Tto convert(const Tfrom &source)
ParamValue(string_view _name, int value) noexcept
ParamValue(const ustring &_name, TypeDesc _type, int _nvalues, Interp _interp, const void *_value, bool _copy=true) noexcept
void attribute(string_view name, int value)
basic_string_view< char > string_view
const ParamValue * find_pv(string_view name, TypeDesc type=TypeDesc::UNKNOWN, bool casesensitive=true) const
void attribute(string_view name, unsigned int value)
void attribute(string_view name, TypeDesc type, int nvalues, const void *value)
Add (or replace) a value in the list.
int nvalues() const noexcept
ParamValue(ParamValue &&p) noexcept
friend void swap(ParamValue &a, ParamValue &b) noexcept
ParamValue(const ParamValue &p, bool _copy) noexcept
const ParamValue & operator=(const ParamValue &p) noexcept
const void * data() const noexcept
ParamValue(string_view _name, string_view value) noexcept
const ParamValue & operator[](int index) const
GLuint const GLchar * name
ParamValue & operator[](int index)
GLboolean GLboolean GLboolean b
void attribute(string_view name, TypeDesc type, const void *value)
ParamValue(string_view _name, TypeDesc _type, int _nvalues, Interp _interp, const void *_value, bool _copy=true) noexcept
TypeDesc getattributetype(string_view name, bool casesensitive=false) const
const ustring & uname() const noexcept
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
AttrDelegate< ParamValueList > operator[](string_view name)
ParamValue(const ustring &_name, TypeDesc _type, int _nvalues, const void *_value, bool _copy=true) noexcept
OIIO_API bool attribute(string_view name, TypeDesc type, const void *val)
ParamValue(const ParamValue &p) 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
bool OIIO_UTIL_API contains(string_view a, string_view b)
Does 'a' contain the string 'b' within it?
void sort(I begin, I end, const Pred &pred)
const ParamValue & operator=(ParamValue &&p) noexcept
constexpr bool empty() const noexcept
Is the string_view empty, containing no characters?
Interp interp() const noexcept
FMT_CONSTEXPR auto find(Ptr first, Ptr last, T value, Ptr &out) -> bool
#define OIIO_NAMESPACE_BEGIN