]> Creatis software - gdcm.git/blob - src/gdcmBase.h
Fix mistypings
[gdcm.git] / src / gdcmBase.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmBase.h,v $
5   Language:  C++
6   Date:      $Date: 2007/10/04 17:50:42 $
7   Version:   $Revision: 1.13 $
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 #ifndef _GDCMBASE_H_
20 #define _GDCMBASE_H_
21
22 #include "gdcmCommon.h"
23 #include <iostream>
24
25 namespace GDCM_NAME_SPACE 
26 {
27 //-----------------------------------------------------------------------------
28 /**
29  * \brief Base class of all gdcm classes.
30  * Contains the Print related methods :
31  *  - Print 
32  *  - SetPrintLevel / GetPrintLevel 
33  */
34 class GDCM_EXPORT Base
35 {
36 public:
37    /// \brief Constructor
38    Base( ) : PrintLevel(0) { }
39    /// \brief Canonical Destructor   
40    virtual ~Base() {}
41    /// \brief Printer
42    virtual void Print(std::ostream & = std::cout, 
43                       std::string const & = "" ) {};
44
45    /// \brief Sets the print level for the Dicom Header Elements
46    /// \note 0 for Light Print; 1 for 'medium' Print, 2 for Heavy Print
47    void SetPrintLevel(int level) { PrintLevel = level; }
48
49    /// \brief Gets the print level for the Dicom Entries
50    int GetPrintLevel() { return PrintLevel; }
51
52 protected:
53    /// \brief Amount of printed details for each Dicom Entries :
54    /// 0 : stands for the least detail level.
55    int PrintLevel;
56 };
57 } // end namespace gdcm
58
59 //-----------------------------------------------------------------------------
60 #endif