get_var_value -> get_value
parent
b8f3e527d5
commit
3ad72a795e
56
cs_vm.cc
56
cs_vm.cc
|
@ -978,16 +978,16 @@ static ostd::Uint32 const *runcode(
|
|||
));
|
||||
continue;
|
||||
case ID_SVAR:
|
||||
arg.set_str(static_cast<Svar *>(id)->get_var_value());
|
||||
arg.set_str(static_cast<Svar *>(id)->get_value());
|
||||
continue;
|
||||
case ID_IVAR:
|
||||
arg.set_str(ostd::move(
|
||||
intstr(static_cast<Ivar *>(id)->get_var_value())
|
||||
intstr(static_cast<Ivar *>(id)->get_value())
|
||||
));
|
||||
continue;
|
||||
case ID_FVAR:
|
||||
arg.set_str(ostd::move(
|
||||
floatstr(static_cast<Fvar *>(id)->get_var_value())
|
||||
floatstr(static_cast<Fvar *>(id)->get_value())
|
||||
));
|
||||
continue;
|
||||
case ID_UNKNOWN:
|
||||
|
@ -1020,15 +1020,15 @@ static ostd::Uint32 const *runcode(
|
|||
continue;
|
||||
case ID_SVAR:
|
||||
arg.set_int(cs_parse_int(
|
||||
static_cast<Svar *>(id)->get_var_value()
|
||||
static_cast<Svar *>(id)->get_value()
|
||||
));
|
||||
continue;
|
||||
case ID_IVAR:
|
||||
arg.set_int(static_cast<Ivar *>(id)->get_var_value());
|
||||
arg.set_int(static_cast<Ivar *>(id)->get_value());
|
||||
continue;
|
||||
case ID_FVAR:
|
||||
arg.set_int(
|
||||
CsInt(static_cast<Fvar *>(id)->get_var_value())
|
||||
CsInt(static_cast<Fvar *>(id)->get_value())
|
||||
);
|
||||
continue;
|
||||
case ID_UNKNOWN:
|
||||
|
@ -1063,17 +1063,17 @@ static ostd::Uint32 const *runcode(
|
|||
continue;
|
||||
case ID_SVAR:
|
||||
arg.set_float(cs_parse_float(
|
||||
static_cast<Svar *>(id)->get_var_value()
|
||||
static_cast<Svar *>(id)->get_value()
|
||||
));
|
||||
continue;
|
||||
case ID_IVAR:
|
||||
arg.set_float(CsFloat(
|
||||
static_cast<Ivar *>(id)->get_var_value()
|
||||
static_cast<Ivar *>(id)->get_value()
|
||||
));
|
||||
continue;
|
||||
case ID_FVAR:
|
||||
arg.set_float(
|
||||
static_cast<Fvar *>(id)->get_var_value()
|
||||
static_cast<Fvar *>(id)->get_value()
|
||||
);
|
||||
continue;
|
||||
case ID_UNKNOWN:
|
||||
|
@ -1105,14 +1105,14 @@ static ostd::Uint32 const *runcode(
|
|||
static_cast<Alias *>(id)->val_v.get_val(arg);
|
||||
continue;
|
||||
case ID_SVAR:
|
||||
arg.set_str(static_cast<Svar *>(id)->get_var_value());
|
||||
arg.set_str(static_cast<Svar *>(id)->get_value());
|
||||
continue;
|
||||
case ID_IVAR:
|
||||
arg.set_int(static_cast<Ivar *>(id)->get_var_value());
|
||||
arg.set_int(static_cast<Ivar *>(id)->get_value());
|
||||
continue;
|
||||
case ID_FVAR:
|
||||
arg.set_float(
|
||||
static_cast<Fvar *>(id)->get_var_value()
|
||||
static_cast<Fvar *>(id)->get_value()
|
||||
);
|
||||
continue;
|
||||
case ID_UNKNOWN:
|
||||
|
@ -1143,16 +1143,16 @@ static ostd::Uint32 const *runcode(
|
|||
static_cast<Alias *>(id)->get_cstr(arg);
|
||||
continue;
|
||||
case ID_SVAR:
|
||||
arg.set_cstr(static_cast<Svar *>(id)->get_var_value());
|
||||
arg.set_cstr(static_cast<Svar *>(id)->get_value());
|
||||
continue;
|
||||
case ID_IVAR:
|
||||
arg.set_str(ostd::move(
|
||||
intstr(static_cast<Ivar *>(id)->get_var_value())
|
||||
intstr(static_cast<Ivar *>(id)->get_value())
|
||||
));
|
||||
continue;
|
||||
case ID_FVAR:
|
||||
arg.set_str(ostd::move(
|
||||
floatstr(static_cast<Fvar *>(id)->get_var_value())
|
||||
floatstr(static_cast<Fvar *>(id)->get_value())
|
||||
));
|
||||
continue;
|
||||
case ID_UNKNOWN:
|
||||
|
@ -1182,13 +1182,13 @@ static ostd::Uint32 const *runcode(
|
|||
static_cast<Alias *>(id)->get_cval(arg);
|
||||
continue;
|
||||
case ID_SVAR:
|
||||
arg.set_cstr(static_cast<Svar *>(id)->get_var_value());
|
||||
arg.set_cstr(static_cast<Svar *>(id)->get_value());
|
||||
continue;
|
||||
case ID_IVAR:
|
||||
arg.set_int(static_cast<Ivar *>(id)->get_var_value());
|
||||
arg.set_int(static_cast<Ivar *>(id)->get_value());
|
||||
continue;
|
||||
case ID_FVAR:
|
||||
arg.set_float(static_cast<Fvar *>(id)->get_var_value());
|
||||
arg.set_float(static_cast<Fvar *>(id)->get_value());
|
||||
continue;
|
||||
case ID_UNKNOWN:
|
||||
arg.set_null();
|
||||
|
@ -1213,22 +1213,22 @@ static ostd::Uint32 const *runcode(
|
|||
case CODE_SVAR | RET_STR:
|
||||
case CODE_SVAR | RET_NULL:
|
||||
args[numargs++].set_str(
|
||||
static_cast<Svar *>(cs.identmap[op >> 8])->get_var_value()
|
||||
static_cast<Svar *>(cs.identmap[op >> 8])->get_value()
|
||||
);
|
||||
continue;
|
||||
case CODE_SVAR | RET_INT:
|
||||
args[numargs++].set_int(cs_parse_int(
|
||||
static_cast<Svar *>(cs.identmap[op >> 8])->get_var_value()
|
||||
static_cast<Svar *>(cs.identmap[op >> 8])->get_value()
|
||||
));
|
||||
continue;
|
||||
case CODE_SVAR | RET_FLOAT:
|
||||
args[numargs++].set_float(cs_parse_float(
|
||||
static_cast<Svar *>(cs.identmap[op >> 8])->get_var_value()
|
||||
static_cast<Svar *>(cs.identmap[op >> 8])->get_value()
|
||||
));
|
||||
continue;
|
||||
case CODE_SVARM:
|
||||
args[numargs++].set_cstr(
|
||||
static_cast<Svar *>(cs.identmap[op >> 8])->get_var_value()
|
||||
static_cast<Svar *>(cs.identmap[op >> 8])->get_value()
|
||||
);
|
||||
continue;
|
||||
case CODE_SVAR1:
|
||||
|
@ -1241,17 +1241,17 @@ static ostd::Uint32 const *runcode(
|
|||
case CODE_IVAR | RET_INT:
|
||||
case CODE_IVAR | RET_NULL:
|
||||
args[numargs++].set_int(
|
||||
static_cast<Ivar *>(cs.identmap[op >> 8])->get_var_value()
|
||||
static_cast<Ivar *>(cs.identmap[op >> 8])->get_value()
|
||||
);
|
||||
continue;
|
||||
case CODE_IVAR | RET_STR:
|
||||
args[numargs++].set_str(ostd::move(intstr(
|
||||
static_cast<Ivar *>(cs.identmap[op >> 8])->get_var_value()
|
||||
static_cast<Ivar *>(cs.identmap[op >> 8])->get_value()
|
||||
)));
|
||||
continue;
|
||||
case CODE_IVAR | RET_FLOAT:
|
||||
args[numargs++].set_float(CsFloat(
|
||||
static_cast<Ivar *>(cs.identmap[op >> 8])->get_var_value()
|
||||
static_cast<Ivar *>(cs.identmap[op >> 8])->get_value()
|
||||
));
|
||||
continue;
|
||||
case CODE_IVAR1:
|
||||
|
@ -1277,17 +1277,17 @@ static ostd::Uint32 const *runcode(
|
|||
case CODE_FVAR | RET_FLOAT:
|
||||
case CODE_FVAR | RET_NULL:
|
||||
args[numargs++].set_float(
|
||||
static_cast<Fvar *>(cs.identmap[op >> 8])->get_var_value()
|
||||
static_cast<Fvar *>(cs.identmap[op >> 8])->get_value()
|
||||
);
|
||||
continue;
|
||||
case CODE_FVAR | RET_STR:
|
||||
args[numargs++].set_str(ostd::move(floatstr(
|
||||
static_cast<Fvar *>(cs.identmap[op >> 8])->get_var_value()
|
||||
static_cast<Fvar *>(cs.identmap[op >> 8])->get_value()
|
||||
)));
|
||||
continue;
|
||||
case CODE_FVAR | RET_INT:
|
||||
args[numargs++].set_int(int(
|
||||
static_cast<Fvar *>(cs.identmap[op >> 8])->get_var_value()
|
||||
static_cast<Fvar *>(cs.identmap[op >> 8])->get_value()
|
||||
));
|
||||
continue;
|
||||
case CODE_FVAR1:
|
||||
|
|
|
@ -211,7 +211,7 @@ CsInt Ivar::get_val_max() const {
|
|||
return p_maxval;
|
||||
}
|
||||
|
||||
CsInt Ivar::get_var_value() const {
|
||||
CsInt Ivar::get_value() const {
|
||||
return *p_storage;
|
||||
}
|
||||
|
||||
|
@ -222,11 +222,11 @@ CsFloat Fvar::get_val_max() const {
|
|||
return p_maxval;
|
||||
}
|
||||
|
||||
CsFloat Fvar::get_var_value() const {
|
||||
CsFloat Fvar::get_value() const {
|
||||
return *p_storage;
|
||||
}
|
||||
|
||||
ostd::ConstCharRange Svar::get_var_value() const {
|
||||
ostd::ConstCharRange Svar::get_value() const {
|
||||
return *p_storage;
|
||||
}
|
||||
|
||||
|
|
|
@ -249,7 +249,7 @@ struct OSTD_EXPORT Ivar: Var {
|
|||
CsInt get_val_min() const;
|
||||
CsInt get_val_max() const;
|
||||
|
||||
CsInt get_var_value() const;
|
||||
CsInt get_value() const;
|
||||
|
||||
Ivar(
|
||||
ostd::ConstCharRange n, CsInt m, CsInt x, CsInt *s,
|
||||
|
@ -267,7 +267,7 @@ struct OSTD_EXPORT Fvar: Var {
|
|||
CsFloat get_val_min() const;
|
||||
CsFloat get_val_max() const;
|
||||
|
||||
CsFloat get_var_value() const;
|
||||
CsFloat get_value() const;
|
||||
|
||||
Fvar(
|
||||
ostd::ConstCharRange n, CsFloat m, CsFloat x, CsFloat *s,
|
||||
|
@ -282,7 +282,7 @@ private:
|
|||
struct OSTD_EXPORT Svar: Var {
|
||||
friend struct CsState;
|
||||
|
||||
ostd::ConstCharRange get_var_value() const;
|
||||
ostd::ConstCharRange get_value() const;
|
||||
|
||||
Svar(
|
||||
ostd::ConstCharRange n, char **s, VarCb f = VarCb(),
|
||||
|
|
Loading…
Reference in New Issue