您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ withReadLock函数代码示例

51自学网 2021-06-03 09:59:42
  C++
这篇教程C++ withReadLock函数代码示例写得很实用,希望能帮到您。

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

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

示例1: withReadLock

std::array<EntityItemID, 3> PolyVoxEntityItem::getPNeigborIDs() const {    std::array<EntityItemID, 3> result;    withReadLock([&] {        result = { { _xPNeighborID, _yPNeighborID, _zPNeighborID } };    });    return result;}
开发者ID:SeijiEmery,项目名称:hifi,代码行数:7,


示例2: withReadLock

QString PolyLineEntityItem::getTextures() const {     QString result;    withReadLock([&] {        result = _textures;    });    return result;}
开发者ID:ZappoMan,项目名称:hifi,代码行数:7,


示例3: withReadLock

void ObjectDynamic::removeFromSimulation(EntitySimulationPointer simulation) const {    QUuid myID;    withReadLock([&]{        myID = _id;    });    simulation->removeDynamic(myID);}
开发者ID:ZappoMan,项目名称:hifi,代码行数:7,


示例4: withReadLock

bool TextEntityItem::getFaceCamera() const {     bool result;    withReadLock([&] {        result = _faceCamera;    });    return result;}
开发者ID:SeijiEmery,项目名称:hifi,代码行数:7,


示例5: withReadLock

void ObjectAction::removeFromSimulation(EntitySimulation* simulation) const {    QUuid myID;    withReadLock([&]{        myID = _id;    });    simulation->removeAction(myID);}
开发者ID:Giugiogia,项目名称:hifi,代码行数:7,


示例6: withReadLock

QString ZoneEntityItem::getCompoundShapeURL() const {     QString result;    withReadLock([&] {        result = _compoundShapeURL;    });    return result;}
开发者ID:cozza13,项目名称:hifi,代码行数:7,


示例7: COPY_ENTITY_PROPERTY_TO_PROPERTIES

EntityItemProperties ZoneEntityItem::getProperties(const EntityPropertyFlags& desiredProperties, bool allowEmptyDesiredProperties) const {    EntityItemProperties properties = EntityItem::getProperties(desiredProperties, allowEmptyDesiredProperties); // get the properties from our base class    COPY_ENTITY_PROPERTY_TO_PROPERTIES(shapeType, getShapeType);    COPY_ENTITY_PROPERTY_TO_PROPERTIES(compoundShapeURL, getCompoundShapeURL);    // Contain QString properties, must be synchronized    withReadLock([&] {        _keyLightProperties.getProperties(properties);        _ambientLightProperties.getProperties(properties);        _skyboxProperties.getProperties(properties);    });    _hazeProperties.getProperties(properties);    _bloomProperties.getProperties(properties);    COPY_ENTITY_PROPERTY_TO_PROPERTIES(flyingAllowed, getFlyingAllowed);    COPY_ENTITY_PROPERTY_TO_PROPERTIES(ghostingAllowed, getGhostingAllowed);    COPY_ENTITY_PROPERTY_TO_PROPERTIES(filterURL, getFilterURL);    COPY_ENTITY_PROPERTY_TO_PROPERTIES(keyLightMode, getKeyLightMode);    COPY_ENTITY_PROPERTY_TO_PROPERTIES(ambientLightMode, getAmbientLightMode);    COPY_ENTITY_PROPERTY_TO_PROPERTIES(skyboxMode, getSkyboxMode);    COPY_ENTITY_PROPERTY_TO_PROPERTIES(hazeMode, getHazeMode);    COPY_ENTITY_PROPERTY_TO_PROPERTIES(bloomMode, getBloomMode);    COPY_ENTITY_PROPERTY_TO_PROPERTIES(avatarPriority, getAvatarPriority);    return properties;}
开发者ID:Menithal,项目名称:hifi,代码行数:28,


示例8: withReadLock

QVector<glm::vec3> LineEntityItem::getLinePoints() const {     QVector<glm::vec3> result;    withReadLock([&] {        result = _points;    });    return result;}
开发者ID:Nex-Pro,项目名称:hifi,代码行数:7,


示例9: dataStream

QByteArray ObjectConstraintSlider::serialize() const {    QByteArray serializedConstraintArguments;    QDataStream dataStream(&serializedConstraintArguments, QIODevice::WriteOnly);    dataStream << DYNAMIC_TYPE_SLIDER;    dataStream << getID();    dataStream << ObjectConstraintSlider::constraintVersion;    withReadLock([&] {        dataStream << localTimeToServerTime(_expires);        dataStream << _tag;        dataStream << _pointInA;        dataStream << _axisInA;        dataStream << _otherID;        dataStream << _pointInB;        dataStream << _axisInB;        dataStream << _linearLow;        dataStream << _linearHigh;        dataStream << _angularLow;        dataStream << _angularHigh;    });    return serializedConstraintArguments;}
开发者ID:AndrewMeadows,项目名称:hifi,代码行数:25,


示例10: withReadLock

const QByteArray PolyVoxEntityItem::getVoxelData() const {    QByteArray voxelDataCopy;    withReadLock([&] {        voxelDataCopy = _voxelData;    });    return voxelDataCopy;}
开发者ID:AlphaStaxLLC,项目名称:hifi,代码行数:7,


示例11: withReadLock

xColor LineEntityItem::getXColor() const {     xColor result;    withReadLock([&] {        result = { _color[RED_INDEX], _color[GREEN_INDEX], _color[BLUE_INDEX] };    });    return result; }
开发者ID:cozza13,项目名称:hifi,代码行数:7,


示例12: withReadLock

QVariantMap ObjectActionTravelOriented::getArguments() {    QVariantMap arguments = ObjectDynamic::getArguments();    withReadLock([&] {        arguments["forward"] = glmToQMap(_forward);        arguments["angularTimeScale"] = _angularTimeScale;    });    return arguments;}
开发者ID:cozza13,项目名称:hifi,代码行数:8,


示例13: withReadLock

bool ObjectActionOffset::updateArguments(QVariantMap arguments) {    glm::vec3 pointToOffsetFrom;    float linearTimeScale;    float linearDistance;    bool needUpdate = false;    bool somethingChanged = ObjectAction::updateArguments(arguments);    withReadLock([&] {        bool ok = true;        pointToOffsetFrom =        EntityActionInterface::extractVec3Argument("offset action", arguments, "pointToOffsetFrom", ok, true);        if (!ok) {            pointToOffsetFrom = _pointToOffsetFrom;        }        ok = true;        linearTimeScale =        EntityActionInterface::extractFloatArgument("offset action", arguments, "linearTimeScale", ok, false);        if (!ok) {            linearTimeScale = _linearTimeScale;        }        ok = true;        linearDistance =        EntityActionInterface::extractFloatArgument("offset action", arguments, "linearDistance", ok, false);        if (!ok) {            linearDistance = _linearDistance;        }        // only change stuff if something actually changed        if (somethingChanged ||        _pointToOffsetFrom != pointToOffsetFrom ||        _linearTimeScale != linearTimeScale ||        _linearDistance != linearDistance) {            needUpdate = true;        }    });    if (needUpdate) {        withWriteLock([&] {            _pointToOffsetFrom = pointToOffsetFrom;            _linearTimeScale = linearTimeScale;            _linearDistance = linearDistance;            _positionalTargetSet = true;            _active = true;            auto ownerEntity = _ownerEntity.lock();            if (ownerEntity) {                ownerEntity->setActionDataDirty(true);            }        });        activateBody();    }    return true;}
开发者ID:CrackerHax,项目名称:hifi,代码行数:58,


示例14: withReadLock

/**jsdoc * The <code>"ball-socket"</code> {@link Entities.ActionType|ActionType} connects two entities with a ball and socket joint.  * It has arguments in addition to the common {@link Entities.ActionArguments|ActionArguments}. * * @typedef {object} Entities.ActionArguments-BallSocket * @property {Vec3} pivot=0,0,0 - The local offset of the joint relative to the entity's position. * @property {Uuid} otherEntityID=null - The ID of the other entity that is connected to the joint. * @property {Vec3} otherPivot=0,0,0 - The local offset of the joint relative to the other entity's position. */QVariantMap ObjectConstraintBallSocket::getArguments() {    QVariantMap arguments = ObjectDynamic::getArguments();    withReadLock([&] {        arguments["pivot"] = glmToQMap(_pivotInA);        arguments["otherEntityID"] = _otherID;        arguments["otherPivot"] = glmToQMap(_pivotInB);    });    return arguments;}
开发者ID:ZappoMan,项目名称:hifi,代码行数:18,


示例15: withReadLock

QVariantMap AvatarActionHold::getArguments() {    QVariantMap arguments = ObjectAction::getArguments();    withReadLock([&]{        arguments["relativePosition"] = glmToQMap(_relativePosition);        arguments["relativeRotation"] = glmToQMap(_relativeRotation);        arguments["timeScale"] = _linearTimeScale;        arguments["hand"] = _hand;    });    return arguments;}
开发者ID:pewing,项目名称:hifi,代码行数:10,


示例16: withReadLock

void Pointer::update(unsigned int pointerID) {    // This only needs to be a read lock because update won't change any of the properties that can be modified from scripts    withReadLock([&] {        auto pickResult = getPrevPickResult();        // Pointer needs its own PickResult object so it doesn't modify the cached pick result        auto visualPickResult = getVisualPickResult(getPickResultCopy(pickResult));        updateVisuals(visualPickResult);        generatePointerEvents(pointerID, visualPickResult);    });}
开发者ID:AndrewMeadows,项目名称:hifi,代码行数:10,



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


C++ withWriteLock函数代码示例
C++ wiringPiSetupGpio函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。