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

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

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

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

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

示例1: patch

void Foam::fixedFluxPressureFvPatchScalarField::updateCoeffs(){    if (updated())    {        return;    }    const fvPatchField<vector>& Up =        patch().lookupPatchField<volVectorField, vector>(UName_);    const surfaceScalarField& phi =        db().lookupObject<surfaceScalarField>(phiName_);    fvsPatchField<scalar> phip =        patch().patchField<surfaceScalarField, scalar>(phi);    if (phi.dimensions() == dimDensity*dimVelocity*dimArea)    {        const fvPatchField<scalar>& rhop =            patch().lookupPatchField<volScalarField, scalar>(rhoName_);        phip /= rhop;    }    const fvPatchField<scalar>& rAp =        patch().lookupPatchField<volScalarField, scalar>("(1|A("+UName_+"))");    if (adjoint_)    {        gradient() = ((patch().Sf() & Up) - phip)/patch().magSf()/rAp;    }    else    {        gradient() = (phip - (patch().Sf() & Up))/patch().magSf()/rAp;    }    fixedGradientFvPatchScalarField::updateCoeffs();}
开发者ID:Mat-moran,项目名称:OpenFOAM-2.0.x,代码行数:38,


示例2: setState

void LiveStream::updateFrame(){    if (state() < Connecting || !m_thread || !m_thread->isRunning())        return;    if (++m_fpsUpdateCnt == int(1.5*renderTimerFps))    {        m_fps = m_fpsUpdateHits/1.5;        m_fpsUpdateCnt = m_fpsUpdateHits = 0;    }    if (!m_thread || !m_thread->hasWorker())        return;    LiveStreamFrame *sf = m_thread->frameToDisplay();    if (!sf) // no new frame        return;    delete m_frame;    m_frame = sf;    m_fpsUpdateHits++;    if (state() == Connecting)        setState(Streaming);    m_frameInterval.restart();    QMutexLocker locker(&m_currentFrameMutex);    bool sizeChanged = (m_currentFrame.width() != sf->avFrame()->width ||                        m_currentFrame.height() != sf->avFrame()->height);    m_currentFrame = QImage(sf->avFrame()->data[0], sf->avFrame()->width, sf->avFrame()->height,                            sf->avFrame()->linesize[0], QImage::Format_RGB32).copy();    if (sizeChanged)        emit streamSizeChanged(m_currentFrame.size());    emit updated();}
开发者ID:lzk315,项目名称:bluecherry-client,代码行数:38,


示例3: widgetPointToPoint

void LinearTransferFunctionWidget::mouseMoveEvent(QMouseEvent * event){  QWidget::mouseMoveEvent(event);  if(selectedPointIndex != -1) {    QPointF widgetMousePoint = event->posF();    QPointF mousePoint = widgetPointToPoint(widgetMousePoint);    // Clamp x value.    if(selectedPointIndex == 0) {      // the first point must have x == 0.      mousePoint.rx() = 0.;    }    else if(selectedPointIndex == points.size() - 1) {      // The last point must have x == 1.      mousePoint.rx() = 1.;    }    else {      // Intermediate points must have x between their neighbors.      mousePoint.rx() = std::max(mousePoint.x(), points[selectedPointIndex - 1].x());      mousePoint.rx() = std::min(mousePoint.x(), points[selectedPointIndex + 1].x());    }    // Clamp y value.    mousePoint.ry() = std::min(mousePoint.y(), 1.);    mousePoint.ry() = std::max(mousePoint.y(), 0.);    points[selectedPointIndex] = mousePoint;    repaint();    if(updateDuringChange == true)      emit updated();  }}
开发者ID:Acidburn0zzz,项目名称:OSPRay,代码行数:38,


示例4: switch

void Process::setStatus(Status const status){   if (m_status == status) return;   m_status = status;   switch (m_status) {      case NotRunning:         break;      case Queued:         m_submitTime = QTime::currentTime().toString("h:mm:ss");         break;      case Running:         m_timer.start();         break;      case Suspended:         m_timer.stop();         break;      case Killed:         m_timer.stop();         break;      case Error:         m_timer.stop();         finished();         break;      case Finished:         m_timer.stop();         finished();         break;      case Copying:         QLOG_ERROR() << "Process::setStatus called while Copying";         break;      case Unknown:         m_timer.stop();         break;   }   updated();}
开发者ID:epifanovsky,项目名称:IQmol,代码行数:38,


示例5: UserLadderStats

void User::update(const protobufs::UserStats &stats, const QList<Map*> &map_pool, const QMap<int, Division*> &divisions){	this->state_ = ErosUserState::Known;	this->username_ = QString::fromStdString(stats.username());	this->id_ = stats.id();    this->ladder_stats_global_ = new UserLadderStats(this, stats.wins(), stats.losses(), stats.forfeits(), stats.walkovers(), stats.points(), stats.mmr() * 100, stats.placements_remaining(), divisions[stats.division()], stats.division_rank());	this->division_ = this->ladder_stats_global_->division();	this->search_radius_ = stats.search_radius();	for (int i = 0; i < stats.region_size(); i++)	{		const protobufs::UserRegionStats &region = stats.region(i);        this->ladder_stats_[(ErosRegion)region.region()] = new UserLadderStats(this, region.wins(), region.losses(), region.forfeits(), region.walkovers(), region.points(), region.mmr() * 100, region.placements_remaining(), divisions[region.division()], region.division_rank());	}	this->vetoes_.clear();	for (int i = 0; i < stats.vetoes_size(); i++)	{		const protobufs::Map &map_buffer = stats.vetoes(i);		for (int j = 0; j < map_pool.size(); j++)		{			if (map_pool[j]->battleNetId() == map_buffer.battle_net_id() && map_pool[j]->region() == map_buffer.region())			{				this->vetoes_ << map_pool[j];				break;			}		}	}	if (this->first_update_)	{		this->first_update_ = false;	} 	else	{		emit updated(this);	}	}
开发者ID:Starbow,项目名称:liberos,代码行数:38,


示例6: QAbstractItemModel

PackageModel::PackageModel( QObject* parent )    : QAbstractItemModel( parent )    , storage( 0 ){    networked = AbstractPackageController::factory( AbstractPackageController::network, this );    installed = AbstractPackageController::factory( AbstractPackageController::installed, this );    // can only have a max of 15 top level items    rootItems << installed << networked;    //this must stay in sync with installedIndex    //and networkedIndex    for ( int i = 0; i < rootItems.count(); i++ )        connect( rootItems[i], SIGNAL(updated()),                 this, SLOT(controllerUpdate()) );    connect( networked, SIGNAL(packageInstalled(InstallControl::PackageInfo)),             installed, SLOT(addPackage(InstallControl::PackageInfo)) );    connect( networked, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),             this, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)));    connect( networked, SIGNAL(rowsRemoved(QModelIndex,int,int)),             this, SIGNAL(rowsRemoved(QModelIndex,int,int)));    connect( networked, SIGNAL(packageInstalled(InstallControl::PackageInfo)),             this, SLOT(packageInstalled(InstallControl::PackageInfo)) );    connect( networked, SIGNAL(serverStatus(QString)),             this, SLOT(serverStatusUpdated(QString)) );    // can only have a max of 4 columns, if more are needed, change the    // macros used for PackageModel::index(...) below    // columnHeads << "Name" << "Size";    QStorageMetaInfo *s = QStorageMetaInfo::instance();    connect( s, SIGNAL(disksChanged()),             this, SLOT(publishTargets()) );    connect( this, SIGNAL(targetsUpdated(QStringList)),             installed, SLOT(reloadInstalledLocations(QStringList)) );    if ( !QDir( Qtopia::packagePath() ).exists() )        QDir::root().mkpath( Qtopia::packagePath() );}
开发者ID:rgfernandes,项目名称:qtextended,代码行数:38,


示例7: findItems

//==================================================// == Set An Option's  Valuevoid XSettingsModel::set_value(QString option, QString value){	//qDebug() << "set " << option << _loading;	if(_loading){		return;	}	//= Find item matching the "option"	QList<QStandardItem *>items = findItems(option, Qt::MatchExactly,C_OPTION);	//qDebug() << "opts" << items;	//TODO handle error if not found	//= Get/update the "enabled" item in the same row	QStandardItem *vItem = item(items[0]->row(),C_VALUE);	vItem->setText(value);	QStandardItem *eItem = item(items[0]->row(),C_ENABLED);	emit upx(option, eItem->text() == "1",  value);	emit updated(get_fgfs_list());}
开发者ID:fg-hams,项目名称:fgx,代码行数:25,


示例8: db

void Foam::SRFFreestreamVelocityFvPatchVectorField::updateCoeffs(){    if (updated())    {        return;    }    // Get reference to the SRF model    const SRF::SRFModel& srf =        db().lookupObject<SRF::SRFModel>("SRFProperties");    scalar time = this->db().time().value();    scalar theta = time*mag(srf.omega().value());    refValue() =        cos(theta)*UInf_ + sin(theta)*(srf.axis() ^ UInf_)      - srf.velocity(patch().Cf());    // Set the inlet-outlet choice based on the direction of the freestream    valueFraction() = 1.0 - pos(refValue() & patch().Sf());    mixedFvPatchField<vector>::updateCoeffs();}
开发者ID:000861,项目名称:OpenFOAM-2.1.x,代码行数:23,


示例9: itemAboutToBeDestroyed

intScene::erase(int index){    if(index < 0 || index >= m_entries.size())        return -1;    Scene_item* item = m_entries[index];  Q_EMIT itemAboutToBeDestroyed(item);    delete item;    m_entries.removeAt(index);  selected_item = -1;  QAbstractListModel::beginResetModel();  Q_EMIT updated();  QAbstractListModel::endResetModel();    if(--index >= 0)        return index;    if(!m_entries.isEmpty())        return 0;    return -1;}
开发者ID:somanypeople,项目名称:cgal,代码行数:23,


示例10: XWidget

uninvoicedShipments::uninvoicedShipments(QWidget* parent, const char* name, Qt::WindowFlags fl)    : XWidget(parent, name, fl){  setupUi(this);  connect(_print, SIGNAL(clicked()), this, SLOT(sPrint()));  connect(_close, SIGNAL(clicked()), this, SLOT(close()));  connect(_showUnselected, SIGNAL(toggled(bool)), this, SLOT(sFillList()));  connect(_shipitem, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*)));  connect(_warehouse, SIGNAL(updated()), this, SLOT(sFillList()));  _shipitem->setRootIsDecorated(true);  _shipitem->addColumn(tr("Order/Line #"),           _itemColumn, Qt::AlignRight,  true,  "orderline" );  _shipitem->addColumn(tr("Cust./Item Number"),      _itemColumn, Qt::AlignLeft,   true,  "custitem"  );  _shipitem->addColumn(tr("Cust. Name/Description"), -1,          Qt::AlignLeft,   true,  "custdescrip"  );  _shipitem->addColumn(tr("UOM"),                    _uomColumn,  Qt::AlignLeft,   true,  "uom_name"  );  _shipitem->addColumn(tr("Shipped"),                _qtyColumn,  Qt::AlignRight,  true,  "shipped" );  _shipitem->addColumn(tr("Approved"),               _qtyColumn,  Qt::AlignRight,  true,  "selected" );    connect(omfgThis, SIGNAL(billingSelectionUpdated(int, int)), this, SLOT(sFillList()));  sFillList();}
开发者ID:dwatson78,项目名称:qt-client,代码行数:23,


示例11: db

void Foam::SRFcylindricalInletVelocityFvPatchVectorField::updateCoeffs(){    if (updated())    {        return;    }    vector hatAxis = axis_/mag(axis_); // unit vector of axis of rotation    vectorField r = (patch().Cf() - centre_); // defining vector origin to face centre    vectorField d =  r - (hatAxis & r)*hatAxis; // subtract out axial-component    vectorField dhat = d/mag(d); // create unit-drection vector    vectorField tangVelo =  (tangentVelocity_)*(hatAxis)^dhat; // tangentialVelocity * zhat X rhat    // If relative, include the effect of the SRF    if (relative_)    {        // Get reference to the SRF Model	const SRF::SRFModel& srf =	     db().lookupObject<SRF::SRFModel>("SRFProperties");        // Determine patch velocity due to SRF	const vectorField SRFVelocity = srf.velocity(patch().Cf());	operator==(-SRFVelocity + tangVelo + hatAxis*axialVelocity_ + radialVelocity_*dhat); // combine components into vector form    }    // If absolute, simply supply the inlet value as a fixed value    else    {        operator==(tangVelo + hatAxis*axialVelocity_ + radialVelocity_*dhat);    }    fixedValueFvPatchField<vector>::updateCoeffs();}
开发者ID:SirIsaac90,项目名称:openfoam-extend-Breeder2.0-OSIG-TurboMachinery,代码行数:37,


示例12: updateCoeffs

void temperatureDirectedInletOutletVelocityFvPatchVectorField::updateCoeffs(){    if (updated())    {        return;    }    const vectorField& C = patch().Cf();    vectorField rotationVelocity = omega_ ^ C;    vectorField inletDirCCS = inletDir_/mag(inletDir_);    vectorField inletDir(inletDirCCS);    if (cylindricalCCS_)    {        scalar radius;        forAll(C, facei)        {            radius = sqrt(sqr(C[facei].x())+ sqr(C[facei].y()));            inletDir[facei].z() = inletDirCCS[facei].z();            if (radius > 0.0)            {                inletDir[facei].x() =                    (C[facei].x()*inletDirCCS[facei].x()                    - C[facei].y()*inletDirCCS[facei].y())/radius;                inletDir[facei].y() =                    (C[facei].y()*inletDirCCS[facei].x()                    + C[facei].x()*inletDirCCS[facei].y())/radius;            }            else            {                inletDir[facei].x() = 0.0;                inletDir[facei].y() = 0.0;            }        }    }
开发者ID:Kiiree,项目名称:DensityBasedTurbo,代码行数:37,


示例13: motion_model

void Simulation::move(VelocityControl *control) {    if (!m_motionModel || !m_sensorModel) {        return;    }    pfcpp::OdometryMotionModelSampler motion_model(m_motionModel->params());    pfcpp::BeamSensorModel sensor_model(        {m_sensorModel->maxRange(),         {m_sensorModel->a0(), m_sensorModel->a1(), m_sensorModel->a2(), m_sensorModel->a3()},         m_sensorModel->sigma(),         m_sensorModel->lambda()});    pfcpp::VelocityMotionModelSampler movement;    pimpl->robot_pos = movement(pimpl->robot_pos, *control);    std::vector<double> actual_measument;    std::vector<pfcpp::maps::ShapesMap::Position> sense_points;    std::tie(actual_measument, sense_points) = flatworld::measurement_with_coords(        pimpl->robot_pos, pimpl->map, m_mcl->numberOfBeams(), m_sensorModel->maxRange());    auto expected_measument = [&](auto p) {        return flatworld::measurement(p, pimpl->map, m_mcl->numberOfBeams(),                                      m_sensorModel->maxRange());    };    pimpl->pf([&](auto p) { return sensor_model(actual_measument, expected_measument(p)); },              [&](auto p) { return motion_model(p, movement(p, *control)); });    m_sensorBeams.clear();    for (auto p : sense_points) {        m_sensorBeams.push_back(std::make_shared<PointW>(QPointF{std::get<0>(p), std::get<1>(p)}));    }    m_currentPose->setPosition({pimpl->robot_pos.x, pimpl->robot_pos.y});    updateParticlesList();    emit updated();}
开发者ID:peter-popov,项目名称:cppslam,代码行数:37,


示例14: QDialog

SurfaceAnimatorDialog::SurfaceAnimatorDialog(Layer::Molecule* molecule) :    QDialog(QApplication::activeWindow()), m_molecule(molecule), m_loop(false),    m_bounce(false), m_updateBonds(false), m_animator(0){    m_dialog.setupUi(this);    m_colorPositive = Preferences::PositiveSurfaceColor();    m_colorNegative = Preferences::NegativeSurfaceColor();    setPositiveColor(m_colorPositive);    setNegativeColor(m_colorNegative);    m_dialog.playbackBox->setEnabled(false);    m_dialog.speedSlider->setValue(25);    on_speedSlider_valueChanged(25);    m_dialog.transparencySlider->setValue(100);    connect(this, SIGNAL(pushAnimators(AnimatorList const&)),            m_molecule, SIGNAL(pushAnimators(AnimatorList const&)));    connect(this, SIGNAL(popAnimators(AnimatorList const&)),            m_molecule, SIGNAL(popAnimators(AnimatorList const&)));    connect(this, SIGNAL(updated()), m_molecule, SIGNAL(softUpdate()));}
开发者ID:susilehtola,项目名称:IQmol,代码行数:24,


示例15: lm_message_new_with_sub_type

voidLM::HeapRoster::handle_up (LmConnection* connection_,			   const std::string name_){  connection = connection_;  name = name_;  { // populate the roster    LmMessage* roster_request = lm_message_new_with_sub_type (NULL, LM_MESSAGE_TYPE_IQ, LM_MESSAGE_SUB_TYPE_GET);    LmMessageNode* node = lm_message_node_add_child (lm_message_get_node (roster_request), "query", NULL);    lm_message_node_set_attributes (node, "xmlns", "jabber:iq:roster", NULL);    lm_connection_send_with_reply (connection, roster_request,				   build_message_handler (boost::bind (&LM::HeapRoster::handle_initial_roster_reply, this, _1, _2)), NULL);    lm_message_unref (roster_request);  }  { // initial presence push    LmMessage* presence_push = lm_message_new (NULL, LM_MESSAGE_TYPE_PRESENCE);    lm_connection_send (connection, presence_push, NULL);    lm_message_unref (presence_push);  }  on_personal_details_updated (); // fake, but if we start as dnd, we want it known  updated ();}
开发者ID:GNOME,项目名称:ekiga,代码行数:24,


示例16: QString

void KisGmicUpdater::finishedDownload(QNetworkReply*reply){    if(reply->error() != QNetworkReply::NoError)    {        dbgPlugins << "NetworkReply error : " << reply->errorString();    }    dbgPlugins << "bytes available: " << reply->bytesAvailable();    dbgPlugins << reply->url() << " finished";    QString path = KGlobal::dirs()->saveLocation("gmic_definitions");    QString fileName = reply->url().path().split("/").last();    QByteArray data = reply->readAll();    QString tmpfilePath = path + fileName + QString(".cimgz");    QFile out(tmpfilePath);    out.open(QIODevice::WriteOnly);    out.write(data);    out.close();    QString filePathDst = path + fileName;    std::FILE *file = std::fopen(tmpfilePath.toUtf8().constData(),"rb");    cimg_library::CImg<unsigned char> buffer;    buffer.load_cimg(file);    buffer.save_raw(filePathDst.toUtf8().constData());    std::fclose(file);    if (!QFile::remove(tmpfilePath))    {        dbgPlugins << "Cannot delete " << tmpfilePath;    }    emit updated();}
开发者ID:woylaski,项目名称:kexi,代码行数:36,


示例17: QLatin1String

bool QNetworkManagerSettingsConnection::setConnections(){    if (!isValid())        return false;    QDBusConnection dbusConnection = QDBusConnection::systemBus();    bool allOk = true;    if (!dbusConnection.connect(service(),                               interfacepath,                               QLatin1String(NM_DBUS_IFACE_SETTINGS_CONNECTION),                               QLatin1String("Updated"),                               this, SIGNAL(updated()))) {        allOk = false;    }    if (!dbusConnection.connect(service(),                               interfacepath,                               QLatin1String(NM_DBUS_IFACE_SETTINGS_CONNECTION),                               QLatin1String("Removed"),                               this, SIGNAL(slotSettingsRemoved()))) {        allOk = false;    }    return allOk;}
开发者ID:James-intern,项目名称:Qt,代码行数:24,


示例18: updateCoeffs

void rotatingTotalPressureFvPatchScalarField::updateCoeffs(){    if (updated())    {        return;    }    if (!this->db().objectRegistry::found(UName()))    {        // U not available, do not update        totalPressureFvPatchScalarField::updateCoeffs();        return;    }    vector axisHat = omega_/mag(omega_);    vectorField rotationVelocity =        omega_ ^ (patch().Cf() - axisHat*(axisHat & patch().Cf()));    vectorField Up = lookupPatchField<volVectorField, vector>(UName())        + rotationVelocity;    totalPressureFvPatchScalarField::updateCoeffs(Up);}
开发者ID:CFMS,项目名称:foam-extend-foam-extend-3.2,代码行数:24,


示例19: itemAboutToBeDestroyed

CGAL::Three::Scene_item*Scene::replaceItem(Scene::Item_id index, CGAL::Three::Scene_item* item, bool emit_item_about_to_be_destroyed){    if(index < 0 || index >= m_entries.size())        return 0;    if(emit_item_about_to_be_destroyed) {    Q_EMIT itemAboutToBeDestroyed(m_entries[index]);    }    connect(item, SIGNAL(itemChanged()),            this, SLOT(itemChanged()));    std::swap(m_entries[index], item);    if ( item->isFinite() && !item->isEmpty() &&         m_entries[index]->isFinite() && !m_entries[index]->isEmpty() &&         item->bbox()!=m_entries[index]->bbox() )    {    Q_EMIT updated_bbox();    }  Q_EMIT updated();    itemChanged(index);    Q_EMIT restoreCollapsedState();    return item;}
开发者ID:freehawkzk,项目名称:cgal,代码行数:24,


示例20: QObject

Mpris::Mpris(QObject *p)    : QObject(p)    , pos(-1){    QDBusConnection::sessionBus().registerService("org.mpris.MediaPlayer2.cantata");    new PlayerAdaptor(this);    new MediaPlayer2Adaptor(this);    QDBusConnection::sessionBus().registerObject("/org/mpris/MediaPlayer2", this, QDBusConnection::ExportAdaptors);    connect(this, SIGNAL(setRandom(bool)), MPDConnection::self(), SLOT(setRandom(bool)));    connect(this, SIGNAL(setRepeat(bool)), MPDConnection::self(), SLOT(setRepeat(bool)));    connect(this, SIGNAL(setSeekId(qint32, quint32)), MPDConnection::self(), SLOT(setSeekId(qint32, quint32)));    connect(this, SIGNAL(setVolume(int)), MPDConnection::self(), SLOT(setVolume(int)));//    connect(MPDConnection::self(), SIGNAL(currentSongUpdated(const Song &)), this, SLOT(updateCurrentSong(const Song &)));    connect(MPDStatus::self(), SIGNAL(updated()), this, SLOT(updateStatus()));    if (mprisPath.isEmpty()) {        mprisPath=QLatin1String(CANTATA_REV_URL);        mprisPath.replace(".", "/");        mprisPath="/"+mprisPath+"/Track/%1";    }    connect(CurrentCover::self(), SIGNAL(coverFile(const QString &)), this, SLOT(updateCurrentCover(const QString &)));}
开发者ID:edhelas,项目名称:cantata,代码行数:24,



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


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