本文整理汇总了C++中VRefParam::toBoolean方法的典型用法代码示例。如果您正苦于以下问题:C++ VRefParam::toBoolean方法的具体用法?C++ VRefParam::toBoolean怎么用?C++ VRefParam::toBoolean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VRefParam
的用法示例。
在下文中一共展示了VRefParam::toBoolean方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: f_settype
bool f_settype(VRefParam var, CStrRef type) {
if (type == s_boolean) var = var.toBoolean();
else if (type == s_bool ) var = var.toBoolean();
else if (type == s_integer) var = var.toInt64();
else if (type == s_int ) var = var.toInt64();
else if (type == s_float ) var = var.toDouble();
else if (type == s_string ) var = var.toString();
else if (type == s_array ) var = var.toArray();
else if (type == s_object ) var = var.toObject();
else if (type == s_null ) var = uninit_null();
else return false;
return true;
}
示例2: f_settype
bool f_settype(VRefParam var, CStrRef type) {
if (type == "boolean") var = var.toBoolean();
else if (type == "bool" ) var = var.toBoolean();
else if (type == "integer") var = var.toInt64();
else if (type == "int" ) var = var.toInt64();
else if (type == "float" ) var = var.toDouble();
else if (type == "string" ) var = var.toString();
else if (type == "array" ) var = var.toArray();
else if (type == "object" ) var = var.toObject();
else if (type == "null" ) var = null;
else return false;
return true;
}
示例3: HHVM_FUNCTION
bool HHVM_FUNCTION(settype, VRefParam var, const String& type) {
if (type == s_boolean) var = var.toBoolean();
else if (type == s_bool ) var = var.toBoolean();
else if (type == s_integer) var = var.toInt64();
else if (type == s_int ) var = var.toInt64();
else if (type == s_float ) var = var.toDouble();
else if (type == s_string ) var = var.toString();
else if (type == s_array ) var = var.toArray();
else if (type == s_object ) var = var.toObject();
else if (type == s_null ) var = uninit_null();
else return false;
return true;
}