00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision$ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 00019 #ifndef MITKNODEPREDICATEPROPERTY_H_HEADER_INCLUDED_ 00020 #define MITKNODEPREDICATEPROPERTY_H_HEADER_INCLUDED_ 00021 00022 #include "mitkNodePredicateBase.h" 00023 #include "mitkBaseProperty.h" 00024 #include "mitkWeakPointer.h" 00025 00026 namespace mitk { 00027 00028 //##Documentation 00029 //## @brief Predicate that evaluates if the given DataNode has a specific property. 00030 //## If the second parameter is NULL, it will only be checked whether there is a property with the specified name. 00031 //## 00032 //## 00033 //## 00034 //## @ingroup DataStorage 00035 class MITK_CORE_EXPORT NodePredicateProperty : public NodePredicateBase 00036 { 00037 public: 00038 mitkClassMacro(NodePredicateProperty, NodePredicateBase); 00039 mitkNewMacro1Param(NodePredicateProperty, const char*); 00040 mitkNewMacro2Param(NodePredicateProperty, const char*, mitk::BaseProperty*); 00041 00042 //##Documentation 00043 //## @brief Standard Destructor 00044 virtual ~NodePredicateProperty(); 00045 00046 //##Documentation 00047 //## @brief Checks, if the nodes contains a property that is equal to m_ValidProperty 00048 virtual bool CheckNode(const mitk::DataNode* node) const; 00049 00050 protected: 00051 //##Documentation 00052 //## @brief Constructor to check for a named property 00053 NodePredicateProperty(const char* propertyName, mitk::BaseProperty* p); 00054 00055 //##Documentation 00056 //## @brief Constructor to check for the existence of a property with a given name 00057 NodePredicateProperty(const char* propertyName); 00058 00059 //mitk::WeakPointer<mitk::BaseProperty> m_ValidProperty; 00060 mitk::BaseProperty::Pointer m_ValidProperty; 00061 //mitk::BaseProperty* m_ValidProperty; 00062 std::string m_ValidPropertyName; 00063 }; 00064 00065 } // namespace mitk 00066 00067 #endif /* MITKNODEPREDICATEPROPERTY_H_HEADER_INCLUDED_ */