odil
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 
27  {
28  public:
29  virtual unsigned int count() const =0;
30  };
31 
33  GetSCP(Association & association);
34 
36  GetSCP(
37  Association & association,
38  std::shared_ptr<DataSetGenerator> const & generator);
39 
41  virtual ~GetSCP();
42 
44  DataSetGenerator const & get_generator() const;
45 
47  void set_generator(std::shared_ptr<DataSetGenerator> const & generator);
48 
50  virtual void operator()(message::Message const & message);
51 
52 private:
53  std::shared_ptr<DataSetGenerator> _generator;
54 };
55 
56 }
57 
58 #endif // _2f0ad1fd_8779_4ab3_b7e8_6d37fdc0c018
59 
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
Definition: GetSCP.h:26
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