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