NorMIT-nav
22.09
An IGT application
cxStreamerServiceUtilities.cpp
Go to the documentation of this file.
1
/*=========================================================================
2
This file is part of CustusX, an Image Guided Therapy Application.
3
4
Copyright (c) SINTEF Department of Medical Technology.
5
All rights reserved.
6
7
CustusX is released under a BSD 3-Clause license.
8
9
See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10
=========================================================================*/
11
12
#include "
cxStreamerServiceUtilities.h
"
13
14
#include <QList>
15
#include <ctkServiceTracker.h>
16
#include <iostream>
17
#include "
cxTypeConversions.h
"
18
19
namespace
cx
20
{
21
StreamerService
*
StreamerServiceUtilities::getStreamerServiceFromType
(QString name, ctkPluginContext* context)
22
{
23
ctkServiceTracker<StreamerService*> tracker(context);
24
tracker.open();
25
26
QList<StreamerService*> serviceList = tracker.getServices();
27
28
for
(
int
i = 0; i < serviceList.size(); ++i)
29
{
30
StreamerService
* service = serviceList.at(i);
31
if
(service->
getType
() == name)
32
return
service;
33
}
34
35
return
NULL;
36
}
37
}
/* namespace cx */
cx
Namespace for all CustusX production code.
Definition:
cx_dev_group_definitions.h:13
cxStreamerServiceUtilities.h
cxTypeConversions.h
cx::StreamerServiceUtilities::getStreamerServiceFromType
static StreamerService * getStreamerServiceFromType(QString name, ctkPluginContext *context)
Definition:
cxStreamerServiceUtilities.cpp:21
cx::StreamerService
Abstract class. Interface to Streamers.
Definition:
cxStreamerService.h:42
cx::StreamerService::getType
virtual QString getType() const =0
CX
source
plugins
org.custusx.core.video
cxStreamerServiceUtilities.cpp
Generated on Tue Sep 13 2022 11:06:13 for NorMIT-nav by
1.8.17