本文整理汇总了C++中xbox::VString::EqualToUSASCIICString方法的典型用法代码示例。如果您正苦于以下问题:C++ VString::EqualToUSASCIICString方法的具体用法?C++ VString::EqualToUSASCIICString怎么用?C++ VString::EqualToUSASCIICString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xbox::VString
的用法示例。
在下文中一共展示了VString::EqualToUSASCIICString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _SetProperty
bool VJSStorageClass::_SetProperty (XBOX::VJSParms_setProperty &ioParms, VJSStorageObject *inStorageObject)
{
xbox_assert(inStorageObject != NULL);
XBOX::VString name;
if (!ioParms.GetPropertyName(name))
return true;
if (name.EqualToUSASCIICString("length"))
return true;
sLONG i;
for (i = 0; i < kNumberMethods; i++)
{
if (name.EqualToUSASCIICString(kMethodNames[i]))
return true;
}
inStorageObject->SetKeyValue(name, ioParms.GetPropertyValue());
return true;
}
示例2: _HasProperty
void VJSStorageClass::_HasProperty (XBOX::VJSParms_hasProperty &ioParms, VJSStorageObject *inStorageObject)
{
xbox_assert(inStorageObject != NULL);
XBOX::VString name;
if (!ioParms.GetPropertyName(name))
ioParms.ReturnFalse();
else {
if (inStorageObject->HasKey(name)
|| name.EqualToUSASCIICString("length"))
ioParms.ReturnTrue();
else {
sLONG i;
for (i = 0; i < kNumberMethods; i++)
if (name.EqualToUSASCIICString(kMethodNames[i]))
ioParms.ReturnTrue();
ioParms.ReturnFalse();
}
}
}
示例3: _GetProperty
void VJSStorageClass::_GetProperty (XBOX::VJSParms_getProperty &ioParms, VJSStorageObject *inStorageObject)
{
xbox_assert(inStorageObject != NULL);
XBOX::VString name;
if (!ioParms.GetPropertyName(name))
ioParms.ReturnNullValue();
else if (name.EqualToUSASCIICString("length")) {
XBOX::VJSValue length(ioParms.GetContext());
length.SetNumber(inStorageObject->NumberKeysValues());
ioParms.ReturnValue(length);
} else {
XBOX::VJSValue value(ioParms.GetContext());
value.SetNull();
sLONG i;
for (i = 0; i < kNumberMethods; i++)
if (name.EqualToUSASCIICString(kMethodNames[i])) {
ioParms.ForwardToParent();
break;
}
if (i == kNumberMethods) {
inStorageObject->GetKeyValue(name, &value);
ioParms.ReturnValue(value);
}
}
}