本文整理汇总了C++中PropertyString类的典型用法代码示例。如果您正苦于以下问题:C++ PropertyString类的具体用法?C++ PropertyString怎么用?C++ PropertyString使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PropertyString类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ServicePropertyValueString
const char* STDCALL ServicePropertyValueString(ServiceProperty aProperty)
{
// FIXME - no handling of PropertyError
PropertyString* prop = reinterpret_cast<PropertyString*>(aProperty);
ASSERT(prop != NULL);
Brhz buf(prop->Value());
return buf.Transfer();
}
示例2: ServicePropertySetValueString
uint32_t STDCALL ServicePropertySetValueString(ServiceProperty aProperty, const char* aValue)
{
PropertyString* prop = reinterpret_cast<PropertyString*>(aProperty);
ASSERT(prop != NULL);
Brhz val(aValue);
if (prop->SetValue(val)) {
return 1;
}
return 0;
}
示例3: SetPropertyString
bool DvProvider::SetPropertyString(PropertyString& aProperty, const Brx& aValue)
{
if (aProperty.SetValue(aValue)) {
TryPublishUpdate();
return true;
}
return false;
}
示例4:
Property * Sheet::setStringProperty(CellAddress key, const std::string & value)
{
Property * prop = props.getPropertyByName(key.toString().c_str());
PropertyString * stringProp = freecad_dynamic_cast<PropertyString>(prop);
if (!stringProp) {
if (prop) {
this->removeDynamicProperty(key.toString().c_str());
propAddress.erase(prop);
}
stringProp = freecad_dynamic_cast<PropertyString>(props.addDynamicProperty("App::PropertyString", key.toString().c_str(), 0, 0, Prop_ReadOnly | Prop_Hidden | Prop_Transient));
}
propAddress[stringProp] = key;
stringProp->setValue(value.c_str());
return stringProp;
}
示例5: ServicePropertyGetValueString
int32_t STDCALL ServicePropertyGetValueString(ServiceProperty aProperty, const char** aData, uint32_t* aLen)
{
PropertyString* prop = reinterpret_cast<PropertyString*>(aProperty);
ASSERT(prop != NULL);
int32_t err = 0;
try {
Brhz buf(prop->Value());
if (buf.Bytes() == 0) {
*aData = NULL;
*aLen = 0;
}
else {
*aLen = buf.Bytes();
*aData = buf.Transfer();
}
}
catch (PropertyError&) {
err = -1;
}
return err;
}
示例6: while
Var ForInObjectEnumerator::GetCurrentAndMoveNext(PropertyId& propertyId)
{
JavascriptEnumerator *pEnumerator = currentEnumerator;
PropertyRecord const * propRecord;
PropertyAttributes attributes = PropertyNone;
while (true)
{
propertyId = Constants::NoProperty;
currentIndex = pEnumerator->GetCurrentAndMoveNext(propertyId, &attributes);
#if ENABLE_COPYONACCESS_ARRAY
JavascriptLibrary::CheckAndConvertCopyOnAccessNativeIntArray<Var>(currentIndex);
#endif
if (currentIndex)
{
if (firstPrototype == nullptr)
{
// We are calculating correct shadowing for non-enumerable properties of the child object, we will receive
// both enumerable and non-enumerable properties from GetCurrentAndMoveNext so we need to check before we simply
// return here. If this property is non-enumerable we're going to skip it.
if (!(attributes & PropertyEnumerable))
{
continue;
}
// There are no prototype that has enumerable properties,
// don't need to keep track of the propertyIds we visited.
return currentIndex;
}
// Property Id does not exist.
if (propertyId == Constants::NoProperty)
{
if (!JavascriptString::Is(currentIndex)) //This can be undefined
{
continue;
}
JavascriptString *pString = JavascriptString::FromVar(currentIndex);
if (VirtualTableInfo<Js::PropertyString>::HasVirtualTable(pString))
{
// If we have a property string, it is assumed that the propertyId is being
// kept alive with the object
PropertyString * propertyString = (PropertyString *)pString;
propertyId = propertyString->GetPropertyRecord()->GetPropertyId();
}
else
{
ScriptContext* scriptContext = pString->GetScriptContext();
scriptContext->GetOrAddPropertyRecord(pString->GetString(), pString->GetLength(), &propRecord);
propertyId = propRecord->GetPropertyId();
// We keep the track of what is enumerated using a bit vector of propertyID.
// so the propertyId can't be collected until the end of the for in enumerator
// Keep a list of the property string.
newPropertyStrings.Prepend(GetScriptContext()->GetRecycler(), propRecord);
}
}
//check for shadowed property
if (TestAndSetEnumerated(propertyId) //checks if the property is already enumerated or not
&& (attributes & PropertyEnumerable))
{
return currentIndex;
}
}
else
{
if (object == baseObject)
{
if (firstPrototype == nullptr)
{
return NULL;
}
object = firstPrototype;
}
else
{
//walk the prototype chain
object = object->GetPrototype();
if ((object == NULL) || (JavascriptOperators::GetTypeId(object) == TypeIds_Null))
{
return NULL;
}
}
do
{
if (!GetCurrentEnumerator())
{
return nullptr;
}
pEnumerator = currentEnumerator;
if (!VirtualTableInfo<Js::NullEnumerator>::HasVirtualTable(pEnumerator))
{
break;
}
//walk the prototype chain
object = object->GetPrototype();
//.........这里部分代码省略.........
示例7: AssertMsg
JavascriptString * DynamicObjectPropertyEnumerator::MoveAndGetNextWithCache(PropertyId& propertyId, PropertyAttributes* attributes)
{
#if ENABLE_TTD
AssertMsg(!this->scriptContext->GetThreadContext()->IsRuntimeInTTDMode(), "We should always trap out to explicit enumeration in this case");
#endif
Assert(enumeratedCount <= cachedData->cachedCount);
JavascriptString* propertyStringName;
PropertyAttributes propertyAttributes = PropertyNone;
if (enumeratedCount < cachedData->cachedCount)
{
PropertyString * propertyString = cachedData->strings[enumeratedCount];
propertyStringName = propertyString;
propertyId = propertyString->GetPropertyId();
#if DBG
PropertyId tempPropertyId;
/* JavascriptString * tempPropertyString = */ this->MoveAndGetNextNoCache(tempPropertyId, attributes);
Assert(tempPropertyId == propertyId);
Assert(this->objectIndex == cachedData->indexes[enumeratedCount]);
#endif
this->objectIndex = cachedData->indexes[enumeratedCount];
propertyAttributes = cachedData->attributes[enumeratedCount];
enumeratedCount++;
}
else if (!cachedData->completed)
{
propertyStringName = this->MoveAndGetNextNoCache(propertyId, &propertyAttributes);
if (propertyStringName)
{
PropertyString* propertyString = PropertyString::TryFromVar(propertyStringName);
if (propertyString != nullptr)
{
Assert(enumeratedCount < this->initialPropertyCount);
cachedData->strings[enumeratedCount] = propertyString;
cachedData->indexes[enumeratedCount] = this->objectIndex;
cachedData->attributes[enumeratedCount] = propertyAttributes;
cachedData->cachedCount = ++enumeratedCount;
}
}
else
{
cachedData->completed = true;
}
}
else
{
#if DBG
PropertyId tempPropertyId;
Assert(this->MoveAndGetNextNoCache(tempPropertyId, attributes) == nullptr);
#endif
propertyStringName = nullptr;
}
if (attributes != nullptr)
{
*attributes = propertyAttributes;
}
return propertyStringName;
}
示例8: PropertyReadLock
void CpProxyUpnpOrgConnectionManager1C::PropertySinkProtocolInfo(Brhz& aSinkProtocolInfo) const
{
PropertyReadLock();
ASSERT(IsSubscribed());
aSinkProtocolInfo.Set(iSinkProtocolInfo->Value());
PropertyReadUnlock();
}
示例9: PropertyReadLock
void CpProxyAvOpenhomeOrgInfo1C::PropertyCodecName(Brhz& aCodecName) const
{
PropertyReadLock();
ASSERT(IsSubscribed());
aCodecName.Set(iCodecName->Value());
PropertyReadUnlock();
}
示例10: PropertyReadLock
void CpProxyAvOpenhomeOrgSender1C::PropertyAttributes(Brhz& aAttributes) const
{
PropertyReadLock();
ASSERT(IsSubscribed());
aAttributes.Set(iAttributes->Value());
PropertyReadUnlock();
}
示例11:
void DvProviderAvOpenhomeOrgInfo1C::GetPropertyCodecName(Brhz& aValue)
{
aValue.Set(iPropertyCodecName->Value());
}
示例12: ASSERT
void DvProviderLinnCoUkCloud1C::GetPropertyPublicKey(Brhz& aValue)
{
ASSERT(iPropertyPublicKey != NULL);
aValue.Set(iPropertyPublicKey->Value());
}
示例13: ASSERT
void DvProviderUpnpOrgAVTransport1C::GetPropertyLastChange(Brhz& aValue)
{
ASSERT(iPropertyLastChange != NULL);
aValue.Set(iPropertyLastChange->Value());
}
示例14: a
void CpProxyLinnCoUkExaktInputs1C::PropertyAssociations(Brhz& aAssociations) const
{
AutoMutex a(GetPropertyReadLock());
CheckSubscribed();
aAssociations.Set(iAssociations->Value());
}
示例15: a
void CpProxyAvOpenhomeOrgExakt2C::PropertyVersion(Brhz& aVersion) const
{
AutoMutex a(GetPropertyReadLock());
CheckSubscribed();
aVersion.Set(iVersion->Value());
}