odil
C++11libraryfortheDICOMstandard
MoveSCP.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 _7e899e10_2a21_45b8_a2d6_af1d13cbfd29
10 #define _7e899e10_2a21_45b8_a2d6_af1d13cbfd29
11 
12 #include <cstdint>
13 #include <memory>
14 #include <string>
15 #include <utility>
16 
17 #include "odil/Association.h"
18 #include "odil/SCP.h"
19 #include "odil/message/CMoveRequest.h"
20 #include "odil/message/Message.h"
21 
22 namespace odil
23 {
24 
26 class MoveSCP: public SCP
27 {
28 public:
29 
32  {
33  public:
35  virtual unsigned int count() const =0;
36 
38  virtual Association get_association(message::CMoveRequest const &) const =0;
39  };
40 
42  MoveSCP(Association & association);
43 
45  MoveSCP(
46  Association & association,
47  std::shared_ptr<DataSetGenerator> const & generator);
48 
50  virtual ~MoveSCP();
51 
53  DataSetGenerator const & get_generator() const;
54 
56  void set_generator(std::shared_ptr<DataSetGenerator> const & generator);
57 
59  virtual void operator()(message::Message const & message);
60 
61 private:
62  std::shared_ptr<DataSetGenerator> _generator;
63 };
64 
65 }
66 
67 
68 #endif // _7e899e10_2a21_45b8_a2d6_af1d13cbfd29
Generator of C-MOVE responses.
Definition: MoveSCP.h:31
void set_generator(std::shared_ptr< DataSetGenerator > const &generator)
Set the generator.
Definition: MoveSCP.cpp:58
SCP for C-Move services.
Definition: MoveSCP.h:26
virtual unsigned int count() const =0
Return the number of responses.
Definition: Association.cpp:39
virtual Association get_association(message::CMoveRequest const &) const =0
Return the sub-association to send responses on.
Base class for all Service Class Providers.
Definition: SCP.h:21
Abstract base class for SCP returning multiple data sets.
Definition: SCP.h:25
MoveSCP(Association &association)
Constructor.
Definition: MoveSCP.cpp:28
virtual ~MoveSCP()
Destructor.
Definition: MoveSCP.cpp:44
Association.
Definition: Association.h:29
DataSetGenerator const & get_generator() const
Return the generator.
Definition: MoveSCP.cpp:51
virtual void operator()(message::Message const &message)
Process a C-Get request.
Definition: MoveSCP.cpp:65