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 http://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 MITKNODEPREDICATECOMPOSITEBASE_H_HEADER_INCLUDED_ 00020 #define MITKNODEPREDICATECOMPOSITEBASE_H_HEADER_INCLUDED_ 00021 00022 #include "mitkNodePredicateBase.h" 00023 #include <list> 00024 00025 namespace mitk { 00026 00027 //##Documentation 00028 //## @brief Base class for all predicates that can have child predicates (e.g. AND/OR) 00029 //## 00030 //## This class provides methods to add and remove child predicates. It is used for 00031 //## predicates that are compositions of other predicates like AND and OR. 00032 //## 00033 //## @ingroup DataStorage 00034 class MITK_CORE_EXPORT NodePredicateCompositeBase : public NodePredicateBase 00035 { 00036 public: 00037 mitkClassMacro(NodePredicateCompositeBase, NodePredicateBase); 00038 00039 typedef std::list<NodePredicateBase::ConstPointer> ChildPredicates; 00040 00041 //##Documentation 00042 //## @brief Pure virtual (but implemented) Destructor makes NodePredicateCompositeBase an abstract class 00043 virtual ~NodePredicateCompositeBase() = 0; 00044 00045 //##Documentation 00046 //## @brief Adds a child predicate 00047 virtual void AddPredicate(const NodePredicateBase* p); 00048 00049 //##Documentation 00050 //## @brief Removes a child predicate 00051 virtual void RemovePredicate(const NodePredicateBase* p); 00052 00053 //##Documentation 00054 //## @brief Return all child predicates (immutable). 00055 virtual ChildPredicates GetPredicates() const; 00056 00057 protected: 00058 //##Documentation 00059 //## @brief list of child predicates 00060 ChildPredicates m_ChildPredicates; 00061 }; 00062 00063 } // namespace mitk 00064 00065 #endif /* MITKNODEPREDICATECOMPOSITEBASE_H_HEADER_INCLUDED_ */ 00066