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


C++ IServerSPtr::type方法代码示例

本文整理汇总了C++中IServerSPtr::type方法的典型用法代码示例。如果您正苦于以下问题:C++ IServerSPtr::type方法的具体用法?C++ IServerSPtr::type怎么用?C++ IServerSPtr::type使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IServerSPtr的用法示例。


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

示例1: openPropertyServerDialog

    void ExplorerTreeView::openPropertyServerDialog()
    {
        QModelIndex sel = selectedIndex();
        if(!sel.isValid()){
            return;
        }

        ExplorerServerItem *node = common::utils_qt::item<ExplorerServerItem*>(sel);
        if(!node){
            return;
        }

        IServerSPtr server = node->server();
        if(!server){
            return;
        }

        PropertyServerDialog infDialog(QString("%1 properties").arg(server->name()), server->type(), this);
        VERIFY(connect(server.get(), &IServer::startedLoadServerProperty, &infDialog, &PropertyServerDialog::startServerProperty));
        VERIFY(connect(server.get(), &IServer::finishedLoadServerProperty, &infDialog, &PropertyServerDialog::finishServerProperty));
        VERIFY(connect(server.get(), &IServer::startedChangeServerProperty, &infDialog, &PropertyServerDialog::startServerChangeProperty));
        VERIFY(connect(server.get(), &IServer::finishedChangeServerProperty, &infDialog, &PropertyServerDialog::finishServerChangeProperty));
        VERIFY(connect(&infDialog, &PropertyServerDialog::changedProperty, server.get(), &IServer::changeProperty));
        VERIFY(connect(&infDialog, &PropertyServerDialog::showed, server.get(), &IServer::serverProperty));
        infDialog.exec();
    }
开发者ID:TakedWind,项目名称:fastoredis,代码行数:26,代码来源:explorer_tree_view.cpp

示例2: DCHECK

 IDatabase::IDatabase(IServerSPtr server, DataBaseInfoSPtr info)
     : info_(info), server_(server)
 {
     DCHECK(server);
     DCHECK(info);
     DCHECK(server->type() == info->type());
 }
开发者ID:kfuchs,项目名称:fastonosql,代码行数:7,代码来源:idatabase.cpp

示例3: IDatabase

SsdbDatabase::SsdbDatabase(IServerSPtr server, IDataBaseInfoSPtr info)
  : IDatabase(server, info) {
  DCHECK(server);
  DCHECK(info);
  DCHECK(server->type() == SSDB);
  DCHECK(info->type() == SSDB);
}
开发者ID:kunyuqiushuang,项目名称:fastonosql,代码行数:7,代码来源:ssdb_database.cpp

示例4: IDatabase

 MemcachedDatabase::MemcachedDatabase(IServerSPtr server, DataBaseInfoSPtr info)
     : IDatabase(server, info)
 {
     DCHECK(server);
     DCHECK(info);
     DCHECK(server->type() == MEMCACHED);
     DCHECK(info->type() == MEMCACHED);
 }
开发者ID:TakedWind,项目名称:fastoredis,代码行数:8,代码来源:memcached_database.cpp

示例5: connectionType

    connectionTypes QueryWidget::connectionType() const
    {
        IServerSPtr ser = shellWidget_->server();
        if(!ser){
            return DBUNKNOWN;
        }

        return ser->type();
    }
开发者ID:tempbottle,项目名称:fastonosql,代码行数:9,代码来源:query_widget.cpp

示例6: openHistoryServerDialog

    void ExplorerTreeView::openHistoryServerDialog()
    {
        QModelIndex sel = selectedIndex();
        if(!sel.isValid()){
            return;
        }

        ExplorerServerItem *node = common::utils_qt::item<ExplorerServerItem*>(sel);
        if(!node){
            return;
        }

        IServerSPtr server = node->server();
        if(!server){
            return;
        }

        ServerHistoryDialog histDialog(QString("%1 history").arg(server->name()), server->type(), this);
        VERIFY(connect(server.get(), &IServer::startedLoadServerHistoryInfo, &histDialog, &ServerHistoryDialog::startLoadServerHistoryInfo));
        VERIFY(connect(server.get(), &IServer::finishedLoadServerHistoryInfo, &histDialog, &ServerHistoryDialog::finishLoadServerHistoryInfo));
        VERIFY(connect(server.get(), &IServer::serverInfoSnapShoot, &histDialog, &ServerHistoryDialog::snapShotAdd));
        VERIFY(connect(&histDialog, &ServerHistoryDialog::showed, server.get(), &IServer::requestHistoryInfo));
        histDialog.exec();
    }
开发者ID:TakedWind,项目名称:fastoredis,代码行数:24,代码来源:explorer_tree_view.cpp


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