Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkDataStorageAccessRule.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MITKDATASTORAGEACCESSRULE_H_HEADER_INCLUDED_
18 #define MITKDATASTORAGEACCESSRULE_H_HEADER_INCLUDED_
19 
20 #include <org_mitk_core_jobs_Export.h>
21 
22 #include "berryISchedulingRule.h"
23 #include "berryObject.h"
24 #include "mitkDataNode.h"
25 #include "mitkDataStorage.h"
27 
28 namespace mitk {
29 
85  class MITK_JOBS_EXPORT DataStorageAccessRule : public berry::ISchedulingRule {
86 
87  public:
88 
89 
90  enum RuleType {ADD_RULE = 0, REMOVE_RULE} ;
91 
93 
95 
98 
99  bool Contains (berry::ISchedulingRule::Pointer otherISchedulingRule) const override;
100  bool IsConflicting (berry::ISchedulingRule::Pointer otherISchedulingRule) const override;
101 
102 
103 
104 
105 
106 
107 private:
108 
109 
116  bool CompareTwoAddorRemoveRules() const ;
121  bool CompareAddandRemoveRules(mitk::DataStorageAccessRule::Pointer sptr_otherDataStorageAccessRule) const;
127  bool CompareDataStorages(mitk::DataStorage::Pointer otherDataStorage) const;
133  bool TestDataNode(mitk::DataNode::Pointer dataTreeToBeStored) const;
134 
138  mitk::DataNode::Pointer GetDataNode() const;
139 
144 
145  mitk::DataStorageAccessRule::RuleType GetRuleType() const;
146 
147 
148 
149 
150  DataStorage::Pointer m_sptrMyDataStorage ;
151  DataNode::Pointer m_sptrMyDataNode ;
152 
153 
154  };
155 
156  }
157 
158 #endif /*MITKDATASTORAGEACCESSRULE_H_HEADER_INCLUDED_ */
DataCollection - Class to facilitate loading/accessing structured data.
static mitk::DataStorage::Pointer GetDataStorage()
The DataStorageAccessRule inherits from the ISchedulingRule class. DataStorageAccessRule are used to ...
#define berryObjectMacro(...)
Definition: berryMacros.h:37