Odil
A C++11 library for the DICOM standard
Toggle main menu visibility
Loading...
Searching...
No Matches
SCP.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 _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/Exception.h
"
15
#include "
odil/message/Message.h
"
16
#include "
odil/message/Request.h
"
17
#include "
odil/odil.h
"
18
#include "
odil/Value.h
"
19
20
namespace
odil
21
{
22
24
class
ODIL_API
SCP
25
{
26
public
:
32
class
ODIL_API
DataSetGenerator
33
{
34
public
:
36
virtual
~DataSetGenerator
() =0;
37
39
virtual
void
initialize
(
40
std::shared_ptr<message::Request const> request) =0;
41
43
virtual
bool
done
()
const
=0;
44
46
virtual
void
next
() =0;
47
49
virtual
std::shared_ptr<DataSet>
get
()
const
=0;
50
};
51
52
class
Exception
:
public
odil::Exception
53
{
54
public
:
56
Value::Integer
status
;
57
59
std::shared_ptr<DataSet>
status_fields
;
60
62
Exception
(
63
std::string
const
&
message
,
64
Value::Integer
status
, std::shared_ptr<DataSet>
status_fields
={});
65
67
virtual
~Exception
() noexcept;
68
};
69
71
SCP
(
Association
& association);
72
74
virtual ~
SCP
() = default;
75
77
void
receive_and_process
();
78
80
virtual
void
operator()(std::shared_ptr<
message
::Message>
message
) =0;
81
protected:
83
Association
&
_association
;
84
};
85
86
}
87
88
#endif
// _f4680d8c_18a8_4317_956d_3ae238cb39cc
Association.h
DataSet.h
Exception.h
Request.h
Value.h
odil::Association
Association.
Definition
Association.h:31
odil::Exception
Base class for odil exceptions.
Definition
Exception.h:22
odil::SCP::DataSetGenerator
Abstract base class for SCP returning multiple data sets.
Definition
SCP.h:33
odil::SCP::DataSetGenerator::get
virtual std::shared_ptr< DataSet > get() const =0
Return the current element.
odil::SCP::DataSetGenerator::initialize
virtual void initialize(std::shared_ptr< message::Request const > request)=0
Initialize the generator.
odil::SCP::DataSetGenerator::done
virtual bool done() const =0
Test whether all elements have been generated.
odil::SCP::DataSetGenerator::next
virtual void next()=0
Prepare the next element.
odil::SCP::DataSetGenerator::~DataSetGenerator
virtual ~DataSetGenerator()=0
Destructor.
odil::SCP::Exception::~Exception
virtual ~Exception() noexcept
Destructor.
odil::SCP::Exception::status_fields
std::shared_ptr< DataSet > status_fields
Status detail fields (e.g. offending element).
Definition
SCP.h:59
odil::SCP::Exception::status
Value::Integer status
Status to be sent back to user.
Definition
SCP.h:56
odil::SCP::Exception::Exception
Exception(std::string const &message, Value::Integer status, std::shared_ptr< DataSet > status_fields={})
Constructor.
odil::SCP::_association
Association & _association
Association with peer.
Definition
SCP.h:83
odil::SCP::SCP
SCP(Association &association)
Create a Service Class Provider.
odil::SCP::receive_and_process
void receive_and_process()
Receive and process a message.
odil::Value::Integer
int64_t Integer
Integer type.
Definition
Value.h:42
Message.h
odil::message
Definition
Cancellation.h:21
odil
Definition
Association.h:25
odil.h
ODIL_API
#define ODIL_API
Definition
odil.h:28
src
odil
SCP.h
Generated by
1.17.0