Medical Imaging Interaction Toolkit  2018.4.99-b20efe7f
Medical Imaging Interaction Toolkit
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 // MITKISEMANTICRELATIONSOBSERVABLE_H
virtual void NotifyObserver(const SemanticTypes::CaseID &caseID) const =0
DataCollection - Class to facilitate loading/accessing structured data.
virtual void AddObserver(ISemanticRelationsObserver *observer)=0
virtual void RemoveObserver(ISemanticRelationsObserver *observer)=0