MeVisLab Toolbox Reference
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:
47
50
52 static void setPrototype(Const_WriterPtr prototype);
53
58 virtual WriterPtr createConcrete(const Const_DictPtr &dictArg) const = 0;
59
63
66
67 private:
68
70 static Const_WriterPtr _prototype;
71
72 Const_DictPtr _dict;
73 };
74}
75
76#ifdef _MSC_VER
77 #pragma warning (pop)
78#endif
79
80#endif
81
82
#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:70
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