Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef MITKDATASTORAGEACCESSRULE_H_HEADER_INCLUDED_
00019 #define MITKDATASTORAGEACCESSRULE_H_HEADER_INCLUDED_
00020
00021 #include "berryISchedulingRule.h"
00022 #include "berryObject.h"
00023 #include "mitkJobsDll.h"
00024 #include "mitkDataNode.h"
00025 #include "mitkDataStorage.h"
00026 #include "mitkStandaloneDataStorage.h"
00027
00028 namespace mitk {
00029
00085 class MITK_JOBS_EXPORT DataStorageAccessRule : public berry::ISchedulingRule {
00086
00087 public:
00088
00089
00090 enum RuleType {ADD_RULE = 0, REMOVE_RULE} ;
00091
00092 RuleType m_Rule;
00093
00094 berryObjectMacro(DataStorageAccessRule)
00095
00096 DataStorageAccessRule (mitk::DataStorage::Pointer myDataStorage, mitk::DataNode::Pointer myDataNode,
00097 DataStorageAccessRule::RuleType myRule) ;
00098
00099 bool Contains (berry::ISchedulingRule::Pointer otherISchedulingRule) ;
00100 bool IsConflicting (berry::ISchedulingRule::Pointer otherISchedulingRule) ;
00101
00102
00103
00104
00105
00106
00107 private:
00108
00109
00116 bool CompareTwoAddorRemoveRules() const ;
00121 bool CompareAddandRemoveRules(mitk::DataStorageAccessRule::Pointer sptr_otherDataStorageAccessRule) const;
00127 bool CompareDataStorages(mitk::DataStorage::Pointer otherDataStorage) const;
00133 bool TestDataNode(mitk::DataNode::Pointer dataTreeToBeStored) const;
00134
00138 mitk::DataNode::Pointer GetDataNode() const;
00139
00143 mitk::DataStorage::Pointer GetDataStorage() const;
00144
00145 mitk::DataStorageAccessRule::RuleType GetRuleType() const;
00146
00147
00148
00149
00150 DataStorage::Pointer m_sptrMyDataStorage ;
00151 DataNode::Pointer m_sptrMyDataNode ;
00152
00153
00154 };
00155
00156 }
00157
00158 #endif