本文整理汇总了C++中VJSParms_callStaticFunction::GetParamArray方法的典型用法代码示例。如果您正苦于以下问题:C++ VJSParms_callStaticFunction::GetParamArray方法的具体用法?C++ VJSParms_callStaticFunction::GetParamArray怎么用?C++ VJSParms_callStaticFunction::GetParamArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VJSParms_callStaticFunction
的用法示例。
在下文中一共展示了VJSParms_callStaticFunction::GetParamArray方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _removeFrom
void VJSGroup::_removeFrom(VJSParms_callStaticFunction& ioParms, CUAGGroup* inGroup)
{
VError err = VE_OK;
sLONG nbparam = ioParms.CountParams();
for (sLONG i = 1; i <= nbparam /*&& err == VE_OK*/; i++)
{
if (ioParms.IsArrayParam(i))
{
VJSArray arr(ioParms.GetContext(), nil, false);
ioParms.GetParamArray(i, arr);
sLONG nbelem = arr.GetLength();
for (sLONG j = 0; j < nbelem; ++j)
{
VJSValue val(arr.GetValueAt(j));
if (val.IsString())
{
VString s;
val.GetString(s);
err = removeGroupFromGroup(ioParms, inGroup, s);
}
else /*if (val.IsInstanceOf("Group"))*/
{
CUAGGroup* group = val.GetObjectPrivateData<VJSGroup>();
if (group != nil)
err = inGroup->RemoveFromGroup(group);
}
}
}
else if (ioParms.IsStringParam(i))
{
VString s;
ioParms.GetStringParam(i, s);
err = removeGroupFromGroup(ioParms, inGroup, s);
}
else
{
CUAGGroup* group = ioParms.GetParamObjectPrivateData<VJSGroup>(i);
err = inGroup->RemoveFromGroup(group);
}
}
}
示例2: _putInto
void VJSUser::_putInto(VJSParms_callStaticFunction& ioParms, CUAGUser* inUser)
{
VError err = VE_OK;
sLONG nbparam = ioParms.CountParams();
for (sLONG i = 1; i <= nbparam /*&& err == VE_OK*/; i++)
{
if (ioParms.IsArrayParam(i))
{
VJSArray arr(ioParms.GetContextRef(), nil, false);
ioParms.GetParamArray(i, arr);
sLONG nbelem = arr.GetLength();
for (sLONG j = 0; j < nbelem; ++j)
{
VJSValue val(arr.GetValueAt(j));
if (val.IsString())
{
VString s;
val.GetString(s);
err = putUserIntoGroup(ioParms, inUser, s);
}
else if (val.IsInstanceOf("Group"))
{
CUAGGroup* group = val.GetObjectPrivateData<VJSGroup>();
err = inUser->PutIntoGroup(group);
}
}
}
else if (ioParms.IsStringParam(i))
{
VString s;
ioParms.GetStringParam(i, s);
err = putUserIntoGroup(ioParms, inUser, s);
}
else
{
CUAGGroup* group = ioParms.GetParamObjectPrivateData<VJSGroup>(i);
err = inUser->PutIntoGroup(group);
}
}
}