コード例 #1
0
ファイル: rpcserver.cpp プロジェクト: 913862627/cxxtools
void RpcServer::addService(const std::string& praefix, const ServiceRegistry& service)
{
    std::vector<std::string> procs = service.getProcedureNames();

    for (std::vector<std::string>::const_iterator it = procs.begin(); it != procs.end(); ++it)
    {
        registerProcedure(praefix + *it, service.getProcedure(*it));
    }
}
コード例 #2
0
ファイル: rpcserver.cpp プロジェクト: maekitalo/cxxtools
void RpcServer::addService(const std::string& domain, const ServiceRegistry& service)
{
    std::vector<std::string> procs = service.getProcedureNames();

    for (std::vector<std::string>::const_iterator it = procs.begin(); it != procs.end(); ++it)
    {
        registerProcedure(domain.empty() ? *it : (domain + '\0' + *it), service.getProcedure(*it));
    }
}
コード例 #3
0
void PluginViewerController::buildItems() {
    const QList<Plugin*>& plugins = AppContext::getPluginSupport()->getPlugins();
    foreach(Plugin* p, plugins) {
        QTreeWidget* treeWidget = ui.treeWidget;
        PlugViewPluginItem* pluginItem = new PlugViewPluginItem(NULL, p, showServices);
        if (showServices) {
            const QList<Service*>& services = p->getServices();
            //this method is called for default state init also -> look for registered plugin services
            ServiceRegistry* sr = AppContext::getServiceRegistry();
            QList<Service*> registered = sr->getServices();
            foreach(Service* s, services) {
                if (registered.contains(s)) {
                    PlugViewTreeItem* serviceItem = new PlugViewServiceItem(pluginItem, s);
                    pluginItem->addChild(serviceItem);
                }
            }
        }
        treeWidget->addTopLevelItem(pluginItem);
        pluginItem->setExpanded(true);
    }
コード例 #4
0
ファイル: Main.cpp プロジェクト: ggrekhov/ugene
static void registerCoreServices() {
    ServiceRegistry* sr = AppContext::getServiceRegistry();
    TaskScheduler* ts = AppContext::getTaskScheduler();
    ts->registerTopLevelTask(sr->registerServiceTask(new PluginViewerImpl()));
    ts->registerTopLevelTask(sr->registerServiceTask(new ProjectViewImpl()));
}