HDK
|
#include <paramlist.h>
Public Types | |
enum | Interp { INTERP_CONSTANT = 0, INTERP_PERPIECE = 1, INTERP_LINEAR = 2, INTERP_VERTEX = 3 } |
Public Member Functions | |
ParamValue () noexcept | |
ParamValue (const ustring &_name, TypeDesc _type, int _nvalues, const void *_value, bool _copy=true) noexcept | |
ParamValue (const ustring &_name, TypeDesc _type, int _nvalues, Interp _interp, const void *_value, bool _copy=true) noexcept | |
ParamValue (string_view _name, TypeDesc _type, int _nvalues, const void *_value, bool _copy=true) noexcept | |
ParamValue (string_view _name, TypeDesc _type, int _nvalues, Interp _interp, const void *_value, bool _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, TypeDesc type, string_view value) | |
ParamValue (const ParamValue &p) noexcept | |
ParamValue (const ParamValue &p, bool _copy) noexcept | |
ParamValue (ParamValue &&p) noexcept | |
~ParamValue () noexcept | |
void | init (ustring _name, TypeDesc _type, int _nvalues, Interp _interp, const void *_value, bool _copy=true) noexcept |
void | init (ustring _name, TypeDesc _type, int _nvalues, const void *_value, bool _copy=true) noexcept |
void | init (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 |
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 32 of file paramlist.h.
enum ParamValue::Interp |
Interpolation types
Definition at line 36 of file paramlist.h.
|
inlinenoexcept |
Definition at line 43 of file paramlist.h.
|
inlinenoexcept |
Definition at line 44 of file paramlist.h.
|
inlinenoexcept |
Definition at line 49 of file paramlist.h.
|
inlinenoexcept |
Definition at line 54 of file paramlist.h.
|
inlinenoexcept |
Definition at line 59 of file paramlist.h.
|
inlinenoexcept |
Definition at line 64 of file paramlist.h.
|
inlinenoexcept |
Definition at line 68 of file paramlist.h.
|
inlinenoexcept |
Definition at line 72 of file paramlist.h.
|
inlinenoexcept |
Definition at line 76 of file paramlist.h.
ParamValue::ParamValue | ( | string_view | _name, |
TypeDesc | type, | ||
string_view | value | ||
) |
|
inlinenoexcept |
Definition at line 86 of file paramlist.h.
|
inlinenoexcept |
Definition at line 91 of file paramlist.h.
|
inlinenoexcept |
Definition at line 98 of file paramlist.h.
|
inlinenoexcept |
Definition at line 107 of file paramlist.h.
|
inlinenoexcept |
Definition at line 157 of file paramlist.h.
|
inlinenoexcept |
Definition at line 161 of file paramlist.h.
Definition at line 180 of file paramlist.h.
Retrive a float, with converstions from a wide variety of type cases, including integers. It will retrive from a string, but only if the string is entirely a valid float format. Unconvertible types return the default value.
Retrive an integer, with converstions from a wide variety of type cases, including unsigned, short, byte. Not float. It will retrive 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.
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.
|
inlinenoexcept |
Definition at line 109 of file paramlist.h.
|
inlinenoexcept |
Definition at line 115 of file paramlist.h.
|
inlinenoexcept |
Definition at line 120 of file paramlist.h.
|
inlinenoexcept |
Definition at line 125 of file paramlist.h.
|
inlinenoexcept |
Definition at line 165 of file paramlist.h.
Definition at line 166 of file paramlist.h.
|
inlinenoexcept |
Definition at line 167 of file paramlist.h.
Definition at line 153 of file paramlist.h.
|
inlinenoexcept |
Definition at line 156 of file paramlist.h.
|
inlinenoexcept |
Definition at line 132 of file paramlist.h.
|
inlinenoexcept |
Definition at line 139 of file paramlist.h.
|
inlinenoexcept |
Definition at line 155 of file paramlist.h.
|
inlinenoexcept |
Definition at line 154 of file paramlist.h.
|
friend |
Definition at line 169 of file paramlist.h.
char ParamValue::localval[16] |
Definition at line 216 of file paramlist.h.
const void* ParamValue::ptr |
Definition at line 217 of file paramlist.h.