HDK
|
#include <paramlist.h>
Public Types | |
enum | Interp { INTERP_CONSTANT = 0, INTERP_PERPIECE = 1, INTERP_LINEAR = 2, INTERP_VERTEX = 3 } |
Public Member Functions | |
OIIO_STRONG_PARAM_TYPE (Copy, bool) | |
OIIO_STRONG_PARAM_TYPE (FromUstring, bool) | |
ParamValue () noexcept | |
ParamValue (const ustring &_name, TypeDesc _type, int _nvalues, const void *_value, Copy _copy=Copy(true)) noexcept | |
ParamValue (const ustring &_name, TypeDesc _type, int _nvalues, Interp _interp, const void *_value, Copy _copy=Copy(true)) noexcept | |
ParamValue (string_view _name, TypeDesc _type, int _nvalues, const void *_value, Copy _copy=Copy(true)) noexcept | |
ParamValue (string_view _name, TypeDesc _type, int _nvalues, Interp _interp, const void *_value, Copy _copy=Copy(true)) noexcept | |
ParamValue (string_view _name, int value) noexcept | |
ParamValue (string_view _name, float value) noexcept | |
ParamValue (string_view _name, ustring value) noexcept | |
ParamValue (string_view _name, string_view value) noexcept | |
ParamValue (string_view _name, ustringhash value) noexcept | |
ParamValue (string_view _name, TypeDesc type, string_view value) | |
ParamValue (const ParamValue &p) noexcept | |
ParamValue (const ParamValue &p, Copy _copy) noexcept | |
ParamValue (ParamValue &&p) noexcept | |
~ParamValue () noexcept | |
void | init (ustring _name, TypeDesc _type, int _nvalues, Interp _interp, const void *_value, Copy _copy) noexcept |
void | init (ustring _name, TypeDesc _type, int _nvalues, const void *_value, Copy _copy=Copy(true)) noexcept |
void | init (string_view _name, TypeDesc _type, int _nvalues, const void *_value, Copy _copy=Copy(true)) noexcept |
void | init (string_view _name, TypeDesc _type, int _nvalues, Interp _interp, const void *_value, Copy _copy=Copy(true)) noexcept |
const ParamValue & | operator= (const ParamValue &p) noexcept |
const ParamValue & | operator= (ParamValue &&p) noexcept |
const ustring & | name () const noexcept |
const ustring & | uname () const noexcept |
TypeDesc | type () const noexcept |
int | nvalues () const noexcept |
const void * | data () const noexcept |
int | datasize () const noexcept |
Interp | interp () const noexcept |
void | interp (Interp i) noexcept |
bool | is_nonlocal () const noexcept |
template<typename T > | |
const T & | get (int i=0) const noexcept |
int | get_int (int defaultval=0) const |
int | get_int_indexed (int index, int defaultval=0) const |
float | get_float (float defaultval=0) const |
float | get_float_indexed (int index, float defaultval=0) const |
std::string | get_string (int maxsize=64) const |
std::string | get_string_indexed (int index) const |
ustring | get_ustring (int maxsize=64) const |
ustring | get_ustring_indexed (int index) const |
Friends | |
void | swap (ParamValue &a, ParamValue &b) noexcept |
ParamValue holds a parameter and a pointer to its value(s)
Nomenclature: if you have an array of 4 colors for each of 15 points...
Definition at line 33 of file paramlist.h.
enum ParamValue::Interp |
Interpolation types
Definition at line 37 of file paramlist.h.
|
inlinenoexcept |
Definition at line 47 of file paramlist.h.
|
inlinenoexcept |
Definition at line 74 of file paramlist.h.
|
inlinenoexcept |
Definition at line 79 of file paramlist.h.
|
inlinenoexcept |
Definition at line 85 of file paramlist.h.
|
inlinenoexcept |
Definition at line 90 of file paramlist.h.
|
inlinenoexcept |
Definition at line 96 of file paramlist.h.
|
inlinenoexcept |
Definition at line 100 of file paramlist.h.
|
inlinenoexcept |
Definition at line 104 of file paramlist.h.
|
inlinenoexcept |
Definition at line 109 of file paramlist.h.
|
inlinenoexcept |
Definition at line 113 of file paramlist.h.
ParamValue::ParamValue | ( | string_view | _name, |
TypeDesc | type, | ||
string_view | value | ||
) |
|
inlinenoexcept |
Definition at line 123 of file paramlist.h.
|
inlinenoexcept |
Definition at line 128 of file paramlist.h.
|
inlinenoexcept |
Definition at line 135 of file paramlist.h.
|
inlinenoexcept |
Definition at line 144 of file paramlist.h.
|
inlinenoexcept |
Definition at line 204 of file paramlist.h.
|
inlinenoexcept |
Definition at line 208 of file paramlist.h.
Definition at line 227 of file paramlist.h.
Retrieve a float, with conversions from a wide variety of type cases, including integers. It will retrieve from a string, but only if the string is entirely a valid float format. Unconvertible types return the default value.
Retrieve an integer, with conversions from a wide variety of type cases, including unsigned, short, byte. Not float. It will retrieve from a string, but only if the string is entirely a valid int format. Unconvertible types return the default value.
std::string ParamValue::get_string | ( | int | maxsize = 64 | ) | const |
Convert any type to a string value. An optional maximum number of elements is also passed. In the case of a single string, just the string directly is returned. But for an array of strings, the array is returned as one string that's a comma-separated list of double- quoted, escaped strings. For an array or aggregate, at most maxsize
elements are returned (if maxsize
is 0, all elements are returned, no matter how large it is).
std::string ParamValue::get_string_indexed | ( | int | index | ) | const |
Convert any type to a ustring value. An optional maximum number of elements is also passed. Same behavior as get_string, but returning a ustring. For an array or aggregate, at most maxsize
elements are returned (if maxsize
is 0, all elements are returned, no matter how large it is).
|
inlinenoexcept |
Definition at line 171 of file paramlist.h.
|
inlinenoexcept |
Definition at line 177 of file paramlist.h.
|
inlinenoexcept |
Definition at line 182 of file paramlist.h.
|
inlinenoexcept |
Definition at line 187 of file paramlist.h.
|
inlinenoexcept |
Definition at line 212 of file paramlist.h.
Definition at line 213 of file paramlist.h.
|
inlinenoexcept |
Definition at line 214 of file paramlist.h.
Definition at line 200 of file paramlist.h.
|
inlinenoexcept |
Definition at line 203 of file paramlist.h.
ParamValue::OIIO_STRONG_PARAM_TYPE | ( | Copy | , |
bool | |||
) |
ParamValue::OIIO_STRONG_PARAM_TYPE | ( | FromUstring | , |
bool | |||
) |
|
noexcept |
|
noexcept |
|
inlinenoexcept |
Definition at line 202 of file paramlist.h.
|
inlinenoexcept |
Definition at line 201 of file paramlist.h.
|
friend |
Definition at line 216 of file paramlist.h.
char ParamValue::localval[16] |
Definition at line 267 of file paramlist.h.
const void* ParamValue::ptr |
Definition at line 268 of file paramlist.h.