odil
C++11libraryfortheDICOMstandard
SCP.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 _f4680d8c_18a8_4317_956d_3ae238cb39cc
10 #define _f4680d8c_18a8_4317_956d_3ae238cb39cc
11 
12 #include "odil/Association.h"
13 #include "odil/DataSet.h"
14 #include "odil/message/Message.h"
15 #include "odil/message/Request.h"
16 
17 namespace odil
18 {
19 
21 class SCP
22 {
23 public:
26  {
27  public:
29  virtual ~DataSetGenerator() =0;
30 
32  virtual void initialize(message::Request const & request) =0;
33 
35  virtual bool done() const =0;
36 
38  virtual void next() =0;
39 
41  virtual DataSet get() const =0;
42  };
43 
45  SCP(Association & association);
46 
48  virtual ~SCP();
49 
51  void receive_and_process();
52 
54  virtual void operator()(message::Message const & message) =0;
55 protected:
58 };
59 
60 }
61 
62 #endif // _f4680d8c_18a8_4317_956d_3ae238cb39cc
virtual bool done() const =0
Test whether all elements have been generated.
virtual void operator()(message::Message const &message)=0
Process a message.
SCP(Association &association)
Create a Service Class Provider.
Definition: SCP.cpp:26
Definition: Association.cpp:39
virtual void next()=0
Prepare the next element.
virtual void initialize(message::Request const &request)=0
Initialize the generator.
Base class for all Service Class Providers.
Definition: SCP.h:21
Abstract base class for SCP returning multiple data sets.
Definition: SCP.h:25
void receive_and_process()
Receive and process a message.
Definition: SCP.cpp:40
Association & _association
Association with peer.
Definition: SCP.h:57
DICOM Data set.
Definition: DataSet.h:28
virtual ~DataSetGenerator()=0
Destructor.
Definition: SCP.cpp:20
Association.
Definition: Association.h:29
virtual ~SCP()
Destructor.
Definition: SCP.cpp:33