Odil
A C++11 library for the DICOM standard
Loading...
Searching...
No Matches
NCreateSCP.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 _918ce553_d774_44c0_9cbf_56f32584a1ab
10#define _918ce553_d774_44c0_9cbf_56f32584a1ab
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"
20
21namespace odil
22{
23
25class ODIL_API NCreateSCP: public SCP
26{
27public:
32 typedef std::function<
33 Value::Integer(std::shared_ptr<message::NCreateRequest const>)
35
37 NCreateSCP(Association & association);
38
40 NCreateSCP(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);
50private:
51 Callback _callback;
52 void operator()(std::shared_ptr<message::NCreateRequest const> message);
53};
54
55}
56
57#endif // _918ce553_d774_44c0_9cbf_56f32584a1ab
Association.
Definition Association.h:31
SCP for N-Create services.
Definition NCreateSCP.h:26
NCreateSCP(Association &association, Callback const &callback)
Constructor.
std::function< Value::Integer(std::shared_ptr< message::NCreateRequest const >) > Callback
Callback called when a request is received, shall throw an SCP::Exception on error.
Definition NCreateSCP.h:34
Callback const & get_callback() const
Return the callback.
virtual void operator()(std::shared_ptr< message::Message > message)
Process a N-Create request.
NCreateSCP(Association &association)
Constructor.
void set_callback(Callback const &callback)
Set the callback.
Base class for all Service Class Providers.
Definition SCP.h:25
int64_t Integer
Integer type.
Definition Value.h:42
Definition Association.h:25
#define ODIL_API
Definition odil.h:28