]> Creatis software - gdcm.git/blob - src/gdcmDicomDirMeta.cxx
* class gdcmObject is now called gdcmDicomDirObject (less confusing name)
[gdcm.git] / src / gdcmDicomDirMeta.cxx
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmDicomDirMeta.cxx,v $
5   Language:  C++
6   Date:      $Date: 2004/09/23 10:47:10 $
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.htm 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 "gdcmDicomDirMeta.h"
20 #include "gdcmDocument.h"
21
22 //-----------------------------------------------------------------------------
23 // Constructor / Destructor
24
25 /**
26  * \ingroup gdcmMeta
27  * \brief  Constructor
28  */ 
29 gdcmDicomDirMeta::gdcmDicomDirMeta(TagDocEntryHT *ptagHT):
30    gdcmDicomDirObject(ptagHT)
31 {
32
33 }
34
35 /**
36  * \ingroup gdcmDicomDirMeta
37  * \brief   Canonical destructor.
38  */
39 gdcmDicomDirMeta::~gdcmDicomDirMeta() 
40 {
41    
42 }
43
44 //-----------------------------------------------------------------------------
45 // Print
46 /**
47  * \brief   Prints the Meta Elements
48  */ 
49 void gdcmDicomDirMeta::Print(std::ostream &os)
50 {
51    os << "META" << std::endl;
52    // warning : META doesn't behave exactly like a gdcmObjet 
53    for (ListDocEntry::iterator i = docEntries.begin();  
54         i != docEntries.end();
55         ++i)
56       (*i)->Print();    
57 }
58
59
60 //-----------------------------------------------------------------------------
61 // Public
62
63
64 /**
65  * \brief   Writes the Meta Elements
66  * @return
67  */ 
68 void gdcmDicomDirMeta::Write(FILE *fp, FileType t)
69 {   
70    for (ListDocEntry::iterator i = docEntries.begin();  
71         i != docEntries.end();
72         ++i)
73       (*i)->Write(fp, t);   
74 }
75
76 //-----------------------------------------------------------------------------
77 // Protected
78
79 //-----------------------------------------------------------------------------
80 // Private
81
82 //-----------------------------------------------------------------------------