]> Creatis software - gdcm.git/blob - src/gdcmBinEntry.cxx
* In order to fix memory leaks:
[gdcm.git] / src / gdcmBinEntry.cxx
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmBinEntry.cxx,v $
5   Language:  C++
6   Date:      $Date: 2004/06/19 23:51:03 $
7   Version:   $Revision: 1.10 $
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 "gdcmBinEntry.h"
20 #include "gdcmDebug.h"
21
22
23 //-----------------------------------------------------------------------------
24 // Constructor / Destructor
25
26 /**
27  * \brief   Constructor from a given gdcmBinEntry
28  */
29 gdcmBinEntry::gdcmBinEntry(gdcmDictEntry* e) : gdcmValEntry(e) {
30    this->voidArea = NULL;
31 }
32
33 /**
34  * \brief   Constructor from a given gdcmBinEntry
35  * @param   e Pointer to existing Doc entry
36  */
37 gdcmBinEntry::gdcmBinEntry(gdcmDocEntry* e) : gdcmValEntry(e->GetDictEntry()){
38    this->UsableLength = e->GetLength();
39         this->ReadLength   = e->GetReadLength();        
40         this->ImplicitVR   = e->IsImplicitVR();
41         this->Offset       = e->GetOffset();    
42         this->printLevel   = e->GetPrintLevel();        
43         this->SQDepthLevel = e->GetDepthLevel();        
44         
45    this->voidArea = NULL; // let's be carefull !
46 }
47
48 /**
49  * \brief   Canonical destructor.
50  */
51 gdcmBinEntry::~gdcmBinEntry(){
52    if (voidArea)
53       free (voidArea);
54 }
55
56
57 //-----------------------------------------------------------------------------
58 // Print
59 /*
60  * \ingroup gdcmDocEntry
61  * \brief   canonical Printer
62  */
63  
64 void gdcmBinEntry::Print(std::ostream &os) {
65    PrintCommonPart(os);
66    /// \todo Write a true specialisation of Print i.e. display something
67    ///       for BinEntry extension.
68    dbg.Verbose(1, "gdcmBinEntry::Print: so WHAT ?");
69 }
70 //-----------------------------------------------------------------------------
71 // Public
72
73 //-----------------------------------------------------------------------------
74 // Protected
75
76 //-----------------------------------------------------------------------------
77 // Private
78    
79 //-----------------------------------------------------------------------------