odil
SCPDispatcher.h
1 /*************************************************************************
2  * odil - Copyright (C) Universite de Strasbourg
3  * Distributed under the terms of the CeCILL-B license, as published by
4  * the CEA-CNRS-INRIA. Refer to the LICENSE file or to
5  * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
6  * for details.
7  ************************************************************************/
8 
9 #ifndef _f0b69ac6_7d52_401d_a2f3_d5d3f7d69376
10 #define _f0b69ac6_7d52_401d_a2f3_d5d3f7d69376
11 
12 #include <map>
13 #include <memory>
14 
15 #include "odil/Association.h"
16 #include "odil/SCP.h"
17 #include "odil/Value.h"
18 
19 namespace odil
20 {
21 
23 {
24 public:
26  SCPDispatcher(Association & association);
27 
30 
31  bool has_scp(Value::Integer command) const;
32 
33  std::shared_ptr<SCP> const & get_scp(Value::Integer command) const;
34 
35  void set_scp(Value::Integer command, std::shared_ptr<SCP> const & scp);
36 
37  void dispatch();
38 private:
39  typedef std::shared_ptr<SCP> SCPPointer;
40 
41  Association & _association;
42  std::map<Value::Integer, std::shared_ptr<SCP>> _providers;
43 };
44 
45 }
46 
47 #endif // _f0b69ac6_7d52_401d_a2f3_d5d3f7d69376
~SCPDispatcher()
Destructor.
Definition: SCPDispatcher.cpp:30
SCPDispatcher(Association &association)
Create a dispatcher with network and association.
Definition: SCPDispatcher.cpp:23
Definition: Association.cpp:39
Definition: SCPDispatcher.h:22
Association.
Definition: Association.h:29