Mercurial > hg > orthanc
comparison OrthancServer/ParsedDicomFile.h @ 792:111a1738e11e
refactoring
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 06 May 2014 09:57:39 +0200 |
parents | 381f90e2b69d |
children | 145604a97914 |
comparison
equal
deleted
inserted
replaced
791:381f90e2b69d | 792:111a1738e11e |
---|---|
45 class ParsedDicomFile : public IDynamicObject | 45 class ParsedDicomFile : public IDynamicObject |
46 { | 46 { |
47 private: | 47 private: |
48 // TODO Move this as pimpl | 48 // TODO Move this as pimpl |
49 std::auto_ptr<DcmFileFormat> file_; | 49 std::auto_ptr<DcmFileFormat> file_; |
50 //struct PImpl; | |
51 //PImpl* pimpl_; | |
50 | 52 |
51 ParsedDicomFile(DcmFileFormat& other) : | 53 ParsedDicomFile(DcmFileFormat& other); |
52 file_(dynamic_cast<DcmFileFormat*>(other.clone())) | |
53 { | |
54 } | |
55 | 54 |
56 void Setup(const char* content, | 55 void Setup(const char* content, |
57 size_t size); | 56 size_t size); |
58 | 57 |
59 public: | 58 public: |
62 ParsedDicomFile(const char* content, | 61 ParsedDicomFile(const char* content, |
63 size_t size); | 62 size_t size); |
64 | 63 |
65 ParsedDicomFile(const std::string& content); | 64 ParsedDicomFile(const std::string& content); |
66 | 65 |
67 DcmFileFormat& GetDicom() | 66 ~ParsedDicomFile(); |
67 | |
68 void* GetDcmtkObject() | |
68 { | 69 { |
69 return *file_; | 70 return file_.get(); |
70 } | 71 } |
71 | 72 |
72 ParsedDicomFile* Clone() | 73 ParsedDicomFile* Clone() |
73 { | 74 { |
74 return new ParsedDicomFile(*file_); | 75 return new ParsedDicomFile(*file_); |