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