MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
DCMTree_Writer.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2007, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#ifndef DCM_TREE_WRITER_H
14#define DCM_TREE_WRITER_H
15
16#include "DCMTree_Defines.h"
17#include "DCMTree_Lib.h"
18#include "DCMTree_IOParameter.h"
19
20#ifdef _MSC_VER
21#pragma warning(push)
22#pragma warning(disable : 4251)
23#endif
24
25
26namespace DCMTree
27{
28 class Writer;
29 typedef boost::shared_ptr<Writer> WriterPtr;
30 typedef boost::shared_ptr<const Writer> Const_WriterPtr;
31
33 {
34 public:
40
42 virtual ~Writer();
43
44 virtual void write(const Const_IOParameterPtr& parameter, MessagePtr towrite) = 0;
45
46 protected:
49
51 static void setPrototype(Const_WriterPtr prototype);
52
57 virtual WriterPtr createConcrete(const Const_DictPtr& dictArg) const = 0;
58
62
65
66 private:
68 static Const_WriterPtr _prototype;
69
70 Const_DictPtr _dict;
71 };
72} // namespace DCMTree
73
74#ifdef _MSC_VER
75#pragma warning(pop)
76#endif
77
78#endif
#define DCMTREE_EXPORT
static void setPrototype(Const_WriterPtr prototype)
The concrete prototype is set by the implementing DLL.
Const_DictPtr dict() const
Writer()
Constructor without parameter for prototype.
virtual ~Writer()
Destructor.
virtual void write(const Const_IOParameterPtr &parameter, MessagePtr towrite)=0
static WriterPtr create(const Const_DictPtr &dictArg)
Abstract factory create method.
static Const_WriterPtr prototype()
The current concrete prototype.
Writer(Const_DictPtr dictArg)
Constructor.
virtual WriterPtr createConcrete(const Const_DictPtr &dictArg) const =0
Concrete factory create method of the implementing prototype, called by the abstract one.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
Class to dump a DCMTree DICOM message into a human-readable file.
boost::shared_ptr< Message > MessagePtr
Definition DCMTree_Lib.h:71
boost::shared_ptr< const Dict > Const_DictPtr
boost::shared_ptr< const Writer > Const_WriterPtr
boost::shared_ptr< Writer > WriterPtr
boost::shared_ptr< const IOParameter > Const_IOParameterPtr