]> Creatis software - gdcm.git/blob - src/gdcmContentEntry.cxx
BUG: Remove my previous hack now this is properly fixed in gdcmBinEntry by JPR
[gdcm.git] / src / gdcmContentEntry.cxx
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmContentEntry.cxx,v $
5   Language:  C++
6   Date:      $Date: 2005/02/02 10:02:16 $
7   Version:   $Revision: 1.9 $
8                                                                                 
9   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10   l'Image). All rights reserved. See Doc/License.txt or
11   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
12                                                                                 
13      This software is distributed WITHOUT ANY WARRANTY; without even
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15      PURPOSE.  See the above copyright notices for more information.
16                                                                                 
17 =========================================================================*/
18
19 #include "gdcmContentEntry.h"
20 #include "gdcmVR.h"
21 #include "gdcmTS.h"
22 #include "gdcmGlobal.h"
23 #include "gdcmUtil.h"
24 #include "gdcmDebug.h"
25
26 #include <fstream>
27
28 namespace gdcm 
29 {
30
31 //-----------------------------------------------------------------------------
32 // Constructor / Destructor
33 /**
34  * \brief   Constructor for a given DictEntry
35  * @param   e Pointer to existing dictionary entry
36  */
37 ContentEntry::ContentEntry(DictEntry *e) 
38             : DocEntry(e)
39 {
40    Value = GDCM_UNFOUND;
41 }
42
43 /**
44  * \brief   Constructor for a given DocEntry
45  * @param   e Pointer to existing Doc entry
46  */
47 ContentEntry::ContentEntry(DocEntry *e)
48             : DocEntry(e->GetDictEntry())
49 {
50    Copy(e);
51 }
52
53 /**
54  * \brief   Canonical destructor.
55  */
56 ContentEntry::~ContentEntry ()
57 {
58 }
59
60 //-----------------------------------------------------------------------------
61 // Print
62
63 //-----------------------------------------------------------------------------
64 // Public
65 void ContentEntry::Copy(DocEntry *doc)
66 {
67    DocEntry::Copy(doc);
68
69    ContentEntry *entry = dynamic_cast<ContentEntry *>(doc);
70    if(entry)
71       Value = entry->Value;
72 }
73
74 //-----------------------------------------------------------------------------
75 // Protected
76
77 //-----------------------------------------------------------------------------
78 // Private
79
80 //-----------------------------------------------------------------------------
81 } // end namespace gdcm
82