00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date: 2008-02-08 13:23:19 +0100 (Fr, 08 Feb 2008) $ 00006 Version: $Revision: 13561 $ 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 MITKNODEPREDICATEFIRSTLEVEL_H_HEADER_INCLUDED_ 00020 #define MITKNODEPREDICATEFIRSTLEVEL_H_HEADER_INCLUDED_ 00021 00022 #include "mitkNodePredicateBase.h" 00023 #include "mitkDataStorage.h" 00024 #include "mitkDataNode.h" 00025 #include "mitkWeakPointer.h" 00026 00027 namespace mitk { 00028 00029 //##Documentation 00030 //## @brief Predicate that evaluates if the given node is a direct or indirect source node of a specific node 00031 //## 00032 //## @warning This class seems to be obsolete since mitk::DataStorage::GetDerivations(). 00033 //## Since there is no real use case up until now, NodePredicateSource is NOT WORKING YET. 00034 //## If you need it working, inform us. 00035 //## 00036 //## @ingroup DataStorage 00037 class MITK_CORE_EXPORT NodePredicateFirstLevel : public NodePredicateBase 00038 { 00039 public: 00040 mitkClassMacro(NodePredicateFirstLevel, NodePredicateBase); 00041 mitkNewMacro1Param(NodePredicateFirstLevel, mitk::DataStorage*); 00042 00043 //##Documentation 00044 //## @brief Standard Destructor 00045 virtual ~NodePredicateFirstLevel(); 00046 00047 //##Documentation 00048 //## @brief Checks, if the node is a source node of m_BaseNode (e.g. if m_BaseNode "was created from" node) 00049 virtual bool CheckNode(const mitk::DataNode* node) const; 00050 00051 protected: 00052 //##Documentation 00053 //## @brief Constructor - This class can either search only for direct source objects or for all source objects 00054 NodePredicateFirstLevel(mitk::DataStorage* ds); 00055 00056 mitk::WeakPointer<mitk::DataStorage> m_DataStorage; 00057 }; 00058 00059 } // namespace mitk 00060 00061 #endif /* MITKNODEPREDICATEFIRSTLEVEL_H_HEADER_INCLUDED_ */