Odil
A C++11 library for the DICOM standard
NSetSCP.h
Go to the documentation of this file.
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 _cca2fb7a_c3b6_47f4_a619_44701b074cda
10 #define _cca2fb7a_c3b6_47f4_a619_44701b074cda
11 
12 #include <functional>
13 
14 #include "odil/Association.h"
15 #include "odil/odil.h"
16 #include "odil/SCP.h"
17 #include "odil/Value.h"
18 #include "odil/message/Message.h"
20 
21 namespace odil
22 {
23 
25 class ODIL_API NSetSCP: public SCP
26 {
27 public:
32  typedef std::function<
33  Value::Integer(std::shared_ptr<message::NSetRequest const>)
34  > Callback;
35 
37  NSetSCP(Association & association);
38 
40  NSetSCP(Association & association, Callback const & callback);
41 
43  Callback const & get_callback() const;
44 
46  void set_callback(Callback const & callback);
47 
49  virtual void operator()(std::shared_ptr<message::Message> message);
50 private:
51  Callback _callback;
52  void operator()(std::shared_ptr<message::NSetRequest const> message);
53 };
54 
55 }
56 
57 #endif // _cca2fb7a_c3b6_47f4_a619_44701b074cda
NSetRequest.h
SCP.h
odil
Definition: Association.h:23
ODIL_API
#define ODIL_API
Definition: odil.h:27
Association.h
odil::NSetSCP::Callback
std::function< Value::Integer(std::shared_ptr< message::NSetRequest const >) > Callback
Callback called when a request is received, shall throw an SCP::Exception on error.
Definition: NSetSCP.h:43
Message.h
odil.h
odil::Value::Integer
int64_t Integer
Integer type.
Definition: Value.h:46
Value.h