Medical Imaging Interaction Toolkit  2022.04.99-194dd5d8
Medical Imaging Interaction Toolkit
mitkNodePredicateCompositeBase.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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef MITKNODEPREDICATECOMPOSITEBASE_H_HEADER_INCLUDED_
14 #define MITKNODEPREDICATECOMPOSITEBASE_H_HEADER_INCLUDED_
15 
16 #include "mitkNodePredicateBase.h"
17 #include <list>
18 
19 namespace mitk
20 {
21  //##Documentation
22  //## @brief Base class for all predicates that can have child predicates (e.g. AND/OR)
23  //##
24  //## This class provides methods to add and remove child predicates. It is used for
25  //## predicates that are compositions of other predicates like AND and OR.
26  //##
27  //## @ingroup DataStorage
29  {
30  public:
32 
33  typedef std::list<NodePredicateBase::ConstPointer> ChildPredicates;
34 
35  //##Documentation
36  //## @brief Pure virtual (but implemented) Destructor makes NodePredicateCompositeBase an abstract class
37  ~NodePredicateCompositeBase() override = 0;
38 
39  //##Documentation
40  //## @brief Adds a child predicate
41  virtual void AddPredicate(const NodePredicateBase *p);
42 
43  //##Documentation
44  //## @brief Removes a child predicate
45  virtual void RemovePredicate(const NodePredicateBase *p);
46 
47  //##Documentation
48  //## @brief Return all child predicates (immutable).
49  virtual ChildPredicates GetPredicates() const;
50 
51  protected:
52  //##Documentation
53  //## @brief list of child predicates
54  ChildPredicates m_ChildPredicates;
55  };
56 
57 } // namespace mitk
58 
59 #endif /* MITKNODEPREDICATECOMPOSITEBASE_H_HEADER_INCLUDED_ */
#define MITKCORE_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
ChildPredicates m_ChildPredicates
list of child predicates
std::list< NodePredicateBase::ConstPointer > ChildPredicates
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
Interface for evaluation conditions used in the DataStorage class GetSubset() method.
Base class for all predicates that can have child predicates (e.g. AND/OR)