当前位置: 首页>>代码示例>>C++>>正文


C++ PropertyString类代码示例

本文整理汇总了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();
}
开发者ID:MatthewMiddleweek,项目名称:ohNet,代码行数:8,代码来源:ServiceC.cpp

示例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;
}
开发者ID:MatthewMiddleweek,项目名称:ohNet,代码行数:10,代码来源:ServiceC.cpp

示例3: SetPropertyString

bool DvProvider::SetPropertyString(PropertyString& aProperty, const Brx& aValue)
{
    if (aProperty.SetValue(aValue)) {
        TryPublishUpdate();
        return true;
    }
    return false;
}
开发者ID:wifigeek,项目名称:ohNet,代码行数:8,代码来源:DvProvider.cpp

示例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;
}
开发者ID:pgilfernandez,项目名称:FreeCAD,代码行数:18,代码来源:Sheet.cpp

示例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;
}
开发者ID:MatthewMiddleweek,项目名称:ohNet,代码行数:21,代码来源:ServiceC.cpp

示例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();
//.........这里部分代码省略.........
开发者ID:digitalinfinity,项目名称:ChakraCore,代码行数:101,代码来源:ForInObjectEnumerator.cpp

示例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;
    }
开发者ID:mrkmarron,项目名称:ChakraCore,代码行数:66,代码来源:DynamicObjectPropertyEnumerator.cpp

示例8: PropertyReadLock

void CpProxyUpnpOrgConnectionManager1C::PropertySinkProtocolInfo(Brhz& aSinkProtocolInfo) const
{
    PropertyReadLock();
    ASSERT(IsSubscribed());
    aSinkProtocolInfo.Set(iSinkProtocolInfo->Value());
    PropertyReadUnlock();
}
开发者ID:ACDN,项目名称:ohNet,代码行数:7,代码来源:CpUpnpOrgConnectionManager1C.cpp

示例9: PropertyReadLock

void CpProxyAvOpenhomeOrgInfo1C::PropertyCodecName(Brhz& aCodecName) const
{
    PropertyReadLock();
    ASSERT(IsSubscribed());
    aCodecName.Set(iCodecName->Value());
    PropertyReadUnlock();
}
开发者ID:alexkit,项目名称:ohNet,代码行数:7,代码来源:CpAvOpenhomeOrgInfo1C.cpp

示例10: PropertyReadLock

void CpProxyAvOpenhomeOrgSender1C::PropertyAttributes(Brhz& aAttributes) const
{
    PropertyReadLock();
    ASSERT(IsSubscribed());
    aAttributes.Set(iAttributes->Value());
    PropertyReadUnlock();
}
开发者ID:astaykov,项目名称:ohNet,代码行数:7,代码来源:CpAvOpenhomeOrgSender1C.cpp

示例11:

void DvProviderAvOpenhomeOrgInfo1C::GetPropertyCodecName(Brhz& aValue)
{
    aValue.Set(iPropertyCodecName->Value());
}
开发者ID:wifigeek,项目名称:ohNet,代码行数:4,代码来源:DvAvOpenhomeOrgInfo1C.cpp

示例12: ASSERT

void DvProviderLinnCoUkCloud1C::GetPropertyPublicKey(Brhz& aValue)
{
    ASSERT(iPropertyPublicKey != NULL);
    aValue.Set(iPropertyPublicKey->Value());
}
开发者ID:openhome,项目名称:ohNetGenerated,代码行数:5,代码来源:DvLinnCoUkCloud1C.cpp

示例13: ASSERT

void DvProviderUpnpOrgAVTransport1C::GetPropertyLastChange(Brhz& aValue)
{
    ASSERT(iPropertyLastChange != NULL);
    aValue.Set(iPropertyLastChange->Value());
}
开发者ID:ACDN,项目名称:ohNet,代码行数:5,代码来源:DvUpnpOrgAVTransport1C.cpp

示例14: a

void CpProxyLinnCoUkExaktInputs1C::PropertyAssociations(Brhz& aAssociations) const
{
    AutoMutex a(GetPropertyReadLock());
    CheckSubscribed();
    aAssociations.Set(iAssociations->Value());
}
开发者ID:openhome,项目名称:ohNetGenerated,代码行数:6,代码来源:CpLinnCoUkExaktInputs1C.cpp

示例15: a

void CpProxyAvOpenhomeOrgExakt2C::PropertyVersion(Brhz& aVersion) const
{
    AutoMutex a(GetPropertyReadLock());
    CheckSubscribed();
    aVersion.Set(iVersion->Value());
}
开发者ID:Montellese,项目名称:ohNetGenerated,代码行数:6,代码来源:CpAvOpenhomeOrgExakt2C.cpp


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