本文整理汇总了C++中VJSParms_callStaticFunction::ReturnNumber方法的典型用法代码示例。如果您正苦于以下问题:C++ VJSParms_callStaticFunction::ReturnNumber方法的具体用法?C++ VJSParms_callStaticFunction::ReturnNumber怎么用?C++ VJSParms_callStaticFunction::ReturnNumber使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VJSParms_callStaticFunction
的用法示例。
在下文中一共展示了VJSParms_callStaticFunction::ReturnNumber方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void VJSStream::_GetLong64(VJSParms_callStaticFunction& ioParms, VStream* inStream)
{
sLONG8 l8;
VError err = inStream->GetLong8(l8);
if (err == VE_OK)
ioParms.ReturnNumber(l8);
}
示例2: _GetReal
void VJSStream::_GetReal(VJSParms_callStaticFunction& ioParms, VStream* inStream)
{
Real r;
VError err = inStream->GetReal(r);
if (err == VE_OK)
ioParms.ReturnNumber(r);
}
示例3: _GetByte
void VJSStream::_GetByte(VJSParms_callStaticFunction& ioParms, VStream* inStream)
{
uBYTE c;
VError err = inStream->GetByte(c);
if (err == VE_OK)
ioParms.ReturnNumber(c);
}
示例4: _GetWord
void VJSStream::_GetWord(VJSParms_callStaticFunction& ioParms, VStream* inStream)
{
sWORD w;
VError err = inStream->GetWord(w);
if (err == VE_OK)
ioParms.ReturnNumber(w);
}
示例5: _GetPos
void VJSTextStream::_GetPos (VJSParms_callStaticFunction &ioParms, VJSTextStreamState *inStreamState)
{
if (inStreamState != NULL)
ioParms.ReturnNumber(inStreamState->fPosition);
else
XBOX::vThrowError(XBOX::VE_JVSC_INVALID_STATE, L"TextStream.getPos()");
}
示例6: _promoteWith
void VJSSession::_promoteWith(VJSParms_callStaticFunction& ioParms, CUAGSession* inSession)
{
sLONG promotionToken = 0;
CUAGGroup* group = RetainParamGroup(inSession->GetDirectory(), ioParms, 1);
if (group != nil)
{
promotionToken = inSession->PromoteIntoGroup(group);
}
QuickReleaseRefCountable(group);
ioParms.ReturnNumber(promotionToken);
}
示例7: _promoteWith
void VJSSession::_promoteWith(VJSParms_callStaticFunction& ioParms, CUAGSession* inSession)
{
sLONG promotionToken = 0;
CUAGGroup* group = RetainParamGroup(inSession->GetDirectory(), ioParms, 1);
if (group != nil)
{
CUAGThreadPrivilege* privileges = static_cast<CUAGThreadPrivilege*>(ioParms.GetContext().GetGlobalObjectPrivateInstance()->GetSpecific('uagX'));
promotionToken = inSession->PromoteIntoGroup(group, privileges);
}
QuickReleaseRefCountable(group);
ioParms.ReturnNumber(promotionToken);
}
示例8: _GetSize
void VJSStream::_GetSize(VJSParms_callStaticFunction& ioParms, VStream* inStream)
{
ioParms.ReturnNumber(inStream->GetSize());
}
示例9: _SetTimer
//.........这里部分代码省略.........
timeOutObject.SetContext(context);
if (timeOutObject.HasProperty("toString")) {
XBOX::VJSObject toStringObject = timeOutObject.GetPropertyAsObject("toString");
if (toStringObject.IsFunction()) {
std::vector<XBOX::VJSValue> values;
XBOX::VJSValue string(context);
toStringObject.SetContext(context);
timeOutObject.CallFunction(toStringObject, &values, &string, NULL);
if (string.IsString()) {
// If Number() is called as a function (and not as a constructor), it acts as ToNumber().
// See section 15.7.1 of ECMA-262 specification.
XBOX::VJSObject toNumberObject = context.GetGlobalObject().GetPropertyAsObject("Number");
if (toNumberObject.IsFunction()) {
XBOX::VJSValue number(context);
values.clear();
values.push_back(string);
toNumberObject.SetContext(context);
context.GetGlobalObject().CallFunction(toNumberObject, &values, &number, NULL);
if (number.IsNumber() && !number.GetReal(&duration))
duration = 0.0;
}
}
}
}
}
}
// (value != value) is true if value is a NaN.
if (duration < 0.0 || duration > XBOX::kMAX_Real || duration != duration)
duration = 0.0;
}
std::vector<XBOX::VJSValue> *arguments;
arguments = new std::vector<XBOX::VJSValue>;
for (sLONG i = 3; i <= ioParms.CountParams(); i++)
arguments->push_back(ioParms.GetParamValue(i));
sLONG period, id;
VJSTimer *timer;
period = (sLONG) duration;
if (inIsInterval) {
if (period < VJSTimer::kMinimumInterval)
period = VJSTimer::kMinimumInterval;
} else {
if (period < VJSTimer::kMinimumTimeout)
period = VJSTimer::kMinimumTimeout;
}
timer = new VJSTimer(functionObject, inIsInterval ? period : VJSTimer::kTimeOut);
if ((id = inWorker->GetTimerContext()->InsertTimer(timer)) < 0) {
// Too many timers (should never happen). Silently ignore.
// Returned ID (-1) isn't valid and a clear on it, will do nothing.
timer->Release();
delete arguments;
} else {
XBOX::VTime triggerTime;
triggerTime.FromSystemTime();
triggerTime.AddMilliseconds(period);
inWorker->QueueEvent(VJSTimerEvent::Create(timer, triggerTime, arguments));
}
ioParms.ReturnNumber(id);
}
示例10: _GetResultCount
void VJSLanguageSyntaxTesterDefinitionResults::_GetResultCount( VJSParms_callStaticFunction &ioParams, IJSLanguageSyntaxTesterDefinitionResults *inResults )
{
if (inResults) {
ioParams.ReturnNumber( inResults->GetResultCount() );
}
}