本文整理汇总了C++中VJSParms_callStaticFunction::GetStringParam方法的典型用法代码示例。如果您正苦于以下问题:C++ VJSParms_callStaticFunction::GetStringParam方法的具体用法?C++ VJSParms_callStaticFunction::GetStringParam怎么用?C++ VJSParms_callStaticFunction::GetStringParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VJSParms_callStaticFunction
的用法示例。
在下文中一共展示了VJSParms_callStaticFunction::GetStringParam方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: do_ProgressIndicator
void VJSGlobalClass::do_ProgressIndicator(VJSParms_callStaticFunction& ioParms, VJSGlobalObject *inContext)
{
VString sessiontile;
VString windowtile, userinfo;
bool caninterrupt = false;
Real maxvalue = -1;
VError err = VE_OK;
if (ioParms.IsNumberParam(1))
ioParms.GetRealParam(1, &maxvalue);
else
err = vThrowError(VE_JVSC_WRONG_PARAMETER_TYPE_NUMBER, "1");
if (err == VE_OK )
{
if (ioParms.IsStringParam(2))
ioParms.GetStringParam(2, sessiontile);
else
err = vThrowError(VE_JVSC_WRONG_PARAMETER_TYPE_STRING, "2");
}
caninterrupt = ioParms.GetBoolParam( 3, L"Can Interrupt", "Cannot Interrupt");
//VProgressIndicator* progress = inContext->GetRuntimeDelegate()->CreateProgressIndicator( windowtile);
if (err == VE_OK)
{
VProgressIndicator* progress = new VProgressIndicator();
if (progress != NULL)
{
if (ioParms.CountParams() >= 4)
{
if (ioParms.IsStringParam(4))
{
ioParms.GetStringParam(4, windowtile);
progress->SetTitle(windowtile);
}
else
vThrowError(VE_JVSC_WRONG_PARAMETER_TYPE_STRING, "4");
}
if (ioParms.CountParams() >= 5)
{
if (ioParms.IsStringParam(5))
{
ioParms.GetStringParam(5, userinfo);
progress->SetUserInfo(userinfo);
}
else
vThrowError(VE_JVSC_WRONG_PARAMETER_TYPE_STRING, "5");
}
progress->BeginSession((sLONG8)maxvalue, sessiontile, caninterrupt);
}
ioParms.ReturnValue(VJSProgressIndicator::CreateInstance(ioParms.GetContextRef(), progress));
ReleaseRefCountable( &progress);
}
else
ioParms.ReturnNullValue();
}
示例2: 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);
}
示例3: _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();
}
}
示例4: do_XmlToJSON
void VJSGlobalClass::do_XmlToJSON(VJSParms_callStaticFunction& ioParms, VJSGlobalObject*)
{
VString xml;
VString json, root;
bool simpleJSON = false;
ioParms.GetStringParam( 1, xml);
if ( ioParms.CountParams() >= 2)
{
VString s;
if (ioParms.IsStringParam(2))
{
ioParms.GetStringParam(2, s);
if(s== "json-bag")
{
simpleJSON = true;
root="bag";
if(ioParms.CountParams() >= 3)
{
if (ioParms.IsStringParam(3))
ioParms.GetStringParam(3, root);
else
vThrowError(VE_JVSC_WRONG_PARAMETER_TYPE_STRING, "3");
}
}
}
else
vThrowError(VE_JVSC_WRONG_PARAMETER_TYPE_STRING, "2");
}
if (simpleJSON)
{
XBOX::VValueBag *bag = new XBOX::VValueBag;
VError err = LoadBagFromXML( xml, root, *bag);
if(err == VE_OK)
bag->GetJSONString(json);
ReleaseRefCountable( &bag);
}
else
{
VString errorMessage; sLONG lineNumber;
VError err = VXMLJsonUtility::XMLToJson(xml, json, errorMessage, lineNumber);
}
ioParms.ReturnString(json);
}
示例5: do_isoToDate
void VJSGlobalClass::do_isoToDate(VJSParms_callStaticFunction& ioParms, VJSGlobalObject*)
{
VTime dd;
VString s;
ioParms.GetStringParam(1, s);
dd.FromJSONString(s);
ioParms.ReturnTime(dd);
}
示例6:
void VJSDirectory::_computeHA1(VJSParms_callStaticFunction& ioParms, CUAGDirectory* inDirectory)
{
VString userName, password, realm;
ioParms.GetStringParam(1, userName);
ioParms.GetStringParam(2, password);
ioParms.GetStringParam(3, realm);
if (realm.IsEmpty())
realm = "Wakanda";
CSecurityManager* securityManager = (CSecurityManager*)VComponentManager::RetainUniqueComponent(CSecurityManager::Component_Type);
if (securityManager != nil)
{
VString ha1 = securityManager->ComputeDigestHA1(userName, password, realm);
securityManager->Release();
ioParms.ReturnString(ha1);
}
}
示例7: _addUser
void VJSDirectory::_addUser(VJSParms_callStaticFunction& ioParms, CUAGDirectory* inDirectory)
{
VError err;
VString username, password, fullname;
ioParms.GetStringParam(1, username);
ioParms.GetStringParam(2, password);
ioParms.GetStringParam(3, fullname);
CUAGUser* user = inDirectory->AddOneUser(username, password, fullname, err);
if (user == nil)
ioParms.ReturnNullValue();
else
{
ioParms.ReturnValue(VJSUser::CreateInstance(ioParms.GetContext(), user));
user->Release();
}
}
示例8: do_JSONToXml
void VJSGlobalClass::do_JSONToXml(VJSParms_callStaticFunction& ioParms, VJSGlobalObject*)
{
VString xml;
VString json, root;
bool simpleJSON = false;
ioParms.GetStringParam( 1, json);
if ( ioParms.CountParams() >= 2)
{
VString s;
if (ioParms.IsStringParam(2))
{
ioParms.GetStringParam(2, s);
if(s== "json-bag")
{
simpleJSON = true;
root="bag";
if(ioParms.CountParams() >= 3)
{
if (ioParms.IsStringParam(3))
ioParms.GetStringParam(3, root);
else
vThrowError(VE_JVSC_WRONG_PARAMETER_TYPE_STRING, "3");
}
}
}
else
vThrowError(VE_JVSC_WRONG_PARAMETER_TYPE_STRING, "2");
}
if (simpleJSON)
{
XBOX::VValueBag *bag = new XBOX::VValueBag;
bag->FromJSONString(json);
xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
bag->DumpXML( xml, root, false);
ReleaseRefCountable( &bag);
}
else
{
VError err = VXMLJsonUtility::JsonToXML(json, xml);
}
ioParms.ReturnString(xml);
}
示例9: do_SetCurrentUser
void VJSGlobalClass::do_SetCurrentUser( VJSParms_callStaticFunction& inParms, VJSGlobalObject*)
{
VString username;
inParms.GetStringParam(1, username);
if (!username.IsEmpty())
{
// a faire ici ou dans VJSSolution ?
}
}
示例10: _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);
}
示例11: _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");
}
示例12: _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));
}
示例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);
}
}
示例14: 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);
}
}
示例15: _Read
void VJSTextStream::_Read (VJSParms_callStaticFunction &ioParms, VJSTextStreamState *inStreamState)
{
if (inStreamState == NULL)
XBOX::vThrowError(XBOX::VE_JVSC_INVALID_STATE, L"TextStream.read()");
else if (ioParms.CountParams() == 1 && ioParms.IsStringParam(1)) {
XBOX::VString delimiter;
if (!ioParms.GetStringParam(1, delimiter) || delimiter.GetLength() > 1)
XBOX::vThrowError(XBOX::VE_JVSC_WRONG_PARAMETER_TYPE_STRING, "1");
else {
XBOX::VString result;
bool hasBeenFound;
hasBeenFound = inStreamState->_ReadUntilDelimiter(delimiter, &result);
inStreamState->fPosition += result.GetLength();
if (hasBeenFound)
inStreamState->fPosition++; // Delimiter is not included.
ioParms.ReturnString(result);
}
} else {
// numberCharacters is the number of actual characters to read, not the number of bytes.
sLONG numberCharacters;
numberCharacters = 0;
if (ioParms.CountParams() >= 1 && (!ioParms.GetLongParam(1, &numberCharacters) || numberCharacters < 0))
XBOX::vThrowError(XBOX::VE_JVSC_WRONG_PARAMETER_TYPE_NUMBER, "1");
else {
XBOX::VString result;
inStreamState->_ReadCharacters(numberCharacters, &result);
inStreamState->fPosition += result.GetLength();
ioParms.ReturnString(result);
}
}
}