CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxFileManagerServiceNull.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 
13 
14 #include "cxLogger.h"
15 
16 namespace cx
17 {
19 {
20 
21 }
22 
24 {}
25 
27 {
28  return true;
29 }
30 
31 std::vector<DataPtr> FileManagerServiceNull::read(const QString &filename)
32 {
33  printWarning();
34  return std::vector<DataPtr>();
35 }
36 
37 bool FileManagerServiceNull::canLoad(const QString &type, const QString &filename)
38 {
39  printWarning();
40  return false;
41 }
42 
43 DataPtr FileManagerServiceNull::load(const QString &uid, const QString &filename)
44 {
45  printWarning();
46  return DataPtr();
47 }
48 
50 {
51  printWarning();
52  return "";
53 }
54 
55 bool FileManagerServiceNull::readInto(DataPtr data, QString path)
56 {
57  printWarning();
58  return false;
59 }
60 
62 {
63  printWarning();
64  return "";
65 }
66 
68 {
69  printWarning();
70  return vtkPolyDataPtr();
71 }
72 
74 {
75  printWarning();
76  return vtkImageDataPtr();
77 }
78 
79 void FileManagerServiceNull::save(DataPtr data, const QString &filename)
80 {
81  printWarning();printWarning();
82 }
83 
85 {
86  printWarning();
87 }
88 
90 {
91  printWarning();
92 }
93 
94 std::vector<FileReaderWriterServicePtr> FileManagerServiceNull::getExportersForDataType(QString dataType)
95 {
96  printWarning();
97  return std::vector<FileReaderWriterServicePtr>();
98 }
99 
100 std::vector<FileReaderWriterServicePtr> FileManagerServiceNull::getImportersForDataType(QString dataType)
101 {
102  printWarning();
103  return std::vector<FileReaderWriterServicePtr>();
104 }
105 
106 QString FileManagerServiceNull::getFileReaderName(const QString &filename)
107 {
108  printWarning();
109  return QString();
110 }
111 
112 void FileManagerServiceNull::printWarning() const
113 {
114  reportWarning("Trying to use FileManagerServiceNull.");
115 }
116 
117 
118 }
virtual QString getFileReaderName(const QString &filename)
std::vector< DataPtr > read(const QString &filename)
void addFileReaderWriter(FileReaderWriterService *service)
vtkPolyDataPtr loadVtkPolyData(QString filename)
QString findDataTypeFromFile(QString filename)
bool canLoad(const QString &type, const QString &filename)
DataPtr load(const QString &uid, const QString &filename)
boost::shared_ptr< class Data > DataPtr
std::vector< FileReaderWriterServicePtr > getImportersForDataType(QString dataType)
void reportWarning(QString msg)
Definition: cxLogger.cpp:70
vtkImageDataPtr loadVtkImageData(QString filename)
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
void removeFileReaderWriter(FileReaderWriterService *service)
void save(DataPtr data, const QString &filename)
bool readInto(DataPtr data, QString path)
vtkSmartPointer< class vtkImageData > vtkImageDataPtr
std::vector< FileReaderWriterServicePtr > getExportersForDataType(QString dataType)
Namespace for all CustusX production code.