这篇教程C++ withReadLock函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中withReadLock函数的典型用法代码示例。如果您正苦于以下问题:C++ withReadLock函数的具体用法?C++ withReadLock怎么用?C++ withReadLock使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了withReadLock函数的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: withReadLockstd::array<EntityItemID, 3> PolyVoxEntityItem::getPNeigborIDs() const { std::array<EntityItemID, 3> result; withReadLock([&] { result = { { _xPNeighborID, _yPNeighborID, _zPNeighborID } }; }); return result;}
开发者ID:SeijiEmery,项目名称:hifi,代码行数:7,
示例2: withReadLockQString PolyLineEntityItem::getTextures() const { QString result; withReadLock([&] { result = _textures; }); return result;}
开发者ID:ZappoMan,项目名称:hifi,代码行数:7,
示例3: withReadLockvoid ObjectDynamic::removeFromSimulation(EntitySimulationPointer simulation) const { QUuid myID; withReadLock([&]{ myID = _id; }); simulation->removeDynamic(myID);}
开发者ID:ZappoMan,项目名称:hifi,代码行数:7,
示例4: withReadLockbool TextEntityItem::getFaceCamera() const { bool result; withReadLock([&] { result = _faceCamera; }); return result;}
开发者ID:SeijiEmery,项目名称:hifi,代码行数:7,
示例5: withReadLockvoid ObjectAction::removeFromSimulation(EntitySimulation* simulation) const { QUuid myID; withReadLock([&]{ myID = _id; }); simulation->removeAction(myID);}
开发者ID:Giugiogia,项目名称:hifi,代码行数:7,
示例6: withReadLockQString ZoneEntityItem::getCompoundShapeURL() const { QString result; withReadLock([&] { result = _compoundShapeURL; }); return result;}
开发者ID:cozza13,项目名称:hifi,代码行数:7,
示例7: COPY_ENTITY_PROPERTY_TO_PROPERTIESEntityItemProperties 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: withReadLockQVector<glm::vec3> LineEntityItem::getLinePoints() const { QVector<glm::vec3> result; withReadLock([&] { result = _points; }); return result;}
开发者ID:Nex-Pro,项目名称:hifi,代码行数:7,
示例9: dataStreamQByteArray 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: withReadLockconst QByteArray PolyVoxEntityItem::getVoxelData() const { QByteArray voxelDataCopy; withReadLock([&] { voxelDataCopy = _voxelData; }); return voxelDataCopy;}
开发者ID:AlphaStaxLLC,项目名称:hifi,代码行数:7,
示例11: withReadLockxColor LineEntityItem::getXColor() const { xColor result; withReadLock([&] { result = { _color[RED_INDEX], _color[GREEN_INDEX], _color[BLUE_INDEX] }; }); return result; }
开发者ID:cozza13,项目名称:hifi,代码行数:7,
示例12: withReadLockQVariantMap ObjectActionTravelOriented::getArguments() { QVariantMap arguments = ObjectDynamic::getArguments(); withReadLock([&] { arguments["forward"] = glmToQMap(_forward); arguments["angularTimeScale"] = _angularTimeScale; }); return arguments;}
开发者ID:cozza13,项目名称:hifi,代码行数:8,
示例13: withReadLockbool 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: withReadLockQVariantMap 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: withReadLockvoid 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函数代码示例 |