• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ VJSParms_callStaticFunction类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中VJSParms_callStaticFunction的典型用法代码示例。如果您正苦于以下问题:C++ VJSParms_callStaticFunction类的具体用法?C++ VJSParms_callStaticFunction怎么用?C++ VJSParms_callStaticFunction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了VJSParms_callStaticFunction类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: do_BinaryStream

void VJSStream::do_BinaryStream(VJSParms_callStaticFunction& ioParms)
{
	VFile* file = ioParms.RetainFileParam( 1);
	bool forwrite = ioParms.GetBoolParam( 2, L"Write", L"Read");
	if (file != NULL)
	{
		VError err = VE_OK;
		if (forwrite)
		{
			if (!file->Exists())
				err = file->Create();
		}
		VFileStream* stream = new VFileStream(file);
		if (err == VE_OK)
		{
			if (forwrite)
				err = stream->OpenWriting();
			else
				err = stream->OpenReading();
		}
		
		if (err == VE_OK)
		{
			ioParms.ReturnValue(VJSStream::CreateInstance(ioParms.GetContextRef(), stream));
		}
		else
		{
			delete stream;
		}
	}
	else
		vThrowError(VE_JVSC_WRONG_PARAMETER_TYPE_FILE, "1");
	ReleaseRefCountable( &file);
}
开发者ID:sanyaade-webdev,项目名称:core-XToolbox,代码行数:34,代码来源:VJSRuntime_stream.cpp


示例2: _unPromote

void VJSSession::_unPromote(VJSParms_callStaticFunction& ioParms, CUAGSession* inSession)
{
	sLONG promotionToken = 0;
	ioParms.GetLongParam(1, &promotionToken);
	CUAGThreadPrivilege* privileges = static_cast<CUAGThreadPrivilege*>(ioParms.GetContext().GetGlobalObjectPrivateInstance()->GetSpecific('uagX'));
	inSession->UnPromoteFromToken(promotionToken, privileges);
}
开发者ID:StephaneH,项目名称:core-Components,代码行数:7,代码来源:JsUAG.cpp


示例3: _GetResult

void VJSLanguageSyntaxTesterDefinitionResults::_GetResult( VJSParms_callStaticFunction &ioParams, IJSLanguageSyntaxTesterDefinitionResults *inResults )
{
	if (inResults) {
		sLONG index;
		if (ioParams.GetLongParam( 1, &index ))
		{
			IDefinition definition = inResults->GetResult( index );
			VJSObject	result(ioParams.GetContextRef());
			VJSValue	jsval(ioParams.GetContextRef());

			result.MakeEmpty();

			jsval.SetString( definition.GetName() );
			result.SetProperty(L"name", jsval, JS4D::PropertyAttributeNone);

			jsval.SetString( definition.GetFilePath() );
			result.SetProperty(L"file", jsval, JS4D::PropertyAttributeNone);

			jsval.SetNumber( definition.GetLineNumber() + 1 );
			result.SetProperty(L"line", jsval, JS4D::PropertyAttributeNone);

			ioParams.ReturnValue(result);
		}
	}
}
开发者ID:sanyaade-mobiledev,项目名称:core-Components,代码行数:25,代码来源:LanguageSyntax.cpp


示例4: _ClearTimer

void VJSTimer::_ClearTimer (VJSParms_callStaticFunction &ioParms, VJSWorker *inWorker, bool inIsInterval) 
{
	xbox_assert(inWorker != NULL);

	if (!ioParms.CountParams() || !ioParms.IsNumberParam(1))

		return;
		
	sLONG			id;
	XBOX::VJSTimer	*timer;

	ioParms.GetLongParam(1, &id);
	if ((timer = inWorker->GetTimerContext()->LookUpTimer(id)) == NULL)

		return;	// No timer with given ID found.

	if (timer->IsInterval() != inIsInterval)

		return;	// Mismatched call (cannot used clearInterval() to clear a timeout for example).

	// Mark timer as "cleared".

	timer->_Clear();	

	// This will loop the event queue, trying to find the VJSTimerEvent.
	//
	// If the clearTimeout() or clearInterval() is executed inside "itself" (in its callback),
	// this will do nothing. The event is already executing, but as the timer is marked as 
	// "cleared", VJSTimerEvent::Discard() will free it.
	//
	// Otherwise, the loop will find the VJSTimerEvent object, calling its Discard() and thus 
	// freeing the timer.
	
	inWorker->UnscheduleTimer(timer);
}
开发者ID:sanyaade-iot,项目名称:core-XToolbox,代码行数:35,代码来源:VJSTimer.cpp


示例5: _getCurrentPath

void VJSRequireClass::_getCurrentPath (VJSParms_callStaticFunction &ioParms, void *)
{
	VJSGlobalObject	*globalObject	= ioParms.GetContext().GetGlobalObjectPrivateInstance();
	
	xbox_assert(globalObject != NULL);

	XBOX::VFilePath	*path	= (XBOX::VFilePath *) globalObject->GetSpecific(VJSContext::kURLSpecificKey);
	
	xbox_assert(path != NULL);

	XBOX::VFilePath	parent;

	if (!path->GetParent(parent)) {

		ioParms.ReturnString("/");

	} else {

		XBOX::VString	posixPath;

		parent.GetPosixPath(posixPath);

		ioParms.ReturnString(posixPath);

	}
}
开发者ID:sanyaade-mobiledev,项目名称:core-XToolbox,代码行数:26,代码来源:VJSModule.cpp


示例6: do_isoToDate

void VJSGlobalClass::do_isoToDate(VJSParms_callStaticFunction& ioParms, VJSGlobalObject*)
{
	VTime dd;
	VString s;
	ioParms.GetStringParam(1, s);
	dd.FromJSONString(s);
	ioParms.ReturnTime(dd);
}
开发者ID:sanyaade-webdev,项目名称:core-XToolbox,代码行数:8,代码来源:VJSGlobalClass.cpp


示例7: _setEnabled

void VJSDataServiceCore::_setEnabled( VJSParms_callStaticFunction& ioParms, VDataService *inService)
{
	VRIAContext *riaContext = VRIAJSRuntimeContext::GetApplicationContextFromJSContext( ioParms.GetContext(), inService->GetApplication());

	bool enabled = false;
	if (ioParms.GetBoolParam( 1, &enabled))
	{
		inService->SetEnabled( enabled);
	}
}
开发者ID:rajeshpillai,项目名称:core-Wakanda,代码行数:10,代码来源:VJSDataServiceCore.cpp


示例8: _removeItem

void VJSStorageClass::_removeItem (VJSParms_callStaticFunction &ioParms, VJSStorageObject *inStorageObject)
{
	xbox_assert(inStorageObject != NULL);

	XBOX::VString	name;

	if (ioParms.CountParams() && ioParms.IsStringParam(1) && ioParms.GetStringParam(1, name))

		inStorageObject->RemoveKeyValue(name);
}
开发者ID:StephaneH,项目名称:core-XToolbox,代码行数:10,代码来源:VJSWebStorage.cpp


示例9: _filterGroups

void VJSDirectory::_filterGroups(VJSParms_callStaticFunction& ioParms, CUAGDirectory* inDirectory)
{
	VString s;
	bool isquery = false;
	ioParms.GetStringParam(1, s);
	isquery = ioParms.GetBoolParam(2, "query", "not query");
	CUAGGroupVector groups;
	VError err = inDirectory->FilterGroups(s, isquery, groups);

	ioParms.ReturnValue(buildArrFromGroups(ioParms, groups, nil));
}
开发者ID:StephaneH,项目名称:core-Components,代码行数:11,代码来源:JsUAG.cpp


示例10: _PutString

void VJSStream::_PutString(VJSParms_callStaticFunction& ioParms, VStream* inStream)
{
	VString s;
	if (ioParms.IsStringParam(1))
	{
		ioParms.GetStringParam(1, s);
		VError err = s.WriteToStream(inStream);
	}
	else
		vThrowError(VE_JVSC_WRONG_PARAMETER_TYPE_STRING, "1");
}
开发者ID:sanyaade-webdev,项目名称:core-XToolbox,代码行数:11,代码来源:VJSRuntime_stream.cpp


示例11: _PutReal

void VJSStream::_PutReal(VJSParms_callStaticFunction& ioParms, VStream* inStream)
{
	Real r = 0;
	if (ioParms.IsNumberParam(1))
	{
		ioParms.GetRealParam(1, &r);
		VError err = inStream->PutReal(r);
	}
	else
		vThrowError(VE_JVSC_WRONG_PARAMETER_TYPE_NUMBER, "1");
}
开发者ID:sanyaade-webdev,项目名称:core-XToolbox,代码行数:11,代码来源:VJSRuntime_stream.cpp


示例12: do_trace

void VJSGlobalClass::do_trace( VJSParms_callStaticFunction& inParms, VJSGlobalObject*)
{
	size_t count = inParms.CountParams();
	for( size_t i = 1 ; i <= count ; ++i)	
	{
		VString msg;
		bool ok = inParms.GetStringParam( i, msg);
		if (!ok)
			break;
		VDebugMgr::Get()->DebugMsg( msg);
	}
}
开发者ID:sanyaade-webdev,项目名称:core-XToolbox,代码行数:12,代码来源:VJSGlobalClass.cpp


示例13: do_GetProgressIndicator

void VJSGlobalClass::do_GetProgressIndicator(VJSParms_callStaticFunction& ioParms, VJSGlobalObject *inContext)
{
	if (ioParms.IsStringParam(1))
	{
		VString userinfo;
		ioParms.GetStringParam(1, userinfo);
		VProgressIndicator* progress = VProgressManager::RetainProgressIndicator(userinfo);
		if (progress != nil)
			ioParms.ReturnValue(VJSProgressIndicator::CreateInstance(ioParms.GetContextRef(), progress));
		QuickReleaseRefCountable(progress);
	}
}
开发者ID:sanyaade-webdev,项目名称:core-XToolbox,代码行数:12,代码来源:VJSGlobalClass.cpp


示例14: do_displayNotification

void VJSGlobalClass::do_displayNotification( VJSParms_callStaticFunction& inParms, VJSGlobalObject*)
{
	VString message;
	inParms.GetStringParam( 1, message);
	
	VString title( "Notification");
	inParms.GetStringParam( 2, title);
	
	bool critical = false;
	inParms.GetBoolParam( 3, &critical);

	VSystem::DisplayNotification( title, message, critical ? EDN_StyleCritical : 0);
}
开发者ID:sanyaade-webdev,项目名称:core-XToolbox,代码行数:13,代码来源:VJSGlobalClass.cpp


示例15: do_dateToIso

void VJSGlobalClass::do_dateToIso(VJSParms_callStaticFunction& ioParms, VJSGlobalObject*)
{
	VString s;
	VJSValue jsval(ioParms.GetContextRef());
	if (ioParms.CountParams() > 0)
	{
		VTime dd;
		jsval = ioParms.GetParamValue(1);
		jsval.GetTime(dd);
		dd.GetJSONString(s);
	}
	ioParms.ReturnString(s);
}
开发者ID:sanyaade-webdev,项目名称:core-XToolbox,代码行数:13,代码来源:VJSGlobalClass.cpp


示例16: _belongsTo

void VJSSession::_belongsTo(VJSParms_callStaticFunction& ioParms, CUAGSession* inSession)
{
	bool ok = false;

	CUAGGroup* group = RetainParamGroup(inSession->GetDirectory(), ioParms, 1);
	if (group != nil)
	{
		CUAGThreadPrivilege* privileges = static_cast<CUAGThreadPrivilege*>(ioParms.GetContext().GetGlobalObjectPrivateInstance()->GetSpecific('uagX'));
		ok = inSession->BelongsTo(group, privileges);
	}

	QuickReleaseRefCountable(group);
	ioParms.ReturnBool(ok);
}
开发者ID:StephaneH,项目名称:core-Components,代码行数:14,代码来源:JsUAG.cpp


示例17: do_Require

void VJSGlobalClass::do_Require(VJSParms_callStaticFunction& ioParms, VJSGlobalObject *inGlobalObject)
{
	xbox_assert(inGlobalObject != NULL);

	XBOX::VString	className;

	if (ioParms.CountParams() != 1 || !ioParms.IsStringParam(1) || !ioParms.GetStringParam(1, className))

		vThrowError(VE_JVSC_WRONG_PARAMETER_TYPE_STRING, "1");

	else

		ioParms.ReturnValue(inGlobalObject->Require(ioParms.GetContext(), className));
}
开发者ID:sanyaade-webdev,项目名称:core-XToolbox,代码行数:14,代码来源:VJSGlobalClass.cpp


示例18: _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);
}
开发者ID:StephaneH,项目名称:core-Components,代码行数:14,代码来源:JsUAG.cpp


示例19: _addGroup

void VJSDirectory::_addGroup(VJSParms_callStaticFunction& ioParms, CUAGDirectory* inDirectory)
{
	VError err;
	VString groupname, fullname;
	ioParms.GetStringParam(1, groupname);
	ioParms.GetStringParam(2, fullname);
	CUAGGroup* group = inDirectory->AddOneGroup(groupname, fullname, err);
	if (group == nil)
		ioParms.ReturnNullValue();
	else
	{
		ioParms.ReturnValue(VJSGroup::CreateInstance(ioParms.GetContext(), group));
		group->Release();
	}
}
开发者ID:StephaneH,项目名称:core-Components,代码行数:15,代码来源:JsUAG.cpp


示例20: _GetWord

void VJSStream::_GetWord(VJSParms_callStaticFunction& ioParms, VStream* inStream)
{
	sWORD w;
	VError err = inStream->GetWord(w);
	if (err == VE_OK)
		ioParms.ReturnNumber(w);
}
开发者ID:sanyaade-webdev,项目名称:core-XToolbox,代码行数:7,代码来源:VJSRuntime_stream.cpp



注:本文中的VJSParms_callStaticFunction类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ VLNString类代码示例发布时间:2022-05-31
下一篇:
C++ VImage类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap