Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkISemanticRelationsObservable.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 mitkISemanticRelationsObservable_h
14 #define mitkISemanticRelationsObservable_h
15 
17 
18 namespace mitk
19 {
20  /*
21  * @brief This interface declares three functions each observable subject has to implement
22  * in order to be observed in the 'Observer pattern' sense.
23  * The concrete observable class has to store its observer.
24  */
26  {
27  public:
28  /*
29  * @brief Adds the given concrete observer to a container that holds all currently registered observer.
30  *
31  * @param observer The concrete observer to register.
32  */
33  virtual void AddObserver(ISemanticRelationsObserver* observer) = 0;
34  /*
35  * @brief Removes the given concrete observer from the container that holds all currently registered observer.
36  *
37  * @param observer The concrete observer to unregister.
38  */
39  virtual void RemoveObserver(ISemanticRelationsObserver* observer) = 0;
40  /*
41  * @brief Updates all concrete observer in the container that holds all currently registered observer.
42  * The caseID can be used to only update the observer, if the caseID fulfills a certain condition.
43  *
44  * @param caseID A caseID that identifies the currently active patient / case.
45  */
46  virtual void NotifyObserver(const SemanticTypes::CaseID& caseID) const = 0;
47 
48  }; // class ISemanticRelationsObservable
49 } // namespace mitk
50 
51 #endif
mitk::ISemanticRelationsObservable
Definition: mitkISemanticRelationsObservable.h:25
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::SemanticTypes::CaseID
std::string CaseID
Definition: mitkSemanticTypes.h:34
mitk::ISemanticRelationsObservable::RemoveObserver
virtual void RemoveObserver(ISemanticRelationsObserver *observer)=0
mitk::ISemanticRelationsObservable::NotifyObserver
virtual void NotifyObserver(const SemanticTypes::CaseID &caseID) const =0
mitkISemanticRelationsObserver.h
mitk::ISemanticRelationsObservable::AddObserver
virtual void AddObserver(ISemanticRelationsObserver *observer)=0
mitk::ISemanticRelationsObserver
Definition: mitkISemanticRelationsObserver.h:24