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
39namespace DCMTree
40{
41 class Writer;
42 typedef boost::shared_ptr<Writer> WriterPtr;
43 typedef boost::shared_ptr<const Writer> Const_WriterPtr;
44
46 {
47 public:
53
55 virtual ~Writer();
56
57 virtual void write (const Const_IOParameterPtr &parameter, MessagePtr towrite)=0;
58
59 protected:
60
63
65 static void setPrototype(Const_WriterPtr prototype);
66
71 virtual WriterPtr createConcrete(const Const_DictPtr &dictArg) const = 0;
72
76
79
80 private:
81
83 static Const_WriterPtr _prototype;
84
85 Const_DictPtr _dict;
86 };
87}
88
89#ifdef _MSC_VER
90 #pragma warning (pop)
91#endif
92
93#endif
94
95
#define DCMTREE_EXPORT
static void setPrototype(Const_WriterPtr prototype)
The concrete prototype is set by the implementing DLL.
Const_DictPtr dict() const
Writer()
ctor - without parameter for prototype
virtual ~Writer()
dtor
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)
ctor
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 this class could be used as a starte...
boost::shared_ptr< Message > MessagePtr
Definition DCMTree_Lib.h:76
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