]> Creatis software - gdcm.git/blob - src/gdcmContentEntry.cxx
* Remove friend classes between DocEntry and File
[gdcm.git] / src / gdcmContentEntry.cxx
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmContentEntry.cxx,v $
5   Language:  C++
6   Date:      $Date: 2005/01/28 15:10:56 $
7   Version:   $Revision: 1.7 $
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) : DocEntry(e)
38 {
39    Value = GDCM_UNFOUND;
40 }
41
42 /**
43  * \brief   Constructor for a given DocEntry
44  * @param   e Pointer to existing Doc entry
45  */
46 ContentEntry::ContentEntry(DocEntry *e)
47              : DocEntry(e->GetDictEntry())
48 {
49    Copy(e);
50 }
51
52 /**
53  * \brief   Canonical destructor.
54  */
55 ContentEntry::~ContentEntry ()
56 {
57 }
58
59 //-----------------------------------------------------------------------------
60 // Public
61 void ContentEntry::Copy(DocEntry *doc)
62 {
63    DocEntry::Copy(doc);
64
65    ContentEntry *entry = dynamic_cast<ContentEntry *>(doc);
66    if(entry)
67       Value = entry->Value;
68 }
69
70 //-----------------------------------------------------------------------------
71 // Protected
72
73 //-----------------------------------------------------------------------------
74 // Private
75
76 //-----------------------------------------------------------------------------
77 } // end namespace gdcm
78